mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 11:17:29 +02:00
Add compile flag to disable Cert Sign key usage flag check.
This commit is contained in:
14
src/ssl.c
14
src/ssl.c
@@ -1497,13 +1497,15 @@ int AddCA(CYASSL_CERT_MANAGER* cm, buffer der, int type, int verify)
|
||||
CYASSL_MSG(" Can't add as CA if not actually one");
|
||||
ret = NOT_CA_ERROR;
|
||||
}
|
||||
else if (ret == 0 && cert.isCA == 1 && type != CYASSL_USER_CA &&
|
||||
#ifndef ALLOW_INVALID_CERTSIGN
|
||||
else if (ret == 0 && cert.isCA == 1 && type != CYASSL_USER_CA &&
|
||||
(cert.extKeyUsage & KEYUSE_KEY_CERT_SIGN) == 0) {
|
||||
/* Intermediate CA certs are required to have the keyCertSign
|
||||
* extension set. User loaded root certs are not. */
|
||||
CYASSL_MSG(" Doesn't have key usage certificate signing");
|
||||
ret = NOT_CA_ERROR;
|
||||
}
|
||||
/* Intermediate CA certs are required to have the keyCertSign
|
||||
* extension set. User loaded root certs are not. */
|
||||
CYASSL_MSG(" Doesn't have key usage certificate signing");
|
||||
ret = NOT_CA_ERROR;
|
||||
}
|
||||
#endif
|
||||
else if (ret == 0 && AlreadySigner(cm, subjectHash)) {
|
||||
CYASSL_MSG(" Already have this CA, not adding again");
|
||||
(void)ret;
|
||||
|
Reference in New Issue
Block a user