mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Fix cryptodev debug output
Cryptodev has two sections for the session info struct, cipher and hash. Our debug mode was using hash for the output even if we were using cipher, so would output random data. Simple 'if' statement to do the correct thing.
This commit is contained in:
@ -175,8 +175,13 @@ int wc_DevCryptoCreate(WC_CRYPTODEV* ctx, int type, byte* key, word32 keySz)
|
||||
WOLFSSL_MSG("Error getting session info");
|
||||
return WC_DEVCRYPTO_E;
|
||||
}
|
||||
printf("Using %s with driver %s\n", sesInfo.hash_info.cra_name,
|
||||
sesInfo.hash_info.cra_driver_name);
|
||||
if (ctx->sess.cipher == 0) {
|
||||
printf("Using %s with driver %s\n", sesInfo.hash_info.cra_name,
|
||||
sesInfo.hash_info.cra_driver_name);
|
||||
} else {
|
||||
printf("Using %s with driver %s\n", sesInfo.cipher_info.cra_name,
|
||||
sesInfo.cipher_info.cra_driver_name);
|
||||
}
|
||||
#endif
|
||||
(void)key;
|
||||
(void)keySz;
|
||||
|
Reference in New Issue
Block a user