summaryrefslogtreecommitdiff
path: root/include/ScopedJavaUnicodeString.h
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2010-05-06 00:23:21 -0700
committerBrian Carlstrom <bdc@google.com>2010-05-06 16:27:37 -0700
commit3e24c53ecc31b840e51869c295785d5a2f8b31eb (patch)
tree0467469d8213d16b074626859ac9e77b3bd001cb /include/ScopedJavaUnicodeString.h
parentab3683bce6e370c946598bfad54387fa38ce69df (diff)
Moving OpenSSLSocketImpl native code to NativeCrypto (and other clearnup)
Summary: - Finished consolidating OpenSSL native code into NativeCrypto - fixing local vs global ref bug with AppData Added new ScopedGlobalRef as part of this fix - fixed many historical memory leaks identified during code review - fixed lack of error checking on allcoation with OpenSSL *_new routines - Added to_SSL_CTX and to_SSL_SESSION to match to_SSL (renamed from getSslPointer) - Replaced most uses of GetByteArrayElements with ScopedByteArray (including cases where we we using ReleaseByteArrayElements(..,...,0) instead of JNI_ABORT) - Replaced uses of GetStringUTFChars with ScopedUtfChars Details: Finished consolidating OpenSSL native code into NativeCrypto OpenSSLSocketImpl NativeCrypto --------------------------------------- nativeread SSL_read_byte nativeread SSL_read nativewrite SSL_write_byte nativewrite SSL_write nativeinterrupt SSL_interrupt nativeclose SSL_shutdown nativeverifysignature verifysignature Also removed dead code that was wrapping SSL_get1_session luni/src/main/java/org/apache/harmony/xnet/provider/jsse/NativeCrypto.java luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp Fixed NativeCrypto_SSL_write and NativeCrypto_d2i_SSL_SESSION to use JNI_ABORT on release to avoid copy back of unchanged data (via ScopedByteArray). luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp While running the usual tests: adb shell run-core-tests tests.xnet.AllTests javax.net.ssl.AllTests there was an abort from the JNI checking because in the recent handshaking change, local refs were kept in AppData and then reused in later calls. Added new ScopedGlobalRef to handle the book keeping of this. luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSocketImpl.java include/ScopedGlobalRef.h Fixed various leaks on old error paths spotted by reviewer. luni/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp Tracking move of verifySignature, a non-SSL bit of code that was lurking in OpenSSLSocketImpl luni/src/main/java/org/apache/harmony/security/provider/cert/X509CertImpl.java Change-Id: If1e409782bc99dc684039cfe3f53f8244e29346e
Diffstat (limited to 'include/ScopedJavaUnicodeString.h')
0 files changed, 0 insertions, 0 deletions