@@ -869,7 +869,7 @@ static int wp_aesgcm_get_rand_iv(wp_AeadCtx* ctx, unsigned char* out,
869869
870870 rc = wc_AesGcmInit (& ctx -> aes , NULL , 0 , ctx -> iv , (word32 )ctx -> ivLen );
871871 if (rc != 0 ) {
872- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesGcmInit failed with rc=%d" , rc );
872+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesGcmInit failed with rc=%d" , rc );
873873 ok = 0 ;
874874 }
875875 #endif
@@ -973,7 +973,7 @@ static int wp_aesgcm_tls_iv_set_fixed(wp_AeadCtx* ctx, unsigned char* iv,
973973 rc = wc_AesGcmSetIV (& ctx -> aes , (word32 )ctx -> ivLen , iv ,
974974 (word32 )len , wp_provctx_get_rng (ctx -> provCtx ));
975975 if (rc != 0 ) {
976- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesGcmSetIV failed with rc=%d" , rc );
976+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesGcmSetIV failed with rc=%d" , rc );
977977 ok = 0 ;
978978 }
979979 }
@@ -1040,14 +1040,14 @@ static int wp_aesgcm_einit(wp_AeadCtx* ctx, const unsigned char *key,
10401040 if ((ivLen == 0 ) && (key != NULL )) {
10411041 rc = wc_AesGcmSetKey (aes , key , (word32 )keyLen );
10421042 if (rc != 0 ) {
1043- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesGcmSetKey failed with rc=%d" , rc );
1043+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesGcmSetKey failed with rc=%d" , rc );
10441044 ok = 0 ;
10451045 }
10461046 }
10471047 else if (key != NULL ) {
10481048 rc = wc_AesGcmEncryptInit (aes , key , (word32 )keyLen , iv , (word32 )ivLen );
10491049 if (rc != 0 ) {
1050- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesGcmEncryptInit failed with rc=%d" , rc );
1050+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesGcmEncryptInit failed with rc=%d" , rc );
10511051 ok = 0 ;
10521052 }
10531053 }
@@ -1056,7 +1056,7 @@ static int wp_aesgcm_einit(wp_AeadCtx* ctx, const unsigned char *key,
10561056 if (ok && (key != NULL )) {
10571057 int rc = wc_AesGcmSetKey (aes , key , (word32 )keyLen );
10581058 if (rc != 0 ) {
1059- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesGcmSetKey failed with rc=%d" , rc );
1059+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesGcmSetKey failed with rc=%d" , rc );
10601060 ok = 0 ;
10611061 }
10621062 }
@@ -1112,7 +1112,7 @@ static int wp_aesgcm_dinit(wp_AeadCtx *ctx, const unsigned char *key,
11121112 if (ok && key != NULL ) {
11131113 int rc = wc_AesGcmDecryptInit (aes , key , (word32 )keyLen , iv , (word32 )ivLen );
11141114 if (rc != 0 ) {
1115- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesGcmDecryptInit failed with rc=%d" , rc );
1115+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesGcmDecryptInit failed with rc=%d" , rc );
11161116 ok = 0 ;
11171117 }
11181118 }
@@ -1125,7 +1125,7 @@ static int wp_aesgcm_dinit(wp_AeadCtx *ctx, const unsigned char *key,
11251125 if (ok && (key != NULL )) {
11261126 int rc = wc_AesGcmSetKey (aes , key , (word32 )keyLen );
11271127 if (rc != 0 ) {
1128- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesGcmSetKey failed with rc=%d" , rc );
1128+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesGcmSetKey failed with rc=%d" , rc );
11291129 ok = 0 ;
11301130 }
11311131 }
@@ -1209,7 +1209,7 @@ static int wp_aesgcm_tls_cipher(wp_AeadCtx* ctx, unsigned char* out,
12091209 (word32 )ctx -> ivLen , out + len , EVP_GCM_TLS_TAG_LEN ,
12101210 ctx -> buf , EVP_AEAD_TLS1_AAD_LEN );
12111211 if (rc != 0 ) {
1212- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesGcmEncrypt failed with rc=%d" , rc );
1212+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesGcmEncrypt failed with rc=%d" , rc );
12131213 ok = 0 ;
12141214 }
12151215 }
@@ -1218,7 +1218,7 @@ static int wp_aesgcm_tls_cipher(wp_AeadCtx* ctx, unsigned char* out,
12181218 (word32 )ctx -> ivLen , in + len , EVP_GCM_TLS_TAG_LEN , ctx -> buf ,
12191219 EVP_AEAD_TLS1_AAD_LEN );
12201220 if (rc != 0 ) {
1221- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesGcmDecrypt failed with rc=%d" , rc );
1221+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesGcmDecrypt failed with rc=%d" , rc );
12221222 OPENSSL_cleanse (out , len );
12231223 ok = 0 ;
12241224 }
@@ -1275,7 +1275,7 @@ static int wp_aesgcm_stream_update(wp_AeadCtx *ctx, unsigned char *out,
12751275 if (ctx -> ivState == IV_STATE_BUFFERED ) {
12761276 rc = wc_AesGcmInit (& ctx -> aes , NULL , 0 , ctx -> iv , (word32 )ctx -> ivLen );
12771277 if (rc != 0 ) {
1278- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesGcmInit failed with rc=%d" , rc );
1278+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesGcmInit failed with rc=%d" , rc );
12791279 ok = 0 ;
12801280 }
12811281
@@ -1309,7 +1309,7 @@ static int wp_aesgcm_stream_update(wp_AeadCtx *ctx, unsigned char *out,
13091309 }
13101310 }
13111311 else {
1312- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesGcmEncryptUpdate/wc_AesGcmDecryptUpdate failed with rc=%d" , rc );
1312+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesGcmEncryptUpdate/wc_AesGcmDecryptUpdate failed with rc=%d" , rc );
13131313 ok = 0 ;
13141314 }
13151315
@@ -1367,7 +1367,7 @@ static int wp_aesgcm_stream_final(wp_AeadCtx *ctx, unsigned char *out,
13671367 rc = wc_AesGcmDecryptFinal (aes , ctx -> buf , (word32 )ctx -> tagLen );
13681368 }
13691369 if (rc != 0 ) {
1370- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesGcmEncryptFinal/wc_AesGcmDecryptFinal failed with rc=%d" , rc );
1370+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesGcmEncryptFinal/wc_AesGcmDecryptFinal failed with rc=%d" , rc );
13711371 ok = 0 ;
13721372 }
13731373 }
@@ -1425,7 +1425,7 @@ static int wp_aesgcm_encdec(wp_AeadCtx *ctx, unsigned char *out, size_t* outLen,
14251425 if (ok ) {
14261426 rc = wc_AesGcmSetExtIV (& ctx -> aes , iv , (word32 )ctx -> ivLen );
14271427 if (rc != 0 ) {
1428- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesGcmSetExtIV failed with rc=%d" , rc );
1428+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesGcmSetExtIV failed with rc=%d" , rc );
14291429 ok = 0 ;
14301430 }
14311431
@@ -1442,7 +1442,7 @@ static int wp_aesgcm_encdec(wp_AeadCtx *ctx, unsigned char *out, size_t* outLen,
14421442 (word32 )ctx -> inLen , iv , (word32 )ctx -> ivLen , ctx -> buf ,
14431443 (word32 )ctx -> tagLen , ctx -> aad , (word32 )ctx -> aadLen );
14441444 if (rc != 0 ) {
1445- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesGcmEncrypt_ex failed with rc=%d" , rc );
1445+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesGcmEncrypt_ex failed with rc=%d" , rc );
14461446 ok = 0 ;
14471447 }
14481448 if (ok ) {
@@ -1461,7 +1461,7 @@ static int wp_aesgcm_encdec(wp_AeadCtx *ctx, unsigned char *out, size_t* outLen,
14611461 ctx -> authErr = 1 ;
14621462 }
14631463 if (rc != 0 ) {
1464- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesGcmDecrypt failed with rc=%d" , rc );
1464+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesGcmDecrypt failed with rc=%d" , rc );
14651465 ok = 0 ;
14661466 }
14671467 }
@@ -1475,7 +1475,7 @@ static int wp_aesgcm_encdec(wp_AeadCtx *ctx, unsigned char *out, size_t* outLen,
14751475 (word32 )ctx -> inLen , iv , (word32 )ctx -> ivLen , (byte * )tmpTag ,
14761476 (word32 )ctx -> tagLen , ctx -> aad , (word32 )ctx -> aadLen );
14771477 if (rc != 0 ) {
1478- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesGcmEncrypt_ex failed with rc=%d" , rc );
1478+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesGcmEncrypt_ex failed with rc=%d" , rc );
14791479 ok = 0 ;
14801480 }
14811481 }
@@ -1757,7 +1757,7 @@ static int wp_aesccm_init(wp_AeadCtx* ctx, const unsigned char *key,
17571757 if (ok && (key != NULL )) {
17581758 rc = wc_AesCcmSetKey (& ctx -> aes , key , (word32 )keyLen );
17591759 if (rc != 0 ) {
1760- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesCcmSetKey failed with rc=%d" , rc );
1760+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesCcmSetKey failed with rc=%d" , rc );
17611761 ok = 0 ;
17621762 }
17631763 }
@@ -1867,15 +1867,15 @@ static int wp_aesccm_tls_cipher(wp_AeadCtx* ctx, unsigned char* out,
18671867 if (ctx -> enc ) {
18681868 rc = wc_AesCcmSetNonce (& ctx -> aes , ctx -> iv , (word32 )ctx -> ivLen );
18691869 if (rc != 0 ) {
1870- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesCcmSetNonce failed with rc=%d" , rc );
1870+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesCcmSetNonce failed with rc=%d" , rc );
18711871 ok = 0 ;
18721872 }
18731873 else {
18741874 rc = wc_AesCcmEncrypt_ex (& ctx -> aes , out , in , (word32 )len ,
18751875 ctx -> iv , (word32 )ctx -> ivLen , out + len , (word32 )ctx -> tagLen ,
18761876 ctx -> buf , (word32 )ctx -> tlsAadLen );
18771877 if (rc != 0 ) {
1878- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesCcmEncrypt_ex failed with rc=%d" , rc );
1878+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesCcmEncrypt_ex failed with rc=%d" , rc );
18791879 ok = 0 ;
18801880 }
18811881 }
@@ -1885,7 +1885,7 @@ static int wp_aesccm_tls_cipher(wp_AeadCtx* ctx, unsigned char* out,
18851885 (word32 )ctx -> ivLen , in + len , (word32 )ctx -> tagLen , ctx -> buf ,
18861886 (word32 )ctx -> tlsAadLen );
18871887 if (rc != 0 ) {
1888- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesCcmDecrypt failed with rc=%d" , rc );
1888+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesCcmDecrypt failed with rc=%d" , rc );
18891889 ok = 0 ;
18901890 }
18911891 }
@@ -1928,7 +1928,7 @@ static int wp_aesccm_encdec(wp_AeadCtx *ctx, unsigned char *out,
19281928 if (!ctx -> ivSet ) {
19291929 rc = wc_AesCcmSetNonce (& ctx -> aes , ctx -> iv , (word32 )ctx -> ivLen );
19301930 if (rc != 0 ) {
1931- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesCcmSetNonce failed with rc=%d" , rc );
1931+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesCcmSetNonce failed with rc=%d" , rc );
19321932 ok = 0 ;
19331933 }
19341934 }
@@ -1939,7 +1939,7 @@ static int wp_aesccm_encdec(wp_AeadCtx *ctx, unsigned char *out,
19391939 ctx -> iv , (word32 )ctx -> ivLen , ctx -> buf , (word32 )ctx -> tagLen ,
19401940 ctx -> aad , (word32 )ctx -> aadLen );
19411941 if (rc != 0 ) {
1942- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesCcmEncrypt_ex failed with rc=%d" , rc );
1942+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesCcmEncrypt_ex failed with rc=%d" , rc );
19431943 ok = 0 ;
19441944 }
19451945 }
@@ -1952,7 +1952,7 @@ static int wp_aesccm_encdec(wp_AeadCtx *ctx, unsigned char *out,
19521952 ctx -> authErr = 1 ;
19531953 }
19541954 if (rc != 0 ) {
1955- WOLFPROV_MSG ( WP_LOG_AES , "wc_AesCcmDecrypt failed with rc=%d" , rc );
1955+ WOLFPROV_MSG_DEBUG ( WP_LOG_DEBUG , "wc_AesCcmDecrypt failed with rc=%d" , rc );
19561956 ok = 0 ;
19571957 }
19581958 if (ok ) {
0 commit comments