log error for android through log API

This commit is contained in:
Stephen Lombardo 2019-11-18 11:19:04 -05:00
parent 05ed3bfe86
commit 16835799b4
1 changed files with 7 additions and 0 deletions

View File

@ -113,8 +113,15 @@ static int sqlcipher_openssl_activate(void *ctx) {
#ifdef SQLCIPHER_FIPS #ifdef SQLCIPHER_FIPS
if(!FIPS_mode()){ if(!FIPS_mode()){
if(!FIPS_mode_set(1)){ if(!FIPS_mode_set(1)){
unsigned long err = 0;
ERR_load_crypto_strings(); ERR_load_crypto_strings();
#ifdef __ANDROID__
while((err = ERR_get_error()) != 0) {
__android_log_print(ANDROID_LOG_ERROR, "sqlcipher","error: %lx. %s.", err, ERR_error_string(err, NULL));
}
#else
ERR_print_errors_fp(stderr); ERR_print_errors_fp(stderr);
#endif
} }
} }
#endif #endif