diff --git a/src/ssl.c b/src/ssl.c index e8431550b..34de9cdd8 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -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); diff --git a/wolfcrypt/src/error.c b/wolfcrypt/src/error.c index 37b78422a..b8339eec0 100644 --- a/wolfcrypt/src/error.c +++ b/wolfcrypt/src/error.c @@ -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"; diff --git a/wolfssl/wolfcrypt/error-crypt.h b/wolfssl/wolfcrypt/error-crypt.h index 7a1100bcf..b26f6c3f7 100644 --- a/wolfssl/wolfcrypt/error-crypt.h +++ b/wolfssl/wolfcrypt/error-crypt.h @@ -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 */ };