diff --git a/deps/openssl/android/arm64-v8a/usr/local/include/openssl/configuration.h b/deps/openssl/android/arm64-v8a/usr/local/include/openssl/configuration.h index 05803154..bea47258 100644 --- a/deps/openssl/android/arm64-v8a/usr/local/include/openssl/configuration.h +++ b/deps/openssl/android/arm64-v8a/usr/local/include/openssl/configuration.h @@ -37,6 +37,9 @@ extern "C" { # ifndef OPENSSL_NO_AFALGENG # define OPENSSL_NO_AFALGENG # endif +# ifndef OPENSSL_NO_APPS +# define OPENSSL_NO_APPS +# endif # ifndef OPENSSL_NO_ASAN # define OPENSSL_NO_ASAN # endif @@ -46,6 +49,9 @@ extern "C" { # ifndef OPENSSL_NO_ASYNC # define OPENSSL_NO_ASYNC # endif +# ifndef OPENSSL_NO_AUTOERRINIT +# define OPENSSL_NO_AUTOERRINIT +# endif # ifndef OPENSSL_NO_BROTLI # define OPENSSL_NO_BROTLI # endif @@ -55,9 +61,18 @@ extern "C" { # ifndef OPENSSL_NO_CAPIENG # define OPENSSL_NO_CAPIENG # endif +# ifndef OPENSSL_NO_CMP +# define OPENSSL_NO_CMP +# endif +# ifndef OPENSSL_NO_CMS +# define OPENSSL_NO_CMS +# endif # ifndef OPENSSL_NO_COMP # define OPENSSL_NO_COMP # endif +# ifndef OPENSSL_NO_CRMF +# define OPENSSL_NO_CRMF +# endif # ifndef OPENSSL_NO_CRYPTO_MDEBUG # define OPENSSL_NO_CRYPTO_MDEBUG # endif @@ -67,12 +82,21 @@ extern "C" { # ifndef OPENSSL_NO_DEFAULT_THREAD_POOL # define OPENSSL_NO_DEFAULT_THREAD_POOL # endif +# ifndef OPENSSL_NO_DEPRECATED +# define OPENSSL_NO_DEPRECATED +# endif # ifndef OPENSSL_NO_DEVCRYPTOENG # define OPENSSL_NO_DEVCRYPTOENG # endif # ifndef OPENSSL_NO_DGRAM # define OPENSSL_NO_DGRAM # endif +# ifndef OPENSSL_NO_DOCS +# define OPENSSL_NO_DOCS +# endif +# ifndef OPENSSL_NO_DSA +# define OPENSSL_NO_DSA +# endif # ifndef OPENSSL_NO_DSO # define OPENSSL_NO_DSO # endif @@ -85,6 +109,9 @@ extern "C" { # ifndef OPENSSL_NO_DTLS1_2 # define OPENSSL_NO_DTLS1_2 # endif +# ifndef OPENSSL_NO_EC2M +# define OPENSSL_NO_EC2M +# endif # ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 # define OPENSSL_NO_EC_NISTP_64_GCC_128 # endif @@ -94,6 +121,9 @@ extern "C" { # ifndef OPENSSL_NO_ENGINE # define OPENSSL_NO_ENGINE # endif +# ifndef OPENSSL_NO_ERR +# define OPENSSL_NO_ERR +# endif # ifndef OPENSSL_NO_EXTERNAL_TESTS # define OPENSSL_NO_EXTERNAL_TESTS # endif @@ -109,6 +139,12 @@ extern "C" { # ifndef OPENSSL_NO_FUZZ_LIBFUZZER # define OPENSSL_NO_FUZZ_LIBFUZZER # endif +# ifndef OPENSSL_NO_GOST +# define OPENSSL_NO_GOST +# endif +# ifndef OPENSSL_NO_HTTP +# define OPENSSL_NO_HTTP +# endif # ifndef OPENSSL_NO_IDEA # define OPENSSL_NO_IDEA # endif @@ -130,6 +166,12 @@ extern "C" { # ifndef OPENSSL_NO_MULTIBLOCK # define OPENSSL_NO_MULTIBLOCK # endif +# ifndef OPENSSL_NO_NEXTPROTONEG +# define OPENSSL_NO_NEXTPROTONEG +# endif +# ifndef OPENSSL_NO_OCSP +# define OPENSSL_NO_OCSP +# endif # ifndef OPENSSL_NO_PADLOCKENG # define OPENSSL_NO_PADLOCKENG # endif @@ -145,15 +187,24 @@ extern "C" { # ifndef OPENSSL_NO_SCTP # define OPENSSL_NO_SCTP # endif +# ifndef OPENSSL_NO_SOCK +# define OPENSSL_NO_SOCK +# endif # ifndef OPENSSL_NO_SRP # define OPENSSL_NO_SRP # endif +# ifndef OPENSSL_NO_SSL_TRACE +# define OPENSSL_NO_SSL_TRACE +# endif # ifndef OPENSSL_NO_SSL3 # define OPENSSL_NO_SSL3 # endif # ifndef OPENSSL_NO_SSL3_METHOD # define OPENSSL_NO_SSL3_METHOD # endif +# ifndef OPENSSL_NO_STDIO +# define OPENSSL_NO_STDIO +# endif # ifndef OPENSSL_NO_TESTS # define OPENSSL_NO_TESTS # endif @@ -169,6 +220,9 @@ extern "C" { # ifndef OPENSSL_NO_UBSAN # define OPENSSL_NO_UBSAN # endif +# ifndef OPENSSL_NO_UI_CONSOLE +# define OPENSSL_NO_UI_CONSOLE +# endif # ifndef OPENSSL_NO_UNIT_TEST # define OPENSSL_NO_UNIT_TEST # endif diff --git a/deps/openssl/android/arm64-v8a/usr/local/lib/libcrypto.a b/deps/openssl/android/arm64-v8a/usr/local/lib/libcrypto.a index 6509ea27..94bb0e9b 100644 Binary files a/deps/openssl/android/arm64-v8a/usr/local/lib/libcrypto.a and b/deps/openssl/android/arm64-v8a/usr/local/lib/libcrypto.a differ diff --git a/deps/openssl/android/arm64-v8a/usr/local/lib/libssl.a b/deps/openssl/android/arm64-v8a/usr/local/lib/libssl.a index c371b1d8..c91b7cba 100644 Binary files a/deps/openssl/android/arm64-v8a/usr/local/lib/libssl.a and b/deps/openssl/android/arm64-v8a/usr/local/lib/libssl.a differ diff --git a/deps/openssl/android/armeabi-v7a/usr/local/include/openssl/configuration.h b/deps/openssl/android/armeabi-v7a/usr/local/include/openssl/configuration.h index 4bf35903..6ee48d98 100644 --- a/deps/openssl/android/armeabi-v7a/usr/local/include/openssl/configuration.h +++ b/deps/openssl/android/armeabi-v7a/usr/local/include/openssl/configuration.h @@ -37,6 +37,9 @@ extern "C" { # ifndef OPENSSL_NO_AFALGENG # define OPENSSL_NO_AFALGENG # endif +# ifndef OPENSSL_NO_APPS +# define OPENSSL_NO_APPS +# endif # ifndef OPENSSL_NO_ASAN # define OPENSSL_NO_ASAN # endif @@ -46,6 +49,9 @@ extern "C" { # ifndef OPENSSL_NO_ASYNC # define OPENSSL_NO_ASYNC # endif +# ifndef OPENSSL_NO_AUTOERRINIT +# define OPENSSL_NO_AUTOERRINIT +# endif # ifndef OPENSSL_NO_BROTLI # define OPENSSL_NO_BROTLI # endif @@ -55,9 +61,18 @@ extern "C" { # ifndef OPENSSL_NO_CAPIENG # define OPENSSL_NO_CAPIENG # endif +# ifndef OPENSSL_NO_CMP +# define OPENSSL_NO_CMP +# endif +# ifndef OPENSSL_NO_CMS +# define OPENSSL_NO_CMS +# endif # ifndef OPENSSL_NO_COMP # define OPENSSL_NO_COMP # endif +# ifndef OPENSSL_NO_CRMF +# define OPENSSL_NO_CRMF +# endif # ifndef OPENSSL_NO_CRYPTO_MDEBUG # define OPENSSL_NO_CRYPTO_MDEBUG # endif @@ -67,12 +82,21 @@ extern "C" { # ifndef OPENSSL_NO_DEFAULT_THREAD_POOL # define OPENSSL_NO_DEFAULT_THREAD_POOL # endif +# ifndef OPENSSL_NO_DEPRECATED +# define OPENSSL_NO_DEPRECATED +# endif # ifndef OPENSSL_NO_DEVCRYPTOENG # define OPENSSL_NO_DEVCRYPTOENG # endif # ifndef OPENSSL_NO_DGRAM # define OPENSSL_NO_DGRAM # endif +# ifndef OPENSSL_NO_DOCS +# define OPENSSL_NO_DOCS +# endif +# ifndef OPENSSL_NO_DSA +# define OPENSSL_NO_DSA +# endif # ifndef OPENSSL_NO_DSO # define OPENSSL_NO_DSO # endif @@ -85,6 +109,9 @@ extern "C" { # ifndef OPENSSL_NO_DTLS1_2 # define OPENSSL_NO_DTLS1_2 # endif +# ifndef OPENSSL_NO_EC2M +# define OPENSSL_NO_EC2M +# endif # ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 # define OPENSSL_NO_EC_NISTP_64_GCC_128 # endif @@ -94,6 +121,9 @@ extern "C" { # ifndef OPENSSL_NO_ENGINE # define OPENSSL_NO_ENGINE # endif +# ifndef OPENSSL_NO_ERR +# define OPENSSL_NO_ERR +# endif # ifndef OPENSSL_NO_EXTERNAL_TESTS # define OPENSSL_NO_EXTERNAL_TESTS # endif @@ -109,6 +139,12 @@ extern "C" { # ifndef OPENSSL_NO_FUZZ_LIBFUZZER # define OPENSSL_NO_FUZZ_LIBFUZZER # endif +# ifndef OPENSSL_NO_GOST +# define OPENSSL_NO_GOST +# endif +# ifndef OPENSSL_NO_HTTP +# define OPENSSL_NO_HTTP +# endif # ifndef OPENSSL_NO_IDEA # define OPENSSL_NO_IDEA # endif @@ -130,6 +166,12 @@ extern "C" { # ifndef OPENSSL_NO_MULTIBLOCK # define OPENSSL_NO_MULTIBLOCK # endif +# ifndef OPENSSL_NO_NEXTPROTONEG +# define OPENSSL_NO_NEXTPROTONEG +# endif +# ifndef OPENSSL_NO_OCSP +# define OPENSSL_NO_OCSP +# endif # ifndef OPENSSL_NO_PADLOCKENG # define OPENSSL_NO_PADLOCKENG # endif @@ -145,15 +187,24 @@ extern "C" { # ifndef OPENSSL_NO_SCTP # define OPENSSL_NO_SCTP # endif +# ifndef OPENSSL_NO_SOCK +# define OPENSSL_NO_SOCK +# endif # ifndef OPENSSL_NO_SRP # define OPENSSL_NO_SRP # endif +# ifndef OPENSSL_NO_SSL_TRACE +# define OPENSSL_NO_SSL_TRACE +# endif # ifndef OPENSSL_NO_SSL3 # define OPENSSL_NO_SSL3 # endif # ifndef OPENSSL_NO_SSL3_METHOD # define OPENSSL_NO_SSL3_METHOD # endif +# ifndef OPENSSL_NO_STDIO +# define OPENSSL_NO_STDIO +# endif # ifndef OPENSSL_NO_TESTS # define OPENSSL_NO_TESTS # endif @@ -169,6 +220,9 @@ extern "C" { # ifndef OPENSSL_NO_UBSAN # define OPENSSL_NO_UBSAN # endif +# ifndef OPENSSL_NO_UI_CONSOLE +# define OPENSSL_NO_UI_CONSOLE +# endif # ifndef OPENSSL_NO_UNIT_TEST # define OPENSSL_NO_UNIT_TEST # endif diff --git a/deps/openssl/android/x86/usr/local/include/openssl/configuration.h b/deps/openssl/android/x86/usr/local/include/openssl/configuration.h index b2e0f519..86a0ac96 100644 --- a/deps/openssl/android/x86/usr/local/include/openssl/configuration.h +++ b/deps/openssl/android/x86/usr/local/include/openssl/configuration.h @@ -37,6 +37,9 @@ extern "C" { # ifndef OPENSSL_NO_AFALGENG # define OPENSSL_NO_AFALGENG # endif +# ifndef OPENSSL_NO_APPS +# define OPENSSL_NO_APPS +# endif # ifndef OPENSSL_NO_ASAN # define OPENSSL_NO_ASAN # endif @@ -46,6 +49,9 @@ extern "C" { # ifndef OPENSSL_NO_ASYNC # define OPENSSL_NO_ASYNC # endif +# ifndef OPENSSL_NO_AUTOERRINIT +# define OPENSSL_NO_AUTOERRINIT +# endif # ifndef OPENSSL_NO_BROTLI # define OPENSSL_NO_BROTLI # endif @@ -55,9 +61,18 @@ extern "C" { # ifndef OPENSSL_NO_CAPIENG # define OPENSSL_NO_CAPIENG # endif +# ifndef OPENSSL_NO_CMP +# define OPENSSL_NO_CMP +# endif +# ifndef OPENSSL_NO_CMS +# define OPENSSL_NO_CMS +# endif # ifndef OPENSSL_NO_COMP # define OPENSSL_NO_COMP # endif +# ifndef OPENSSL_NO_CRMF +# define OPENSSL_NO_CRMF +# endif # ifndef OPENSSL_NO_CRYPTO_MDEBUG # define OPENSSL_NO_CRYPTO_MDEBUG # endif @@ -67,12 +82,21 @@ extern "C" { # ifndef OPENSSL_NO_DEFAULT_THREAD_POOL # define OPENSSL_NO_DEFAULT_THREAD_POOL # endif +# ifndef OPENSSL_NO_DEPRECATED +# define OPENSSL_NO_DEPRECATED +# endif # ifndef OPENSSL_NO_DEVCRYPTOENG # define OPENSSL_NO_DEVCRYPTOENG # endif # ifndef OPENSSL_NO_DGRAM # define OPENSSL_NO_DGRAM # endif +# ifndef OPENSSL_NO_DOCS +# define OPENSSL_NO_DOCS +# endif +# ifndef OPENSSL_NO_DSA +# define OPENSSL_NO_DSA +# endif # ifndef OPENSSL_NO_DSO # define OPENSSL_NO_DSO # endif @@ -85,6 +109,9 @@ extern "C" { # ifndef OPENSSL_NO_DTLS1_2 # define OPENSSL_NO_DTLS1_2 # endif +# ifndef OPENSSL_NO_EC2M +# define OPENSSL_NO_EC2M +# endif # ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 # define OPENSSL_NO_EC_NISTP_64_GCC_128 # endif @@ -94,6 +121,9 @@ extern "C" { # ifndef OPENSSL_NO_ENGINE # define OPENSSL_NO_ENGINE # endif +# ifndef OPENSSL_NO_ERR +# define OPENSSL_NO_ERR +# endif # ifndef OPENSSL_NO_EXTERNAL_TESTS # define OPENSSL_NO_EXTERNAL_TESTS # endif @@ -109,6 +139,12 @@ extern "C" { # ifndef OPENSSL_NO_FUZZ_LIBFUZZER # define OPENSSL_NO_FUZZ_LIBFUZZER # endif +# ifndef OPENSSL_NO_GOST +# define OPENSSL_NO_GOST +# endif +# ifndef OPENSSL_NO_HTTP +# define OPENSSL_NO_HTTP +# endif # ifndef OPENSSL_NO_IDEA # define OPENSSL_NO_IDEA # endif @@ -130,6 +166,12 @@ extern "C" { # ifndef OPENSSL_NO_MULTIBLOCK # define OPENSSL_NO_MULTIBLOCK # endif +# ifndef OPENSSL_NO_NEXTPROTONEG +# define OPENSSL_NO_NEXTPROTONEG +# endif +# ifndef OPENSSL_NO_OCSP +# define OPENSSL_NO_OCSP +# endif # ifndef OPENSSL_NO_PADLOCKENG # define OPENSSL_NO_PADLOCKENG # endif @@ -145,15 +187,24 @@ extern "C" { # ifndef OPENSSL_NO_SCTP # define OPENSSL_NO_SCTP # endif +# ifndef OPENSSL_NO_SOCK +# define OPENSSL_NO_SOCK +# endif # ifndef OPENSSL_NO_SRP # define OPENSSL_NO_SRP # endif +# ifndef OPENSSL_NO_SSL_TRACE +# define OPENSSL_NO_SSL_TRACE +# endif # ifndef OPENSSL_NO_SSL3 # define OPENSSL_NO_SSL3 # endif # ifndef OPENSSL_NO_SSL3_METHOD # define OPENSSL_NO_SSL3_METHOD # endif +# ifndef OPENSSL_NO_STDIO +# define OPENSSL_NO_STDIO +# endif # ifndef OPENSSL_NO_TESTS # define OPENSSL_NO_TESTS # endif @@ -169,6 +220,9 @@ extern "C" { # ifndef OPENSSL_NO_UBSAN # define OPENSSL_NO_UBSAN # endif +# ifndef OPENSSL_NO_UI_CONSOLE +# define OPENSSL_NO_UI_CONSOLE +# endif # ifndef OPENSSL_NO_UNIT_TEST # define OPENSSL_NO_UNIT_TEST # endif diff --git a/deps/openssl/android/x86_64/usr/local/include/openssl/configuration.h b/deps/openssl/android/x86_64/usr/local/include/openssl/configuration.h index 4e23c4a3..46f7dbe1 100644 --- a/deps/openssl/android/x86_64/usr/local/include/openssl/configuration.h +++ b/deps/openssl/android/x86_64/usr/local/include/openssl/configuration.h @@ -37,6 +37,9 @@ extern "C" { # ifndef OPENSSL_NO_AFALGENG # define OPENSSL_NO_AFALGENG # endif +# ifndef OPENSSL_NO_APPS +# define OPENSSL_NO_APPS +# endif # ifndef OPENSSL_NO_ASAN # define OPENSSL_NO_ASAN # endif @@ -46,6 +49,9 @@ extern "C" { # ifndef OPENSSL_NO_ASYNC # define OPENSSL_NO_ASYNC # endif +# ifndef OPENSSL_NO_AUTOERRINIT +# define OPENSSL_NO_AUTOERRINIT +# endif # ifndef OPENSSL_NO_BROTLI # define OPENSSL_NO_BROTLI # endif @@ -55,9 +61,18 @@ extern "C" { # ifndef OPENSSL_NO_CAPIENG # define OPENSSL_NO_CAPIENG # endif +# ifndef OPENSSL_NO_CMP +# define OPENSSL_NO_CMP +# endif +# ifndef OPENSSL_NO_CMS +# define OPENSSL_NO_CMS +# endif # ifndef OPENSSL_NO_COMP # define OPENSSL_NO_COMP # endif +# ifndef OPENSSL_NO_CRMF +# define OPENSSL_NO_CRMF +# endif # ifndef OPENSSL_NO_CRYPTO_MDEBUG # define OPENSSL_NO_CRYPTO_MDEBUG # endif @@ -67,12 +82,21 @@ extern "C" { # ifndef OPENSSL_NO_DEFAULT_THREAD_POOL # define OPENSSL_NO_DEFAULT_THREAD_POOL # endif +# ifndef OPENSSL_NO_DEPRECATED +# define OPENSSL_NO_DEPRECATED +# endif # ifndef OPENSSL_NO_DEVCRYPTOENG # define OPENSSL_NO_DEVCRYPTOENG # endif # ifndef OPENSSL_NO_DGRAM # define OPENSSL_NO_DGRAM # endif +# ifndef OPENSSL_NO_DOCS +# define OPENSSL_NO_DOCS +# endif +# ifndef OPENSSL_NO_DSA +# define OPENSSL_NO_DSA +# endif # ifndef OPENSSL_NO_DSO # define OPENSSL_NO_DSO # endif @@ -85,6 +109,9 @@ extern "C" { # ifndef OPENSSL_NO_DTLS1_2 # define OPENSSL_NO_DTLS1_2 # endif +# ifndef OPENSSL_NO_EC2M +# define OPENSSL_NO_EC2M +# endif # ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 # define OPENSSL_NO_EC_NISTP_64_GCC_128 # endif @@ -94,6 +121,9 @@ extern "C" { # ifndef OPENSSL_NO_ENGINE # define OPENSSL_NO_ENGINE # endif +# ifndef OPENSSL_NO_ERR +# define OPENSSL_NO_ERR +# endif # ifndef OPENSSL_NO_EXTERNAL_TESTS # define OPENSSL_NO_EXTERNAL_TESTS # endif @@ -109,6 +139,12 @@ extern "C" { # ifndef OPENSSL_NO_FUZZ_LIBFUZZER # define OPENSSL_NO_FUZZ_LIBFUZZER # endif +# ifndef OPENSSL_NO_GOST +# define OPENSSL_NO_GOST +# endif +# ifndef OPENSSL_NO_HTTP +# define OPENSSL_NO_HTTP +# endif # ifndef OPENSSL_NO_IDEA # define OPENSSL_NO_IDEA # endif @@ -130,6 +166,12 @@ extern "C" { # ifndef OPENSSL_NO_MULTIBLOCK # define OPENSSL_NO_MULTIBLOCK # endif +# ifndef OPENSSL_NO_NEXTPROTONEG +# define OPENSSL_NO_NEXTPROTONEG +# endif +# ifndef OPENSSL_NO_OCSP +# define OPENSSL_NO_OCSP +# endif # ifndef OPENSSL_NO_PADLOCKENG # define OPENSSL_NO_PADLOCKENG # endif @@ -145,15 +187,24 @@ extern "C" { # ifndef OPENSSL_NO_SCTP # define OPENSSL_NO_SCTP # endif +# ifndef OPENSSL_NO_SOCK +# define OPENSSL_NO_SOCK +# endif # ifndef OPENSSL_NO_SRP # define OPENSSL_NO_SRP # endif +# ifndef OPENSSL_NO_SSL_TRACE +# define OPENSSL_NO_SSL_TRACE +# endif # ifndef OPENSSL_NO_SSL3 # define OPENSSL_NO_SSL3 # endif # ifndef OPENSSL_NO_SSL3_METHOD # define OPENSSL_NO_SSL3_METHOD # endif +# ifndef OPENSSL_NO_STDIO +# define OPENSSL_NO_STDIO +# endif # ifndef OPENSSL_NO_TESTS # define OPENSSL_NO_TESTS # endif @@ -169,6 +220,9 @@ extern "C" { # ifndef OPENSSL_NO_UBSAN # define OPENSSL_NO_UBSAN # endif +# ifndef OPENSSL_NO_UI_CONSOLE +# define OPENSSL_NO_UI_CONSOLE +# endif # ifndef OPENSSL_NO_UNIT_TEST # define OPENSSL_NO_UNIT_TEST # endif diff --git a/deps/openssl/android/x86_64/usr/local/lib/libcrypto.a b/deps/openssl/android/x86_64/usr/local/lib/libcrypto.a index 3730c20c..c36c0e3c 100644 Binary files a/deps/openssl/android/x86_64/usr/local/lib/libcrypto.a and b/deps/openssl/android/x86_64/usr/local/lib/libcrypto.a differ diff --git a/deps/openssl/android/x86_64/usr/local/lib/libssl.a b/deps/openssl/android/x86_64/usr/local/lib/libssl.a index 42936e7d..88e6c85d 100644 Binary files a/deps/openssl/android/x86_64/usr/local/lib/libssl.a and b/deps/openssl/android/x86_64/usr/local/lib/libssl.a differ diff --git a/src/tls.c b/src/tls.c index 3dc8cf9a..a15aacb2 100644 --- a/src/tls.c +++ b/src/tls.c @@ -33,8 +33,7 @@ tf_tls_context_t* tf_tls_context_create() { tf_tls_context_t* context = tf_malloc(sizeof(tf_tls_context_t)); memset(context, 0, sizeof(*context)); - SSL_library_init(); - SSL_load_error_strings(); + OPENSSL_init_ssl(0, NULL); context->context = SSL_CTX_new(SSLv23_method()); SSL_CTX_set_default_verify_paths(context->context); return context; @@ -166,9 +165,10 @@ void tf_tls_session_shutdown(tf_tls_session_t* session) int tf_tls_session_get_peer_certificate(tf_tls_session_t* session, char* buffer, size_t bytes) { int result = -1; - X509* certificate = SSL_get_peer_certificate(session->ssl); + X509* certificate = SSL_get1_peer_certificate(session->ssl); BIO* bio = BIO_new(BIO_s_mem()); PEM_write_bio_X509(bio, certificate); + X509_free(certificate); BUF_MEM* mem; BIO_get_mem_ptr(bio, &mem); if (mem->length <= bytes) @@ -269,7 +269,7 @@ static bool _tls_session_verify_hostname(X509* certificate, const char* hostname static bool _tls_session_verify_peer_certificate(tf_tls_session_t* session) { bool verified = false; - X509* certificate = SSL_get_peer_certificate(session->ssl); + X509* certificate = SSL_get1_peer_certificate(session->ssl); if (certificate) { if (SSL_get_verify_result(session->ssl) == X509_V_OK) diff --git a/tools/ssl-android b/tools/ssl-android index 58bf3ce3..42a2ec5e 100755 --- a/tools/ssl-android +++ b/tools/ssl-android @@ -29,7 +29,53 @@ build_the_thing() { TOOLCHAIN=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64 export PATH=$TOOLCHAIN/$TRIBLE/bin:$TOOLCHAIN/bin:$PATH echo $PATH - export GLOBAL_OPTIONS="no-trace no-asm no-threads no-md2 no-md4 no-dso no-async no-multiblock no-dgram no-filenames no-shared no-ssl3 no-engine no-dynamic-engine no-zlib no-comp no-psk no-idea no-srp no-weak-ssl-ciphers no-dtls no-egd no-tests -Os" + export GLOBAL_OPTIONS=" + no-apps + no-asm + no-async + no-autoerrinit + no-cmp + no-cms + no-comp + no-deprecated + no-dgram + no-docs + no-dsa + no-dso + no-dtls + no-dynamic-engine + no-ec2m + no-egd + no-engine + no-err + no-filenames + no-gost + no-http + no-idea + no-legacy + no-md2 + no-md4 + no-module + no-multiblock + no-nextprotoneg + no-ocsp + no-psk + no-shared + no-sock + no-srp + no-ssl3 + no-ssl-trace + no-stdio + no-tests + no-thread-pool + no-threads + no-trace + no-ui-console + no-uplink + no-weak-ssl-ciphers + no-zlib + -Os + -DOPENSSL_SMALL_FOOTPRINT" echo "./Configure $SSL_TARGET $OPTIONS $GLOBAL_OPTIONS -fuse-ld=$TOOLCHAIN/bin/ld" && \ ./Configure $SSL_TARGET $OPTIONS $GLOBAL_OPTIONS -fuse-ld=$TOOLCHAIN/bin/ld no-tests && \ make clean && \