mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
Changes suggested by SparkiDev.
This commit is contained in:
@@ -3781,6 +3781,7 @@ void InitSuites(Suites* suites, ProtocolVersion pv, int keySz, word16 haveRSA,
|
|||||||
*/
|
*/
|
||||||
static WC_INLINE void DecodeSigAlg(const byte* input, byte* hashAlgo, byte* hsType)
|
static WC_INLINE void DecodeSigAlg(const byte* input, byte* hashAlgo, byte* hsType)
|
||||||
{
|
{
|
||||||
|
*hsType = invalid_sa_algo;
|
||||||
switch (input[0]) {
|
switch (input[0]) {
|
||||||
case NEW_SA_MAJOR:
|
case NEW_SA_MAJOR:
|
||||||
#ifdef HAVE_ED25519
|
#ifdef HAVE_ED25519
|
||||||
@@ -3820,7 +3821,8 @@ static WC_INLINE void DecodeSigAlg(const byte* input, byte* hashAlgo, byte* hsTy
|
|||||||
*hsType = falcon_level1_sa_algo;
|
*hsType = falcon_level1_sa_algo;
|
||||||
/* Hash performed as part of sign/verify operation. */
|
/* Hash performed as part of sign/verify operation. */
|
||||||
*hashAlgo = sha512_mac;
|
*hashAlgo = sha512_mac;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
if (input[1] == FALCON_LEVEL5_SA_MINOR) {
|
if (input[1] == FALCON_LEVEL5_SA_MINOR) {
|
||||||
*hsType = falcon_level5_sa_algo;
|
*hsType = falcon_level5_sa_algo;
|
||||||
/* Hash performed as part of sign/verify operation. */
|
/* Hash performed as part of sign/verify operation. */
|
||||||
@@ -24450,7 +24452,7 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
|
|||||||
#else
|
#else
|
||||||
enum wc_HashType hashType;
|
enum wc_HashType hashType;
|
||||||
word16 verifySz;
|
word16 verifySz;
|
||||||
byte sigAlgo = 0xFF;
|
byte sigAlgo;
|
||||||
|
|
||||||
if (ssl->options.usingAnon_cipher) {
|
if (ssl->options.usingAnon_cipher) {
|
||||||
break;
|
break;
|
||||||
|
@@ -3151,7 +3151,8 @@ enum SignatureAlgorithm {
|
|||||||
rsa_pss_pss_algo = 10,
|
rsa_pss_pss_algo = 10,
|
||||||
ed448_sa_algo = 11,
|
ed448_sa_algo = 11,
|
||||||
falcon_level1_sa_algo = 12,
|
falcon_level1_sa_algo = 12,
|
||||||
falcon_level5_sa_algo = 13
|
falcon_level5_sa_algo = 13,
|
||||||
|
invalid_sa_algo = 255
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PSS_RSAE_TO_PSS_PSS(macAlgo) \
|
#define PSS_RSAE_TO_PSS_PSS(macAlgo) \
|
||||||
|
Reference in New Issue
Block a user