From e72dbd8e13cbf5a16faaa6c911af5507593dd836 Mon Sep 17 00:00:00 2001 From: Shane Lontis Date: Fri, 5 Mar 2021 08:22:56 +1000 Subject: Fix usages of const EVP_MD. Partially fixes #13837 Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/14474) --- include/crypto/x509.h | 4 ++++ include/openssl/ts.h | 1 + include/openssl/x509.h.in | 1 + 3 files changed, 6 insertions(+) (limited to 'include') diff --git a/include/crypto/x509.h b/include/crypto/x509.h index 09b1fb15e3..3ff903541f 100644 --- a/include/crypto/x509.h +++ b/include/crypto/x509.h @@ -81,6 +81,8 @@ struct X509_req_st { /* Set on live certificates for authentication purposes */ ASN1_OCTET_STRING *distinguishing_id; + OSSL_LIB_CTX *libctx; + char *propq; }; struct X509_crl_info_st { @@ -314,6 +316,8 @@ int ossl_x509_init_sig_info(X509 *x); int ossl_x509_set0_libctx(X509 *x, OSSL_LIB_CTX *libctx, const char *propq); int ossl_x509_crl_set0_libctx(X509_CRL *x, OSSL_LIB_CTX *libctx, const char *propq); +int ossl_x509_req_set0_libctx(X509_REQ *x, OSSL_LIB_CTX *libctx, + const char *propq); int ossl_asn1_item_digest_ex(const ASN1_ITEM *it, const EVP_MD *type, void *data, unsigned char *md, unsigned int *len, OSSL_LIB_CTX *libctx, const char *propq); diff --git a/include/openssl/ts.h b/include/openssl/ts.h index e88ad44cfd..2269573dcf 100644 --- a/include/openssl/ts.h +++ b/include/openssl/ts.h @@ -266,6 +266,7 @@ typedef struct TS_resp_ctx TS_RESP_CTX; /* Creates a response context that can be used for generating responses. */ TS_RESP_CTX *TS_RESP_CTX_new(void); +TS_RESP_CTX *TS_RESP_CTX_new_ex(OSSL_LIB_CTX *libctx, const char *propq); void TS_RESP_CTX_free(TS_RESP_CTX *ctx); /* This parameter must be set. */ diff --git a/include/openssl/x509.h.in b/include/openssl/x509.h.in index 32aea0e0db..50d8712e41 100644 --- a/include/openssl/x509.h.in +++ b/include/openssl/x509.h.in @@ -579,6 +579,7 @@ void X509_SIG_getm(X509_SIG *sig, X509_ALGOR **palg, DECLARE_ASN1_FUNCTIONS(X509_REQ_INFO) DECLARE_ASN1_FUNCTIONS(X509_REQ) +X509_REQ *X509_REQ_new_ex(OSSL_LIB_CTX *libctx, const char *propq); DECLARE_ASN1_FUNCTIONS(X509_ATTRIBUTE) X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value); -- cgit v1.2.3