From: Dr. David von Oheimb Date: Fri, 14 Apr 2023 11:09:01 +0000 (+0200) Subject: OSSL_CRMF_CERTTEMPLATE_get0_publicKey(): fix return type and doc X-Git-Tag: openssl-3.2.0-alpha1~1001 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=09f30b0c96e39e3a07f8e6854c5468332534c585;p=thirdparty%2Fopenssl.git OSSL_CRMF_CERTTEMPLATE_get0_publicKey(): fix return type and doc Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale Reviewed-by: David von Oheimb (Merged from https://github.com/openssl/openssl/pull/20736) --- diff --git a/crypto/crmf/crmf_lib.c b/crypto/crmf/crmf_lib.c index e57192fc83c..86152ee247b 100644 --- a/crypto/crmf/crmf_lib.c +++ b/crypto/crmf/crmf_lib.c @@ -541,7 +541,7 @@ int OSSL_CRMF_MSGS_verify_popo(const OSSL_CRMF_MSGS *reqs, return 1; } -const X509_PUBKEY +X509_PUBKEY *OSSL_CRMF_CERTTEMPLATE_get0_publicKey(const OSSL_CRMF_CERTTEMPLATE *tmpl) { return tmpl != NULL ? tmpl->publicKey : NULL; diff --git a/doc/man3/OSSL_CRMF_MSG_get0_tmpl.pod b/doc/man3/OSSL_CRMF_MSG_get0_tmpl.pod index 6260b33fc28..48eda2c2ba8 100644 --- a/doc/man3/OSSL_CRMF_MSG_get0_tmpl.pod +++ b/doc/man3/OSSL_CRMF_MSG_get0_tmpl.pod @@ -19,7 +19,7 @@ OSSL_CRMF_MSG_get_certReqId #include OSSL_CRMF_CERTTEMPLATE *OSSL_CRMF_MSG_get0_tmpl(const OSSL_CRMF_MSG *crm); - const X509_PUBKEY + X509_PUBKEY *OSSL_CRMF_CERTTEMPLATE_get0_publicKey(const OSSL_CRMF_CERTTEMPLATE *tmpl); const X509_NAME *OSSL_CRMF_CERTTEMPLATE_get0_subject(const OSSL_CRMF_CERTTEMPLATE *tmpl); @@ -91,6 +91,8 @@ RFC 4211 The OpenSSL CRMF support was added in OpenSSL 3.0. +OSSL_CRMF_CERTTEMPLATE_get0_publicKey() was added in OpenSSL 3.2. + =head1 COPYRIGHT Copyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved. diff --git a/include/openssl/crmf.h.in b/include/openssl/crmf.h.in index 0b359870dbd..f5fe1ace4ed 100644 --- a/include/openssl/crmf.h.in +++ b/include/openssl/crmf.h.in @@ -151,7 +151,7 @@ int OSSL_CRMF_MSGS_verify_popo(const OSSL_CRMF_MSGS *reqs, int rid, int acceptRAVerified, OSSL_LIB_CTX *libctx, const char *propq); OSSL_CRMF_CERTTEMPLATE *OSSL_CRMF_MSG_get0_tmpl(const OSSL_CRMF_MSG *crm); -const X509_PUBKEY +X509_PUBKEY *OSSL_CRMF_CERTTEMPLATE_get0_publicKey(const OSSL_CRMF_CERTTEMPLATE *tmpl); const X509_NAME *OSSL_CRMF_CERTTEMPLATE_get0_subject(const OSSL_CRMF_CERTTEMPLATE *tmpl);