update const error strings for newly added ones

This commit is contained in:
toddouska 2014-05-14 15:05:20 -07:00
parent 519820133d
commit ce39ef62ef
3 changed files with 12 additions and 21 deletions

View File

@ -32,7 +32,7 @@
#pragma warning(disable: 4996)
#endif
const char *CTaoCryptGetErrorString(int error)
const char* CTaoCryptGetErrorString(int error)
{
#ifdef NO_ERROR_STRINGS
@ -191,8 +191,7 @@ const char *CTaoCryptGetErrorString(int error)
return "ASN NTRU key decode error, invalid input";
case ASN_CRIT_EXT_E:
XSTRNCPY(buffer, "X.509 Critical extension ignored", max);
break;
return "X.509 Critical extension ignored";
case ECC_BAD_ARG_E :
return "ECC input argument wrong type, invalid input";
@ -261,24 +260,19 @@ const char *CTaoCryptGetErrorString(int error)
return "Bad padding, message wrong length";
case REQ_ATTRIBUTE_E:
XSTRNCPY(buffer, "Setting cert request attributes error", max);
break;
return "Setting cert request attributes error";
case PKCS7_OID_E:
XSTRNCPY(buffer, "PKCS#7 error: mismatched OID value", max);
break;
return "PKCS#7 error: mismatched OID value";
case PKCS7_RECIP_E:
XSTRNCPY(buffer, "PKCS#7 error: no matching recipient found", max);
break;
return "PKCS#7 error: no matching recipient found";
case FIPS_NOT_ALLOWED_E:
XSTRNCPY(buffer, "FIPS mode not allowed error", max);
break;
return "FIPS mode not allowed error";
case ASN_NAME_INVALID_E:
XSTRNCPY(buffer, "Name Constraint error", max);
break;
return "Name Constraint error";
default:
return "unknown error number";

View File

@ -130,7 +130,7 @@ enum {
CYASSL_API void CTaoCryptErrorString(int err, char* buff);
CYASSL_API const char *CTaoCryptGetErrorString(int error);
CYASSL_API const char* CTaoCryptGetErrorString(int error);
#ifdef __cplusplus

View File

@ -6206,7 +6206,7 @@ const char* CyaSSL_ERR_reason_error_string(unsigned long e)
#else
int error = (long) e;
int error = (int)e;
/* pass to CTaoCrypt */
if (error < MAX_CODE_E && error > MIN_CODE_E) {
@ -6465,16 +6465,13 @@ const char* CyaSSL_ERR_reason_error_string(unsigned long e)
return "Unrecognized host name Error";
case KEYUSE_SIGNATURE_E:
XSTRNCPY(str, "Key Use digitalSignature not set Error", max);
break;
return "Key Use digitalSignature not set Error";
case KEYUSE_ENCIPHER_E:
XSTRNCPY(str, "Key Use keyEncipherment not set Error", max);
break;
return "Key Use keyEncipherment not set Error";
case EXTKEYUSE_AUTH_E:
XSTRNCPY(str, "Ext Key Use server/client auth not set Error", max);
break;
return "Ext Key Use server/client auth not set Error";
default :
return "unknown error number";