mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
in DecodeAltNames, skip unknown name types, don't treat as error
This commit is contained in:
@@ -2936,8 +2936,17 @@ static int DecodeAltNames(byte* input, int sz, DecodedCert* cert)
|
|||||||
}
|
}
|
||||||
#endif /* CYASSL_SEP */
|
#endif /* CYASSL_SEP */
|
||||||
else {
|
else {
|
||||||
CYASSL_MSG("\tNot DNS type");
|
int strLen;
|
||||||
return ASN_PARSE_E;
|
word32 lenStartIdx = idx;
|
||||||
|
|
||||||
|
CYASSL_MSG("\tUnsupported name type, skipping");
|
||||||
|
|
||||||
|
if (GetLength(input, &idx, &strLen, sz) < 0) {
|
||||||
|
CYASSL_MSG("\tfail: unsupported name length");
|
||||||
|
return ASN_PARSE_E;
|
||||||
|
}
|
||||||
|
length -= (strLen + idx - lenStartIdx);
|
||||||
|
idx += strLen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user