EVP_PKEY_ASN1_METHOD: add functions to set siginf_set and pkey_check methods
authorRichard Levitte <levitte@openssl.org>
Thu, 26 Oct 2017 08:54:08 +0000 (10:54 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 30 Oct 2017 17:16:29 +0000 (18:16 +0100)
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/4589)

crypto/asn1/ameth_lib.c
include/openssl/evp.h
util/libcrypto.num

index 82868e136668ef931ae1b74c15582f9de1d7d4f4..5f523b2969e916bac15585bf08bc060dee4a96c6 100644 (file)
@@ -251,6 +251,10 @@ void EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst,
     dst->item_sign = src->item_sign;
     dst->item_verify = src->item_verify;
 
+    dst->siginf_set = src->siginf_set;
+
+    dst->pkey_check = src->pkey_check;
+
 }
 
 void EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth)
@@ -359,3 +363,17 @@ void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth,
     ameth->item_sign = item_sign;
     ameth->item_verify = item_verify;
 }
+
+void EVP_PKEY_asn1_set_siginf(EVP_PKEY_ASN1_METHOD *ameth,
+                              int (*siginf_set) (X509_SIG_INFO *siginf,
+                                                 const X509_ALGOR *alg,
+                                                 const ASN1_STRING *sig))
+{
+    ameth->siginf_set = siginf_set;
+}
+
+void EVP_PKEY_asn1_set_check(EVP_PKEY_ASN1_METHOD *ameth,
+                             int (*pkey_check) (const EVP_PKEY *pk))
+{
+    ameth->pkey_check = pkey_check;
+}
index 40ed8d2db2d8218fbe4014f07dd8f856dbc8e1b1..90add836c026c99cf5b4c1062a0a644f37478902 100644 (file)
@@ -1198,6 +1198,14 @@ void EVP_PKEY_asn1_set_item(EVP_PKEY_ASN1_METHOD *ameth,
                                               X509_ALGOR *alg2,
                                               ASN1_BIT_STRING *sig));
 
+void EVP_PKEY_asn1_set_siginf(EVP_PKEY_ASN1_METHOD *ameth,
+                              int (*siginf_set) (X509_SIG_INFO *siginf,
+                                                 const X509_ALGOR *alg,
+                                                 const ASN1_STRING *sig));
+
+void EVP_PKEY_asn1_set_check(EVP_PKEY_ASN1_METHOD *ameth,
+                             int (*pkey_check) (const EVP_PKEY *pk));
+
 void EVP_PKEY_asn1_set_security_bits(EVP_PKEY_ASN1_METHOD *ameth,
                                      int (*pkey_security_bits) (const EVP_PKEY
                                                                 *pk));
index f4e3451fdc8fc8e6d160424184c93ede93d92ec2..a9281cede0714a1706f941dab5347f8f2738baa2 100644 (file)
@@ -4418,3 +4418,5 @@ RAND_POOL_add_begin                     4362      1_1_1   EXIST::FUNCTION:
 RAND_POOL_add_end                       4363   1_1_1   EXIST::FUNCTION:
 RAND_POOL_acquire_entropy               4364   1_1_1   EXIST::FUNCTION:
 OPENSSL_sk_new_reserve                  4365   1_1_1   EXIST::FUNCTION:
+EVP_PKEY_asn1_set_check                 4366   1_1_1   EXIST::FUNCTION:
+EVP_PKEY_asn1_set_siginf                4367   1_1_1   EXIST::FUNCTION: