1

(1 replies, posted in wolfSSL)

I am trying to get a simple java connection.  However I am unable to establish the connection.   I think I am missing a step.

I have set up the CTX on the client side.   On the server I can connect via C++.

My code look like this:

String SrvAddr_main;
String SrvPort_main;

SrvAddr_main = "192.168.1.7";

SrvPort_main = "3535";

sock = new Socket(SrvAddr_main, Integer.parseInt( SrvPort_main )); 
               
outstream = new DataOutputStream(sock.getOutputStream());
instream = new DataInputStream(sock.getInputStream());

SSL_main.setFd(sock);
               
SSL_main  = new WolfSSLSession( Ctx );
               
int ret = SSL_main.connect();               
               
String msg = "Hello";
               
ret = SSL_main.write(msg.getBytes(), msg.length());

I do not get any errors but the message never gets to server.  I am thinking I need to use the instream, outstream for something?

Thank you

Hi Chris.

I found the solution.  Thanks for your guidance.

I changed in the wolfssl-ndk-sample/jni/Android.mk  I took out -DNO_PSK and added -DWOLFSSL_JNI

LOCAL_CFLAGS := -DOPENSSL_EXTRA -DWOLFSSL_DTLS -D_POSIX_THREADS -DNDEBUG \
                                -DPERSIST_SESSION_CACHE -DPERSIST_CERT_CACHE -DATOMIC_USER \
                                -DHAVE_PK_CALLBACKS -DNO_DSA -DHAVE_ECC -DTFM_ECC256 \
                                -DECC_SHAMIR -DNO_MD4 -DNO_HC128 -DNO_RABBIT \
                                -DHAVE_OCSP -DHAVE_CRL -DWOLFSSL_JNI \
                                -Wall

Hi Chris

I updated all the files using

https://github.com/wolfSSL/wolfssl
https://github.com/wolfSSL/wolfssljni
https://github.com/wolfSSL/wolfssl-examples

made the same modifications as before:

I added the line wolfcrypt/src/wc_encrypt.c \ on the file wolfssljni-ndk-sample/jni/Android.mk
when I did again the ndk-build it was able to compile the ssl.c file.   However later complained that the options.h file was missing.  I copied the options.h file form the wolfssl_3.7.0 version  /wolfssl-3.7.0/wolfssl/options.h to wolfssljni-ndk-sample/wolfssl/wolfssl/options.h

And I get the same error.  Is there another source code that I should be using? 

This is the build output

