Providing missing accessor to EVP_PKEY.engine
authorDmitry Belyavskiy <beldmit@gmail.com>
Mon, 25 Feb 2019 15:02:33 +0000 (18:02 +0300)
committerMatt Caswell <matt@openssl.org>
Tue, 19 Mar 2019 10:42:33 +0000 (10:42 +0000)
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8329)

crypto/evp/p_lib.c
include/openssl/evp.h
util/libcrypto.num

index 9a882e9eecab741879128562bb2caee1c00ce57e..c6ebfe6462d01ea5284ff9d4d34aeb2699010f54 100644 (file)
@@ -396,6 +396,11 @@ int EVP_PKEY_set1_engine(EVP_PKEY *pkey, ENGINE *e)
     pkey->pmeth_engine = e;
     return 1;
 }
+
+ENGINE *EVP_PKEY_get0_engine(const EVP_PKEY *pkey)
+{
+    return pkey->engine;
+}
 #endif
 int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key)
 {
index 72060e7e969807e689c750c8085e547a3d1c28fd..ca7655d5e45a0cb2ff9e66c688bbcf509c3d987f 100644 (file)
@@ -1055,6 +1055,7 @@ int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len);
 int EVP_PKEY_set_alias_type(EVP_PKEY *pkey, int type);
 # ifndef OPENSSL_NO_ENGINE
 int EVP_PKEY_set1_engine(EVP_PKEY *pkey, ENGINE *e);
+ENGINE *EVP_PKEY_get0_engine(const EVP_PKEY *pkey);
 # endif
 int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
 void *EVP_PKEY_get0(const EVP_PKEY *pkey);
index 711ccd92a3094c8d794d1b757b21079190a44d8c..bf14bbd28d620134466d39d3dc5a8c620e477f0d 100644 (file)
@@ -4790,3 +4790,4 @@ OSSL_PARAM_get_octet_ptr                4737      3_0_0   EXIST::FUNCTION:
 OSSL_PARAM_set_octet_ptr                4738   3_0_0   EXIST::FUNCTION:
 X509_set_sm2_id                         4739   3_0_0   EXIST::FUNCTION:SM2
 X509_get0_sm2_id                        4740   3_0_0   EXIST::FUNCTION:SM2
+EVP_PKEY_get0_engine                    4741   3_0_0   EXIST::FUNCTION:ENGINE