mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Merge pull request #2682 from SparkiDev/akid_name_check
Check name hash after matching AKID
This commit is contained in:
@ -8677,12 +8677,17 @@ int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm)
|
||||
} else {
|
||||
cert->ca = NULL;
|
||||
#ifndef NO_SKID
|
||||
if (cert->extAuthKeyIdSet)
|
||||
if (cert->extAuthKeyIdSet) {
|
||||
cert->ca = GetCA(cm, cert->extAuthKeyId);
|
||||
}
|
||||
if (cert->ca == NULL && cert->extSubjKeyIdSet \
|
||||
&& verify != VERIFY_OCSP) {
|
||||
cert->ca = GetCA(cm, cert->extSubjKeyId);
|
||||
}
|
||||
if (cert->ca != NULL && XMEMCMP(cert->issuerHash,
|
||||
cert->ca->subjectNameHash, KEYID_SIZE) != 0) {
|
||||
cert->ca = NULL;
|
||||
}
|
||||
if (cert->ca == NULL)
|
||||
cert->ca = GetCAByName(cm, cert->issuerHash);
|
||||
|
||||
@ -8777,6 +8782,10 @@ int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm)
|
||||
&& verify != VERIFY_OCSP) {
|
||||
cert->ca = GetCA(cm, cert->extSubjKeyId);
|
||||
}
|
||||
if (cert->ca != NULL && XMEMCMP(cert->issuerHash,
|
||||
cert->ca->subjectNameHash, KEYID_SIZE) != 0) {
|
||||
cert->ca = NULL;
|
||||
}
|
||||
if (cert->ca == NULL)
|
||||
cert->ca = GetCAByName(cm, cert->issuerHash);
|
||||
|
||||
|
Reference in New Issue
Block a user