../ndk/android-ndk-r9d/ndk-build
Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 10 in ./AndroidManifest.xml   
[armeabi] Compile thumb  : jnitest <= jnitest.c
[armeabi] Compile thumb  : wolfssl <= crl.c
[armeabi] Compile thumb  : wolfssl <= internal.c
[armeabi] Compile thumb  : wolfssl <= io.c
[armeabi] Compile thumb  : wolfssl <= keys.c
[armeabi] Compile thumb  : wolfssl <= ocsp.c
[armeabi] Compile thumb  : wolfssl <= sniffer.c
[armeabi] Compile thumb  : wolfssl <= ssl.c
[armeabi] Compile thumb  : wolfssl <= tls.c
[armeabi] Compile thumb  : wolfssl <= aes.c
[armeabi] Compile thumb  : wolfssl <= arc4.c
[armeabi] Compile thumb  : wolfssl <= asm.c
[armeabi] Compile thumb  : wolfssl <= asn.c
[armeabi] Compile thumb  : wolfssl <= blake2b.c
[armeabi] Compile thumb  : wolfssl <= camellia.c
[armeabi] Compile thumb  : wolfssl <= chacha.c
[armeabi] Compile thumb  : wolfssl <= chacha20_poly1305.c
[armeabi] Compile thumb  : wolfssl <= coding.c
[armeabi] Compile thumb  : wolfssl <= compress.c
[armeabi] Compile thumb  : wolfssl <= curve25519.c
[armeabi] Compile thumb  : wolfssl <= des3.c
[armeabi] Compile thumb  : wolfssl <= dh.c
[armeabi] Compile thumb  : wolfssl <= dsa.c
[armeabi] Compile thumb  : wolfssl <= ecc.c
[armeabi] Compile thumb  : wolfssl <= ecc_fp.c
[armeabi] Compile thumb  : wolfssl <= ed25519.c
[armeabi] Compile thumb  : wolfssl <= error.c
[armeabi] Compile thumb  : wolfssl <= fe_low_mem.c
[armeabi] Compile thumb  : wolfssl <= fe_operations.c
[armeabi] Compile thumb  : wolfssl <= ge_low_mem.c
[armeabi] Compile thumb  : wolfssl <= ge_operations.c
[armeabi] Compile thumb  : wolfssl <= hash.c
[armeabi] Compile thumb  : wolfssl <= hc128.c
[armeabi] Compile thumb  : wolfssl <= hmac.c
[armeabi] Compile thumb  : wolfssl <= integer.c
[armeabi] Compile thumb  : wolfssl <= logging.c
[armeabi] Compile thumb  : wolfssl <= md2.c
[armeabi] Compile thumb  : wolfssl <= md4.c
[armeabi] Compile thumb  : wolfssl <= md5.c
[armeabi] Compile thumb  : wolfssl <= memory.c
[armeabi] Compile thumb  : wolfssl <= misc.c
[armeabi] Compile thumb  : wolfssl <= pkcs7.c
[armeabi] Compile thumb  : wolfssl <= poly1305.c
[armeabi] Compile thumb  : wolfssl <= pwdbased.c
[armeabi] Compile thumb  : wolfssl <= rabbit.c
[armeabi] Compile thumb  : wolfssl <= random.c
[armeabi] Compile thumb  : wolfssl <= ripemd.c
[armeabi] Compile thumb  : wolfssl <= rsa.c
[armeabi] Compile thumb  : wolfssl <= sha.c
[armeabi] Compile thumb  : wolfssl <= sha256.c
[armeabi] Compile thumb  : wolfssl <= sha512.c
[armeabi] Compile thumb  : wolfssl <= tfm.c
[armeabi] Compile thumb  : wolfssl <= wc_encrypt.c
[armeabi] Compile thumb  : wolfssl <= wc_port.c
[armeabi] SharedLibrary  : libwolfssl.so
[armeabi] SharedLibrary  : libjnitest.so
[armeabi] Install        : libjnitest.so => libs/armeabi/libjnitest.so
[armeabi] Install        : libwolfssl.so => libs/armeabi/libwolfssl.so
[armeabi] Compile thumb  : wolfssljni <= com_wolfssl_WolfSSL.c
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c: In function 'Java_com_wolfssl_WolfSSL_nativeFree':
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c:59:8: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c:60:14: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c: In function 'Java_com_wolfssl_WolfSSL_TLSv1_1ServerMethod':
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c:86:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c: In function 'Java_com_wolfssl_WolfSSL_TLSv1_1ClientMethod':
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c:92:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c: In function 'Java_com_wolfssl_WolfSSL_TLSv1_11_1ServerMethod':
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c:98:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c: In function 'Java_com_wolfssl_WolfSSL_TLSv1_11_1ClientMethod':
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c:104:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c: In function 'Java_com_wolfssl_WolfSSL_TLSv1_12_1ServerMethod':
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c:110:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c: In function 'Java_com_wolfssl_WolfSSL_TLSv1_12_1ClientMethod':
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c:116:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c: In function 'Java_com_wolfssl_WolfSSL_DTLSv1_1ClientMethod':
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c:122:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c: In function 'Java_com_wolfssl_WolfSSL_DTLSv1_1ServerMethod':
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c:128:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c: In function 'Java_com_wolfssl_WolfSSL_DTLSv1_12_1ClientMethod':
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c:134:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c: In function 'Java_com_wolfssl_WolfSSL_DTLSv1_12_1ServerMethod':
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c:140:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c: In function 'Java_com_wolfssl_WolfSSL_SSLv23_1ServerMethod':
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c:146:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c: In function 'Java_com_wolfssl_WolfSSL_SSLv23_1ClientMethod':
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c:152:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c: In function 'Java_com_wolfssl_WolfSSL_x509_1getDer':
jni/../wolfssljni/native/com_wolfssl_WolfSSL.c:357:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
[armeabi] Compile thumb  : wolfssljni <= com_wolfssl_WolfSSLContext.c
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_newContext':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:71:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:71:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_useCertificateFile':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:100:51: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_usePrivateKeyFile':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:134:50: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_loadVerifyLocations':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:179:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_useCertificateChainFile':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:217:57: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_freeContext':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:229:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setVerify':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:236:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:246:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'NativeVerifyCallback':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:318:45: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_memsaveCertCache':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:361:42: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_memrestoreCertCache':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:418:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_getCertCacheMemsize':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:427:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setCipherList':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:457:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_loadVerifyBuffer':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:492:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_useCertificateBuffer':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:522:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_usePrivateKeyBuffer':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:553:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_useCertificateChainBuffer':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:585:53: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setGroupMessages':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:595:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setIORecv':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:612:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'NativeIORecvCb':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:671:5: warning: implicit declaration of function 'wolfSSL_get_jobject' [-Wimplicit-function-declaration]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setIOSend':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:832:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setGenCookie':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:1051:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_enableCRL':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:1271:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_disableCRL':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:1280:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_loadCRL':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:1294:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setCRLCb':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:1324:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_enableOCSP':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:1413:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_disableOCSP':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:1420:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setOCSPOverrideUrl':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:1451:50: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setMacEncryptCb':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:1472:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setDecryptVerifyCb':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:1759:40: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setEccSignCb':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:2039:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setEccVerifyCb':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:2328:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setRsaSignCb':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:2605:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setRsaVerifyCb':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:2899:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setRsaEncCb':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:3138:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setRsaDecCb':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:3425:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setPskClientCb':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:3670:9: warning: implicit declaration of function 'wolfSSL_CTX_set_psk_client_callback' [-Wimplicit-function-declaration]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:3670:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_setPskServerCb':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:4093:9: warning: implicit declaration of function 'wolfSSL_CTX_set_psk_server_callback' [-Wimplicit-function-declaration]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:4093:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c: In function 'Java_com_wolfssl_WolfSSLContext_usePskIdentityHint':
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:4394:5: warning: implicit declaration of function 'wolfSSL_CTX_use_psk_identity_hint' [-Wimplicit-function-declaration]
jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:4394:51: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
[armeabi] Compile thumb  : wolfssljni <= com_wolfssl_WolfSSLSession.c
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_newSSL':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:50:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:50:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:57:26: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:63:26: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:67:9: warning: implicit declaration of function 'wolfSSL_set_jobject' [-Wimplicit-function-declaration]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:67:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:70:26: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setFd':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:148:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_useCertificateFile':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:165:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_usePrivateKeyFile':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:187:46: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_useCertificateChainFile':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:209:53: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setUsingNonblock':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:235:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getUsingNonblock':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:257:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getFd':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:280:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_connect':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:298:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_write':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:323:30: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_read':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:339:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_accept':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:359:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_freeSSL':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:381:5: warning: implicit declaration of function 'wolfSSL_get_jobject' [-Wimplicit-function-declaration]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:381:53: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:388:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_shutdownSSL':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:398:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getError':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:408:30: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setSession':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:418:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:418:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getSession':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:425:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:425:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setCipherList':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:440:42: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_dtlsGetCurrentTimeout':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:465:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_dtlsGotTimeout':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:486:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_dtls':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:506:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_dtlsSetPeer':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:616:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_dtlsGetPeer':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:642:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_sessionReused':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:713:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getPeerCertificate':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:733:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getPeerX509Issuer':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:760:42: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getPeerX509Subject':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:792:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getPeerX509AltName':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:823:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getVersion':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:847:60: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getCurrentCipher':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:868:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:868:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_checkDomainName':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:896:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setTmpDH':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:942:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setTmpDHFile':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:971:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_useCertificateBuffer':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1007:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_usePrivateKeyBuffer':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1039:42: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_useCertificateChainBuffer':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1071:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setGroupMessages':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1091:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_enableCRL':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1115:30: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_disableCRL':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1139:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_loadCRL':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1167:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setCRLCb':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1206:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_cipherGetName':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1310:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getMacSecret':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1343:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1348:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getClientWriteKey':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1396:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1401:40: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getClientWriteIV':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1449:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1454:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getServerWriteKey':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1502:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1507:40: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getServerWriteIV':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1555:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1560:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getKeySize':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1589:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getSide':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1596:28: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_isTLSv1_11':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1603:30: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getBulkCipher':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1610:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getCipherBlockSize':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1617:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getAeadMacSize':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1624:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getHmacSize':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1631:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getHmacType':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1638:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getCipherType':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1645:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setTlsHmacInner':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1667:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setEccSignCtx':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1717:53: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1747:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setEccVerifyCtx':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1783:57: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1813:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setRsaSignCtx':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1849:53: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1879:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setRsaVerifyCtx':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1915:57: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1945:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setRsaEncCtx':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:1981:51: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2011:26: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setRsaDecCtx':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2047:51: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2077:26: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setPskClientCb':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2094:9: warning: implicit declaration of function 'wolfSSL_set_psk_client_callback' [-Wimplicit-function-declaration]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2094:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_setPskServerCb':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2117:9: warning: implicit declaration of function 'wolfSSL_set_psk_server_callback' [-Wimplicit-function-declaration]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2117:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getPskIdentityHint':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2133:13: warning: implicit declaration of function 'wolfSSL_get_psk_identity_hint' [-Wimplicit-function-declaration]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2133:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2133:13: warning: passing argument 2 of '(*jenv)->NewStringUTF' makes pointer from integer without a cast [enabled by default]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2133:13: note: expected 'char const *' but argument is of type 'int'
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_getPskIdentity':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2143:13: warning: implicit declaration of function 'wolfSSL_get_psk_identity' [-Wimplicit-function-declaration]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2143:38: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2143:13: warning: passing argument 2 of '(*jenv)->NewStringUTF' makes pointer from integer without a cast [enabled by default]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2143:13: note: expected 'char const *' but argument is of type 'int'
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c: In function 'Java_com_wolfssl_WolfSSLSession_usePskIdentityHint':
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2157:5: warning: implicit declaration of function 'wolfSSL_use_psk_identity_hint' [-Wimplicit-function-declaration]
jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2157:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
[armeabi] Compile thumb  : wolfssljni <= com_wolfssl_wolfcrypt_ECC.c
[armeabi] Compile thumb  : wolfssljni <= com_wolfssl_wolfcrypt_RSA.c
[armeabi] SharedLibrary  : libwolfssljni.so
/home/fc/eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLContext.o: in function NativeRsaDecCb:jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:3484: error: undefined reference to 'wolfSSL_get_jobject'
/home/fc/eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLContext.o: in function NativeRsaEncCb:jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:3198: error: undefined reference to 'wolfSSL_get_jobject'
/home/fc/eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLContext.o: in function NativeRsaVerifyCb:jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:2958: error: undefined reference to 'wolfSSL_get_jobject'
/home/fc/eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLContext.o: in function NativeRsaSignCb:jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:2665: error: undefined reference to 'wolfSSL_get_jobject'
/home/fc/eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLContext.o: in function Java_com_wolfssl_WolfSSLContext_setPskClientCb:jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:3670: error: undefined reference to 'wolfSSL_CTX_set_psk_client_callback'
/home/fc/eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLContext.o: in function Java_com_wolfssl_WolfSSLContext_setPskServerCb:jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:4093: error: undefined reference to 'wolfSSL_CTX_set_psk_server_callback'
/home/fc/eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLContext.o: in function Java_com_wolfssl_WolfSSLContext_usePskIdentityHint:jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:4394: error: undefined reference to 'wolfSSL_CTX_use_psk_identity_hint'
/home/fc/eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLSession.o: in function Java_com_wolfssl_WolfSSLSession_newSSL:jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:67: error: undefined reference to 'wolfSSL_set_jobject'
/home/fc/eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLSession.o: in function Java_com_wolfssl_WolfSSLSession_setPskClientCb:jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2094: error: undefined reference to 'wolfSSL_set_psk_client_callback'
/home/fc/eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLSession.o: in function Java_com_wolfssl_WolfSSLSession_setPskServerCb:jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2117: error: undefined reference to 'wolfSSL_set_psk_server_callback'
/home/fc/eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLSession.o: in function Java_com_wolfssl_WolfSSLSession_getPskIdentityHint:jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2133: error: undefined reference to 'wolfSSL_get_psk_identity_hint'
/home/fc/eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLSession.o: in function Java_com_wolfssl_WolfSSLSession_getPskIdentity:jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2143: error: undefined reference to 'wolfSSL_get_psk_identity'
/home/fc/eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLSession.o: in function Java_com_wolfssl_WolfSSLSession_usePskIdentityHint:jni/../wolfssljni/native/com_wolfssl_WolfSSLSession.c:2157: error: undefined reference to 'wolfSSL_use_psk_identity_hint'
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/libwolfssljni.so] Error 1

Hi Chris,

I added the line wolfcrypt/src/wc_encrypt.c \ on the file wolfssljni-ndk-sample/jni/Android.mk

when I did again the ndk-build it was able to compile the ssl.c file.   However later complained that the options.h file was missing.  I copied the options.h file form the wolfssl_3.7.0 version  /wolfssl-3.7.0/wolfssl/options.h to wolfssljni-ndk-sample/wolfssl/wolfssl/options.h

did the ndk-build again.  It kept going and then it gave the following errors:

eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLContext.o: in function NativeRsaDecCb:jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:3484: error: undefined reference to 'wolfSSL_get_jobject'
eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLContext.o: in function NativeRsaEncCb:jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:3198: error: undefined reference to 'wolfSSL_get_jobject'
eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLContext.o: in function NativeRsaVerifyCb:jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:2958: error: undefined reference to 'wolfSSL_get_jobject'
eclipse/ndk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/wolfssljni/native/com_wolfssl_WolfSSLContext.o: in function NativeRsaSignCb:jni/../wolfssljni/native/com_wolfssl_WolfSSLContext.c:2665: error: undefined reference to 'wolfSSL_get_jobject


And many similar errors.  Do you have any suggestions.   Thank you

cfarrin

Thank you for your help and Interest.

Regards,

