Skip to content

Commit 1683579

Browse files
committed
log error for android through log API
1 parent 05ed3bf commit 1683579

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/crypto_openssl.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,15 @@ static int sqlcipher_openssl_activate(void *ctx) {
113113
#ifdef SQLCIPHER_FIPS
114114
if(!FIPS_mode()){
115115
if(!FIPS_mode_set(1)){
116+
unsigned long err = 0;
116117
ERR_load_crypto_strings();
118+
#ifdef __ANDROID__
119+
while((err = ERR_get_error()) != 0) {
120+
__android_log_print(ANDROID_LOG_ERROR, "sqlcipher","error: %lx. %s.", err, ERR_error_string(err, NULL));
121+
}
122+
#else
117123
ERR_print_errors_fp(stderr);
124+
#endif
118125
}
119126
}
120127
#endif

0 commit comments

Comments
 (0)