mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 12:44:45 +02:00
Merge pull request #2304 from SparkiDev/tls_sha224
Support to TLS for RSA SHA-224 signatures
This commit is contained in:
@@ -2077,6 +2077,9 @@ void InitSuitesHashSigAlgo(Suites* suites, int haveECDSAsig, int haveRSAsig,
|
||||
#ifndef NO_SHA256
|
||||
AddSuiteHashSigAlgo(suites, sha256_mac, rsa_sa_algo, keySz, &idx);
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA224
|
||||
AddSuiteHashSigAlgo(suites, sha224_mac, rsa_sa_algo, keySz, &idx);
|
||||
#endif
|
||||
#if !defined(NO_SHA) && (!defined(NO_OLD_TLS) || \
|
||||
defined(WOLFSSL_ALLOW_TLS_SHA1))
|
||||
AddSuiteHashSigAlgo(suites, sha_mac, rsa_sa_algo, keySz, &idx);
|
||||
@@ -3044,6 +3047,10 @@ static enum wc_HashType HashAlgoToType(int hashAlgo)
|
||||
case sha256_mac:
|
||||
return WC_HASH_TYPE_SHA256;
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA224
|
||||
case sha224_mac:
|
||||
return WC_HASH_TYPE_SHA224;
|
||||
#endif
|
||||
#if !defined(NO_SHA) && (!defined(NO_OLD_TLS) || \
|
||||
defined(WOLFSSL_ALLOW_TLS_SHA1))
|
||||
case sha_mac:
|
||||
@@ -3248,6 +3255,10 @@ static int TypeHash(int hashAlgo)
|
||||
case sha256_mac:
|
||||
return SHA256h;
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA224
|
||||
case sha224_mac:
|
||||
return SHA224h;
|
||||
#endif
|
||||
#ifndef NO_SHA
|
||||
case sha_mac:
|
||||
return SHAh;
|
||||
@@ -16982,6 +16993,9 @@ void PickHashSigAlgo(WOLFSSL* ssl, const byte* hashSigAlgo,
|
||||
/* pick highest available between both server and client */
|
||||
switch (hashAlgo) {
|
||||
case sha_mac:
|
||||
#ifdef WOLFSSL_SHA224
|
||||
case sha224_mac:
|
||||
#endif
|
||||
#ifndef NO_SHA256
|
||||
case sha256_mac:
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user