Latest update.

This commit is contained in:
2018-12-26 08:58:54 +09:00
parent 7cd0ce9c1d
commit 5b465b332e
164 changed files with 642 additions and 534 deletions
+4
View File
@@ -174,6 +174,10 @@ const char *X509_verify_cert_error_string(long n)
return "OCSP verification failed";
case X509_V_ERR_OCSP_CERT_UNKNOWN:
return "OCSP unknown cert";
case X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH:
return "Subject signature algorithm and issuer public key algorithm mismatch";
case X509_V_ERR_NO_ISSUER_PUBLIC_KEY:
return "Issuer certificate doesn't have a public key";
default:
/* Printing an error number into a static buffer is not thread-safe */
+9 -2
View File
@@ -3232,12 +3232,19 @@ static int check_key_level(X509_STORE_CTX *ctx, X509 *cert)
EVP_PKEY *pkey = X509_get0_pubkey(cert);
int level = ctx->param->auth_level;
/*
* At security level zero, return without checking for a supported public
* key type. Some engines support key types not understood outside the
* engine, and we only need to understand the key when enforcing a security
* floor.
*/
if (level <= 0)
return 1;
/* Unsupported or malformed keys are not secure */
if (pkey == NULL)
return 0;
if (level <= 0)
return 1;
if (level > NUM_AUTH_LEVELS)
level = NUM_AUTH_LEVELS;