add error code for wolfCrypt_Cleanup

pull/701/head
Jacob Barthelmeh 2017-02-06 14:51:55 -07:00
parent 0f91542cf4
commit 53bebb4785
3 changed files with 5 additions and 0 deletions

View File

@ -8296,6 +8296,7 @@ int wolfSSL_Cleanup(void)
if (wolfCrypt_Cleanup() != 0) { if (wolfCrypt_Cleanup() != 0) {
WOLFSSL_MSG("Error with wolfCrypt_Cleanup call"); WOLFSSL_MSG("Error with wolfCrypt_Cleanup call");
ret = WC_CLEANUP_E;
} }
return ret; return ret;

View File

@ -407,6 +407,9 @@ const char* wc_GetErrorString(int error)
case BAD_KEYWRAP_IV_E: case BAD_KEYWRAP_IV_E:
return "Decrypted AES key wrap IV does not match expected"; return "Decrypted AES key wrap IV does not match expected";
case WC_CLEANUP_E:
return "wolfcrypt cleanup failed";
default: default:
return "unknown error number"; return "unknown error number";

View File

@ -180,6 +180,7 @@ enum {
BAD_KEYWRAP_ALG_E = -239, BAD_KEYWRAP_ALG_E = -239,
BAD_KEYWRAP_IV_E = -240, /* Decrypted AES key wrap IV incorrect */ BAD_KEYWRAP_IV_E = -240, /* Decrypted AES key wrap IV incorrect */
WC_CLEANUP_E = -241, /* wolfcrypt cleanup failed */
MIN_CODE_E = -300 /* errors -101 - -299 */ MIN_CODE_E = -300 /* errors -101 - -299 */