cconlon / kerberos-android-ndk Goto Github PK
View Code? Open in Web Editor NEWSample Android Kerberos Application using cross-compiled MIT Kerberos libraries and wolfSSL Embedded SSL Library.
Home Page: https://www.wolfssl.com
Sample Android Kerberos Application using cross-compiled MIT Kerberos libraries and wolfSSL Embedded SSL Library.
Home Page: https://www.wolfssl.com
I have a test server application from Oracle.
I use the kerberos-android-ndk to run against it.
The Oracle application has a test client, that set the context as below.
GSSContext context = manager.createContext(serverName,
krb5Oid,
null,
GSSContext.DEFAULT_LIFETIME);
The Oracle client handles this fine.
The NDK client throws an exception because the client credentials are passed as a null.
If I pass the client credentials, into the createContext and pass null for the OID, the NDK application is happy, but the server Oracle application on a acceptSecContext throws an exception declaring
No valid credentials provided
Failed to find any kerberos credentials
Hello,
I'm a bit confused about the license of the code in this project.
The way I interpret the readme and the headers of the files, the GPL license applies to the wolfSSL crypto library and the MIT/BSD licenses applies to the kerberos parts and can be found on the headers of the kerberos code. Does this mean I can use some of the modifications you did to the kerberos sources and keep the MIT license on this or did you intend for those modifications to also be under GPL?
I don't want to breach any licenses :)
Thanks in advance,
Max
Hello,
due to changes in r10b and higher (specifically removing __srget
and __swbuf
, along with regexp calls such as regcomp
, regfree
and regexec
), this repository or any depending project can currently use only r10b and lower NDK.
I'm currently trying to get the krb5 compiled with latest NDK to see if the static binaries can be updated
Using the KerberosAppActivity
Default behavior for createContext is with no mech passed, the OID "1.2.840.113554.1.2.2" is assigned as a default.
In the method establishContext, if you pass a mech to createContext the method crashes.
Example
Oid kerberos5Oid = new Oid("1.2.840.113554.1.2.2");
mech = kerberos5Oid;
.
context = mgr.createContext(peer, mech, clientCred,
GSSContext.INDEFINITE_LIFETIME);
The crash is in the assignment this.mech
You've only provided library binaries any no actual source code. It would be more helpful to be able to reproduce this than to take your binaries.
Any chance you could update the embedded kerberos libs, since they're a few years old now?
I tried to do this myself using cyassl-android-ndk, but the configure script for krb5 gets as far as "unknown crypto implementation cyassl" and fails to compile a test program, and then gives up.
Any ideas?
Hello,
i can not get started the code on the real device. I was able to start it on the emulator, but the real device(htc sensation) throws "Error while initializing Kerberos 5 library". I have done all things written in readme, i also tried to change location of the files and libs, but without any success.
Here is the log:
03-28 10:50:16.267: E/Trace(29984): error opening trace file: No such file or directory (2)
03-28 10:50:16.277: D/ActivityThread(29984): setTargetHeapUtilization:0.25
03-28 10:50:16.277: D/ActivityThread(29984): setTargetHeapIdealFree:8388608
03-28 10:50:16.277: D/ActivityThread(29984): setTargetHeapConcurrentStart:2097152
03-28 10:50:16.307: D/dalvikvm(29984): Trying to load lib /data/data/edu.mit.kerberos/lib/libkerberosapp.so 0x40ea0450
03-28 10:50:16.307: D/dalvikvm(29984): Added shared lib /data/data/edu.mit.kerberos/lib/libkerberosapp.so 0x40ea0450
03-28 10:50:16.307: I/---KERBEROS---(29984): Loaded libkerberosapp
03-28 10:50:17.208: E/SpannableStringBuilder(29984): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
03-28 10:50:17.208: E/SpannableStringBuilder(29984): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
03-28 10:50:17.278: E/SpannableStringBuilder(29984): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
03-28 10:50:17.278: E/SpannableStringBuilder(29984): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
03-28 10:50:36.657: I/---KERBEROS---(29984): Entered generateArgv
#3-28 10:50:36.687: I/---JAVA JNI---(29984): Return value from native lib: 1
Now i tried the project on the new updated android sdk, and it fails too.
Do you have any idea whats going wrong ?
Thank you
Cheers,
Maxim
Not loading System.LoadLibrary(kerberosapp)
I am feeling a little dumb. I tried to run the test application out of the box. When the System.LoadLibrary gets called the load fails and I see the message to check the path.
I searched the application for anything with the string kerberosapp and could not find anything that looked like a library. I rebuilt with ndk-build with no errors and still could not find a library named kerberosapp.
Thanks
I include Application.mk in jni folder to add build for x86.
APP_ABI := armeabi-v7a armeabi x86
Build shows the following error message:
/android-ndk-path/toolchains/x86-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: ./obj/local/x86/objs/kerberosapp/gsswrapper_wrap.o: in function Java_edu_mit_jgss_swig_gsswrapperJNI_gss_1inquire_1saslname_1for_1mech:jni/gsswrapper_wrap.c:6741: error: undefined reference to 'gss_inquire_saslname_for_mech'
/android-ndk-path/toolchains/x86-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: ./obj/local/x86/objs/kerberosapp/gsswrapper_wrap.o: in function Java_edu_mit_jgss_swig_gsswrapperJNI_gss_1inquire_1mech_1for_1saslname:jni/gsswrapper_wrap.c:6791: error: undefined reference to 'gss_inquire_mech_for_saslname'
/android-ndk-path/toolchains/x86-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: ./obj/local/x86/objs/kerberosapp/gsswrapper_wrap.o: in function Java_edu_mit_jgss_swig_gsswrapperJNI_gss_1inquire_1mech_1for_1saslname:jni/gsswrapper_wrap.c:6791: error: undefined reference to 'gss_inquire_mech_for_saslname'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.