mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Merge pull request #6168 from anhu/WOLFSSL_RELAXED_ASN_PARSING
Relaxed parsing of explicit ECC public key
This commit is contained in:
@ -31143,11 +31143,13 @@ static int EccSpecifiedECDomainDecode(const byte* input, word32 inSz,
|
|||||||
if ((ret == 0) && (version < 1 || version > 3)) {
|
if ((ret == 0) && (version < 1 || version > 3)) {
|
||||||
ret = ASN_PARSE_E;
|
ret = ASN_PARSE_E;
|
||||||
}
|
}
|
||||||
|
#ifndef WOLFSSL_NO_ASN_STRICT
|
||||||
/* Only version 2 and above can have a seed. */
|
/* Only version 2 and above can have a seed. */
|
||||||
if ((ret == 0) && (dataASN[ECCSPECIFIEDASN_IDX_PARAM_SEED].tag != 0) &&
|
if ((ret == 0) && (dataASN[ECCSPECIFIEDASN_IDX_PARAM_SEED].tag != 0) &&
|
||||||
(version < 2)) {
|
(version < 2)) {
|
||||||
ret = ASN_PARSE_E;
|
ret = ASN_PARSE_E;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/* Only version 2 and above can have a hash algorithm. */
|
/* Only version 2 and above can have a hash algorithm. */
|
||||||
if ((ret == 0) && (dataASN[ECCSPECIFIEDASN_IDX_HASH_SEQ].tag != 0) &&
|
if ((ret == 0) && (dataASN[ECCSPECIFIEDASN_IDX_HASH_SEQ].tag != 0) &&
|
||||||
(version < 2)) {
|
(version < 2)) {
|
||||||
|
Reference in New Issue
Block a user