add missing error strings

This commit is contained in:
toddouska
2015-11-02 12:18:12 -08:00
parent b13ae543ec
commit a1d1155b0c
3 changed files with 26 additions and 2 deletions

View File

@@ -2357,7 +2357,7 @@ int wolfSSL_Init(void)
/* Initialize crypto for use with TLS connection */
if (wolfcrypt_Init() != 0)
ret = WC_FAILURE_E;
ret = WC_INIT_E;
initRefCount++;
UnLockMutex(&count_mutex);

View File

@@ -337,6 +337,30 @@ const char* wc_GetErrorString(int error)
case SRP_BAD_KEY_E:
return "SRP bad key values error";
case ASN_NO_SKID:
return "ASN no Subject Key Identifier found error";
case ASN_NO_AKID:
return "ASN no Authority Key Identifier found error";
case ASN_NO_KEYUSAGE:
return "ASN no Key Usage found error";
case SKID_E:
return "Setting Subject Key Identifier error";
case AKID_E:
return "Setting Authority Key Identifier error";
case KEYUSAGE_E:
return "Bad Key Usage value error";
case CERTPOLICIES_E:
return "Setting Certificate Policies error";
case WC_INIT_E:
return "wolfCrypt Initialize Failure error";
default:
return "unknown error number";

View File

@@ -161,7 +161,7 @@ enum {
KEYUSAGE_E = -226, /* Bad Key Usage value */
CERTPOLICIES_E = -227, /* setting Certificate Policies error */
WC_FAILURE_E = -228, /* wolfcrypt failed to initialize */
WC_INIT_E = -228, /* wolfcrypt failed to initialize */
MIN_CODE_E = -300 /* errors -101 - -299 */
};