mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
add SHA512 signature creation
This commit is contained in:
@@ -5985,7 +5985,7 @@ static int MakeSignature(const byte* buffer, int sz, byte* sig, int sigSz,
|
||||
int sigAlgoType)
|
||||
{
|
||||
int encSigSz, digestSz, typeH = 0, ret = 0;
|
||||
byte digest[SHA256_DIGEST_SIZE]; /* max size */
|
||||
byte digest[MAX_DIGEST_SIZE]; /* max size */
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
byte* encSig;
|
||||
#else
|
||||
@@ -6032,6 +6032,15 @@ static int MakeSignature(const byte* buffer, int sz, byte* sig, int sigSz,
|
||||
digestSz = SHA256_DIGEST_SIZE;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA512
|
||||
case CTC_SHA512wRSA:
|
||||
case CTC_SHA512wECDSA:
|
||||
if ((ret = wc_Sha512Hash(buffer, sz, digest)) == 0) {
|
||||
typeH = SHA256h;
|
||||
digestSz = SHA256_DIGEST_SIZE;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
WOLFSSL_MSG("MakeSignautre called with unsupported type");
|
||||
|
Reference in New Issue
Block a user