mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-26 14:52:21 +01:00
Allow the keyCertSign bit to be asserted specifically for self-signed CAs.
This commit is contained in:
@@ -25810,7 +25810,11 @@ int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm,
|
||||
* If the cA boolean is not asserted, then the keyCertSign bit in the
|
||||
* key usage extension MUST NOT be asserted. */
|
||||
if (!cert->isCA && cert->extKeyUsageSet &&
|
||||
(cert->extKeyUsage & KEYUSE_KEY_CERT_SIGN) != 0) {
|
||||
(cert->extKeyUsage & KEYUSE_KEY_CERT_SIGN) != 0
|
||||
#ifdef ALLOW_SELFSIGNED_INVALID_CERTSIGN
|
||||
&& !cert->selfSigned
|
||||
#endif
|
||||
) {
|
||||
WOLFSSL_ERROR_VERBOSE(KEYUSAGE_E);
|
||||
return KEYUSAGE_E;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user