openssl/crypto/x509
Ken Goldman ea7d2c5808 Admit unknown pkey types at security level 0
The check_key_level() function currently fails when the public key
cannot be extracted from the certificate because its algorithm is not
supported.  However, the public key is not needed for the last
certificate in the chain.

This change moves the check for level 0 before the check for a
non-NULL public key.

For background, this is the TPM 1.2 endorsement key certificate.
I.e., this is a real application with millions of certificates issued.
The key is an RSA-2048 key.

The TCG (for a while) specified

     Public Key Algorithm: rsaesOaep

rather than the commonly used

     Public Key Algorithm: rsaEncryption

because the key is an encryption key rather than a signing key.
The X509 certificate parser fails to get the public key.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7906)
2018-12-20 03:10:55 -05:00
..
build.info Add APIs for custom X509_LOOKUP_METHOD creation 2018-05-30 15:45:48 +02:00
by_dir.c Use secure_getenv(3) when available. 2018-09-24 11:22:22 +10:00
by_file.c Use secure_getenv(3) when available. 2018-09-24 11:22:22 +10:00
t_crl.c
t_req.c
t_x509.c
x509_att.c
x509_cmp.c Update copyright year 2018-05-29 13:16:04 +01:00
x509_d2.c
x509_def.c
x509_err.c Add APIs for custom X509_LOOKUP_METHOD creation 2018-05-30 15:45:48 +02:00
x509_ext.c
x509_lcl.h Update copyright year 2018-06-20 15:29:23 +01:00
x509_lu.c Harmonize use of sk_TYPE_find's return value. 2018-08-07 08:56:54 +02:00
x509_meth.c Avoid shadowing 'free' in X509_LOOKUP_met_set_free 2018-08-17 13:57:23 -05:00
x509_obj.c
x509_r2x.c
x509_req.c
x509_set.c
x509_trs.c Update copyright year 2018-09-11 13:45:17 +01:00
x509_txt.c
x509_v3.c Update copyright year 2018-02-27 13:59:42 +00:00
x509_vfy.c Admit unknown pkey types at security level 0 2018-12-20 03:10:55 -05:00
x509_vpm.c Harmonize use of sk_TYPE_find's return value. 2018-08-07 08:56:54 +02:00
x509cset.c
x509name.c x509/x509name.c: fix potential crash in X509_NAME_get_text_by_OBJ. 2018-08-07 08:56:17 +02:00
x509rset.c
x509spki.c
x509type.c Add support for RSA-PSS to X509_certificate_type() 2018-06-11 11:03:23 +01:00
x_all.c
x_attrib.c
x_crl.c Harmonize use of sk_TYPE_find's return value. 2018-08-07 08:56:54 +02:00
x_exten.c
x_name.c Restore check of |*xn| against |name| in X509_NAME_set 2018-05-20 09:48:58 +02:00
x_pubkey.c Update copyright year 2018-05-01 13:34:30 +01:00
x_req.c
x_x509.c Update copyright year 2018-05-01 13:34:30 +01:00
x_x509a.c