OpenSSL libssl.so error undefined reference to 'ssl3_cbc_remove_padding'

1.4k views Asked by At

I am currently patching a older version of OpenSSL to the latest stable 1.0.0o build (via import_openssl.sh)for use with a Android application via the NDK r10c.

While building the libssl.so sharedlibrary i am presented with the following errors.

[armeabi] SharedLibrary  : libssl.so
jni/openssl/ssl/s3_enc.c:542: error: undefined reference to 'ssl3_cbc_remove_padding'
jni/openssl/ssl/s3_enc.c:739: error: undefined reference to 'ssl3_cbc_record_digest_supported'
jni/openssl/ssl/s3_enc.c:764: error: undefined reference to 'ssl3_cbc_digest_record'
jni/openssl/ssl/s3_pkt.c:464: error: undefined reference to 'ssl3_cbc_copy_mac'
jni/openssl/ssl/t1_enc.c:763: error: undefined reference to 'tls1_cbc_remove_padding'
jni/openssl/ssl/t1_enc.c:919: error: undefined reference to 'ssl3_cbc_record_digest_supported'
jni/openssl/ssl/t1_enc.c:925: error: undefined reference to 'ssl3_cbc_digest_record'
jni/openssl/ssl/ssl_lib.c:1058: error: undefined reference to 'dtls1_min_mtu' 

Taking the first error for example, i can see a reference in the file s3_enc.c (https://github.com/openssl/openssl/blob/OpenSSL_1_0_0-stable/ssl/s3_enc.c) to a function 'ssl3_cbc_remove_padding' but the actual function is nowhere to be seen, only a prototype in ssl_locl.h (https://github.com/openssl/openssl/blob/OpenSSL_1_0_0-stable/ssl/ssl_lib.c) so i am a little confused.

Any help or previous experience would be greatly appreciated in order to get these errors cleared. if you need me to elaborate further, please ask.

1

There are 1 answers

1
gmuhammad On BEST ANSWER

Check the files (s3_enc.c, t1_enc.c, ssl_lib.c), included in their respective .mk files or not. In my case it was not included so I just add these source files in ssl/Android.mk under LOCAL_SRC_FILES section.