cfarrin

Hi,

I am compiling the git ttps://github.com/wolfSSL/wolfssl-examples/tree/master/android.  I added the wolfssl and the wolfssljni from:

https://github.com/wolfSSL/wolfssl
https://github.com/wolfSSL/wolfssljni

when I do ndk-build it compiles bunch of stuff and then I get:

../ndk/android-ndk-r10e/ndk-build
Android NDK: WARNING: APP_PLATFORM android-16 is larger than android:minSdkVersion 10 in ./AndroidManifest.xml   
[armeabi] SharedLibrary  : libwolfssl.so
jni/../wolfssl/src/ssl.c:2430: error: undefined reference to 'wc_Des_CbcDecryptWithKey'
jni/../wolfssl/src/ssl.c:2433: error: undefined reference to 'wc_Des3_CbcDecryptWithKey'
jni/../wolfssl/src/ssl.c:2444: error: undefined reference to 'wc_AesCbcDecryptWithKey'
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi/libwolfssl.so] Error 1

Any suggestions?

Thank you

Hi,

I was trying to use on the server the function wolfSSL_get_SessionTicket to get the Client's Session ID.  After some debugging to determine why I was getting a  Bad function argument.  After this I looked at the ssl.c code and I noticed the problem:

WOLFSSL_API int wolfSSL_get_SessionTicket(WOLFSSL* ssl, byte* buf, word32* bufSz)
{
    if (ssl == NULL || buf == NULL || bufSz == NULL || *bufSz == 0)
        return BAD_FUNC_ARG;

    if (ssl->session.ticketLen <= *bufSz) {
        XMEMCPY(buf, ssl->session.ticket, ssl->session.ticketLen);
        *bufSz = ssl->session.ticketLen;
    }
    else
        *bufSz = 0;

    return SSL_SUCCESS;
}

This requires the Buffer not to be NULL and the size variable to be equal to the size of the buffer.  This makes little sense unless there is a initialization function for the Ticket buffer.  Suggest that the if Statement is changed to:
if ( ssl==NULL || *bufSz < ID_LEN)

cfarrin

8

(4 replies, posted in wolfSSL)

Hi Solved It the following way:
WOLFSSL *s;
.
.

peerCert = wolfSSL_get_peer_certificate(s);
peer_derCertCnst=wolfSSL_X509_get_der(peerCert, &peer_derCertSz);
XMEMCPY( peer_derCert, peer_derCertCnst, peer_derCertSz);
InitDecodedCert( &cert, peer_derCert, peer_derCertSz, 0);
ret = ParseCert(&cert, CERT_TYPE, NO_VERIFY, 0);
XMEMCPY(pubKey, cert.publicKey, cert.Pub.Key.Size);

However I do think a wolfSSL_X509_get_pubKey(peerCert, &peer_pubKeySz);  Should be added to ssl.c make things easier.  Thanks for the Help.

char* wolfSSL_X509_get_pubKey(WOLFSSL_X509* x509, int *outSz)
        {
        char *asciiStr = malloc(FOURK_BUF);
        WOLFSSL_ENTER("wolfSSL_X509_get_pubKey");
        if (x509 == NULL || outSz == NULL)
                return NULL;
        *outSz = (int)x509->pubKey.length;
        return x509->pubKey.buffer;
        }

9

(4 replies, posted in wolfSSL)

Hi Thanks for the response How ever I still Have an issue.  As you mentioned I looked at the myVerify example I Tried the following:

#include <wolfssl/ssl.h>
#include <wolfssl/options.h>

#include <cyassl/openssl/ssl.h>
#include <wolfssl/test.h>

.
.
.
.


char* wolfSSL_X509_get_pubKey(WOLFSSL_X509* x509, int *outSz)
        {
        char *asciiStr = malloc(FOURK_BUF);
        WOLFSSL_ENTER("wolfSSL_X509_get_pubKey");

        if (x509 == NULL || outSz == NULL)
                return NULL;

        *outSz = (int)x509->pubKey.length;
        return x509->pubKey.buffer;
        }

main{
WOLFSSL_X509*   peerCert;
char peer_pubKey[FOURK_BUF];
int  peer_pubKeySz;
WOLFSSL *s;

.
.
.
nbytes = wolfSSL_read(s, buffer, 1024);
peerCert = wolfSSL_get_peer_certificate(s);
peer_pubKey=(char *)wolfSSL_X509_get_pubKey(peerCert, &peer_pubKeySz);

However when I compile it I get ->

SSL2CRL.c: In function ‘wolfSSL_X509_get_pubKey’:
SSL2CRL.c:147:20: error: dereferencing pointer to incomplete type
  *outSz = (int)x509->pubKey.length;
                    ^
SSL2CRL.c:148:13: error: dereferencing pointer to incomplete type
  return x509->pubKey.buffer;


For some reason the compiler is having some issues with the WOLFSSL_X509 Structure.  Mi Guess is that I need to include another library but I do not know which one.  Thanks for the help.

cafrrin

10

(4 replies, posted in wolfSSL)

Hi,

I want to verify that the client certificate belongs to a particular user that is logging in into a system.  Is there a way to get the client's public key or certificate from the TLS handshake so that I can cross check it against a database that holds the user name-pubicKey/Cert or something like that.   I am already verifying the peer with wolfSSL_CTX_set_verify.  However I am unable to match it to the user loggin to the publicKey/Certificate which which is done at a later stage in my uathentication system because I am unable to get the public/Key Cert from the handshake.  For now I am sending the client certificate over the TLS link but it does not seem to be the most appropriate solution.  Any Suggestions.

Thank you for all your help.

cfarrin

11

(5 replies, posted in wolfSSL)

Hi Thank you,

I figure it out.

I added
#include <wolfssl/options.h>
#include <wolfssl/test.h>

I tried earlier the options.h and I got the same error.   After that I reinserted the test.h and the combination of both did the trick.

Thank you for your help

fc8282

12

(5 replies, posted in wolfSSL)

Hi Thanks for answering,

I tried all three things but I am still getting the same error.

Thanks for the help,

fc8282

13

(5 replies, posted in wolfSSL)

Hi,

I am testing the TicketInit() and the wolfSSL_CTX_set_TicketEncCb(ctx, myTicketEncCb); Ticket functionality.   I have added the #include <wolfssl/test.h>. When I compile my program gcc xxx.c -o xxx -lm -lwolfssl the compiler does not find the inline functions on the library.  I am pretty sure I am missing a compliler option to handle the static INLINE int myTicketEncC( XXXX) declarations on the include test.h file.  Any ideas.  Thank you !!!!