forked from wolfSSL/wolfssl
Fixes/improvements to the signature and hash wrappers:
Fixed output buffer to wc_RsaSSL_Verify so its min size is the key size (needed for inline operations). Fixed the signature wrapper return codes when using RSA so 0 indicates success. Fixed signature wrappers use of wc_HashGetDigestSize to return the error code result. Changed enum wc_HashType and enum wc_SignatureType so all values always exist. Added new "wc_HashGetOID" which returns the OID for an enum wc_HashType. Added new "WC_SIGNATURE_TYPE_RSA_W_ENC", that adds the encoded ASN header to the digest using wc_EncodeSignature for RSA signatures. Added new SIG_TYPE_E and HASH_TYPE_E error types for explicit reporting of sig/hash type not available.
This commit is contained in:
@@ -367,6 +367,12 @@ const char* wc_GetErrorString(int error)
|
||||
case BAD_COND_E:
|
||||
return "Bad condition variable operation error";
|
||||
|
||||
case SIG_TYPE_E:
|
||||
return "Signature type not enabled/available";
|
||||
|
||||
case HASH_TYPE_E:
|
||||
return "Hash type not enabled/available";
|
||||
|
||||
default:
|
||||
return "unknown error number";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user