Add X509 related libctx changes.
authorShane Lontis <shane.lontis@oracle.com>
Fri, 24 Jul 2020 12:53:27 +0000 (22:53 +1000)
committerShane Lontis <shane.lontis@oracle.com>
Fri, 24 Jul 2020 12:53:27 +0000 (22:53 +1000)
commit6725682d77510bf6d499957897d7be124d603f40
tree447e5bce5607b4873f7f018df1b2e4c21a394e92
parentae89578be2930c726d6ef56451233757a89f224f
Add X509 related libctx changes.

- In order to not add many X509_XXXX_with_libctx() functions the libctx and propq may be stored in the X509 object via a call to X509_new_with_libctx().
- Loading via PEM_read_bio_X509() or d2i_X509() should pass in a created cert using X509_new_with_libctx().
- Renamed some XXXX_ex() to XXX_with_libctx() for X509 API's.
- Removed the extra parameters in check_purpose..
- X509_digest() has been modified so that it expects a const EVP_MD object() and then internally it does the fetch when it needs to (via ASN1_item_digest_with_libctx()).
- Added API's that set the libctx when they load such as X509_STORE_new_with_libctx() so that the cert chains can be verified.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12153)
64 files changed:
apps/ca.c
apps/include/apps.h
apps/lib/apps.c
apps/req.c
apps/storeutl.c
apps/ts.c
apps/x509.c
crypto/asn1/a_digest.c
crypto/ess/ess_lib.c
crypto/pem/pem_info.c
crypto/pem/pem_pkey.c
crypto/store/loader_file.c
crypto/store/store_lib.c
crypto/store/store_local.h
crypto/store/store_register.c
crypto/x509/by_dir.c
crypto/x509/by_file.c
crypto/x509/by_store.c
crypto/x509/v3_purp.c
crypto/x509/x509_d2.c
crypto/x509/x509_local.h
crypto/x509/x509_lu.c
crypto/x509/x509_vfy.c
crypto/x509/x_all.c
crypto/x509/x_x509.c
doc/man3/OSSL_STORE_LOADER.pod
doc/man3/OSSL_STORE_attach.pod
doc/man3/OSSL_STORE_open.pod
doc/man3/PEM_X509_INFO_read_bio_with_libctx.pod [new file with mode: 0644]
doc/man3/PEM_read_bio_PrivateKey.pod
doc/man3/SSL_load_client_CA_file.pod
doc/man3/X509_LOOKUP.pod
doc/man3/X509_LOOKUP_hash_dir.pod
doc/man3/X509_STORE_add_cert.pod
doc/man3/X509_STORE_new.pod
doc/man3/X509_new.pod
doc/man3/X509_sign.pod
doc/man3/X509_verify.pod
doc/man3/X509v3_cache_extensions.pod [deleted file]
doc/man7/x509.pod
include/crypto/store.h
include/crypto/x509.h
include/openssl/pem.h
include/openssl/ssl.h
include/openssl/store.h
include/openssl/x509.h
include/openssl/x509_vfy.h
include/openssl/x509v3.h
ssl/s3_lib.c
ssl/ssl_cert.c
ssl/ssl_conf.c
ssl/ssl_lib.c
ssl/ssl_mcnf.c
ssl/ssl_rsa.c
ssl/statem/statem_clnt.c
ssl/statem/statem_srvr.c
test/ssl_test.c
test/ssl_test_ctx.c
test/ssl_test_ctx.h
test/ssl_test_ctx_test.c
test/sslapitest.c
util/libcrypto.num
util/libssl.num
util/other.syms