mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
OID
1. When checking an OID sum against an OID string based on context, skip the unknown OIDs instead of treating them as parse errors. 2. When getting an OID, pass the lower error upstream instead of just PARSE error.
This commit is contained in:
@ -6437,9 +6437,9 @@ static int DecodeKeyUsage(byte* input, int sz, DecodedCert* cert)
|
|||||||
static int DecodeExtKeyUsage(byte* input, int sz, DecodedCert* cert)
|
static int DecodeExtKeyUsage(byte* input, int sz, DecodedCert* cert)
|
||||||
{
|
{
|
||||||
word32 idx = 0, oid;
|
word32 idx = 0, oid;
|
||||||
int length;
|
int length, ret;
|
||||||
|
|
||||||
WOLFSSL_ENTER("DecodeExtKeyUsage");
|
WOLFSSL_MSG("DecodeExtKeyUsage");
|
||||||
|
|
||||||
if (GetSequence(input, &idx, &length, sz) < 0) {
|
if (GetSequence(input, &idx, &length, sz) < 0) {
|
||||||
WOLFSSL_MSG("\tfail: should be a SEQUENCE");
|
WOLFSSL_MSG("\tfail: should be a SEQUENCE");
|
||||||
@ -6452,8 +6452,11 @@ static int DecodeExtKeyUsage(byte* input, int sz, DecodedCert* cert)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
while (idx < (word32)sz) {
|
while (idx < (word32)sz) {
|
||||||
if (GetObjectId(input, &idx, &oid, oidCertKeyUseType, sz) < 0)
|
ret = GetObjectId(input, &idx, &oid, oidCertKeyUseType, sz);
|
||||||
return ASN_PARSE_E;
|
if (ret == ASN_UNKNOWN_OID_E)
|
||||||
|
continue;
|
||||||
|
else if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
switch (oid) {
|
switch (oid) {
|
||||||
case EKU_ANY_OID:
|
case EKU_ANY_OID:
|
||||||
|
Reference in New Issue
Block a user