diff --git a/src/ssl.c b/src/ssl.c index a5b0f7580..582e9660c 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -13311,14 +13311,14 @@ int wolfSSL_RSA_sign(int type, const unsigned char* m, } switch (type) { - case NID_md2: break; - case NID_md5: break; - case NID_sha1: break; - case NID_sha256: break; - case NID_sha384: break; - case NID_sha512: break; + case NID_md2: type = MD2h; break; + case NID_md5: type = MD5h; break; + case NID_sha1: type = SHAh; break; + case NID_sha256: type = SHA256h; break; + case NID_sha384: type = SHA384h; break; + case NID_sha512: type = SHA512h; break; default: - WOLFSSL_MSG("This NID_ is not yet implemented"); + WOLFSSL_MSG("This NID (md type) is not yet implemented"); return 0; } @@ -13364,16 +13364,6 @@ int wolfSSL_RSA_sign(int type, const unsigned char* m, if (rng) { - switch (type) { - case NID_md2: type = MD2h; break; - case NID_md5: type = MD5h; break; - case NID_sha1: type = SHAh; break; - case NID_sha256: type = SHA256h; break; - case NID_sha384: type = SHA384h; break; - case NID_sha512: type = SHA512h; break; - /* no default, already checked if NID is supported */ - } - signSz = wc_EncodeSignature(encodedSig, m, mLen, type); if (signSz == 0) { WOLFSSL_MSG("Bad Encode Signature");