summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2024-01-04 17:01:26 +0000
committertb <>2024-01-04 17:01:26 +0000
commit28fd80a9189b82d0223c35153f8ed6f9cfb59161 (patch)
tree352dd8b119595c9dcef2c0b2739e1e98f14a4676
parent6ac39f8daa6e59d602f970b08d9bc152a63fd7a5 (diff)
downloadopenbsd-28fd80a9189b82d0223c35153f8ed6f9cfb59161.tar.gz
openbsd-28fd80a9189b82d0223c35153f8ed6f9cfb59161.tar.bz2
openbsd-28fd80a9189b82d0223c35153f8ed6f9cfb59161.zip
Replace .pkey_base_id with a .base_method pointer
Every EVP_PKEY_ASN1_METHOD is either an ASN.1 method or an alias. As such it resolves to an underlying ASN.1 method (in one step). This information can be stored in a base_method pointer in allusion to the pkey_base_id, which is the name for the nid (aka pkey_id aka type) of the underlying method. For an ASN.1 method, the base method is itself, so the base method is set as a pointer to itself. For an alias it is of course a pointer to the underlying method. Then obviously ameth->pkey_base_id is the same as ameth->base_method->pkey_id, so rework all ASN.1 methods to follow that. ok jsing
-rw-r--r--src/lib/libcrypto/cmac/cm_ameth.c4
-rw-r--r--src/lib/libcrypto/dh/dh_ameth.c4
-rw-r--r--src/lib/libcrypto/dsa/dsa_ameth.c12
-rw-r--r--src/lib/libcrypto/ec/ec_ameth.c4
-rw-r--r--src/lib/libcrypto/ec/ecx_methods.c6
-rw-r--r--src/lib/libcrypto/evp/evp_local.h4
-rw-r--r--src/lib/libcrypto/evp/p_lib.c6
-rw-r--r--src/lib/libcrypto/gost/gost89imit_ameth.c4
-rw-r--r--src/lib/libcrypto/gost/gostr341001_ameth.c8
-rw-r--r--src/lib/libcrypto/hmac/hm_ameth.c4
-rw-r--r--src/lib/libcrypto/rsa/rsa_ameth.c8
11 files changed, 32 insertions, 32 deletions
diff --git a/src/lib/libcrypto/cmac/cm_ameth.c b/src/lib/libcrypto/cmac/cm_ameth.c
index 04e0eb836f..50db61756c 100644
--- a/src/lib/libcrypto/cmac/cm_ameth.c
+++ b/src/lib/libcrypto/cmac/cm_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cm_ameth.c,v 1.10 2022/11/26 16:08:51 tb Exp $ */ 1/* $OpenBSD: cm_ameth.c,v 1.11 2024/01/04 17:01:26 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2010. 3 * project 2010.
4 */ 4 */
@@ -77,8 +77,8 @@ cmac_key_free(EVP_PKEY *pkey)
77} 77}
78 78
79const EVP_PKEY_ASN1_METHOD cmac_asn1_meth = { 79const EVP_PKEY_ASN1_METHOD cmac_asn1_meth = {
80 .base_method = &cmac_asn1_meth,
80 .pkey_id = EVP_PKEY_CMAC, 81 .pkey_id = EVP_PKEY_CMAC,
81 .pkey_base_id = EVP_PKEY_CMAC,
82 82
83 .pem_str = "CMAC", 83 .pem_str = "CMAC",
84 .info = "OpenSSL CMAC method", 84 .info = "OpenSSL CMAC method",
diff --git a/src/lib/libcrypto/dh/dh_ameth.c b/src/lib/libcrypto/dh/dh_ameth.c
index 43beb469f2..d51a5bea4c 100644
--- a/src/lib/libcrypto/dh/dh_ameth.c
+++ b/src/lib/libcrypto/dh/dh_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dh_ameth.c,v 1.39 2023/08/12 07:59:48 tb Exp $ */ 1/* $OpenBSD: dh_ameth.c,v 1.40 2024/01/04 17:01:26 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -523,8 +523,8 @@ dh_pkey_param_check(const EVP_PKEY *pkey)
523} 523}
524 524
525const EVP_PKEY_ASN1_METHOD dh_asn1_meth = { 525const EVP_PKEY_ASN1_METHOD dh_asn1_meth = {
526 .base_method = &dh_asn1_meth,
526 .pkey_id = EVP_PKEY_DH, 527 .pkey_id = EVP_PKEY_DH,
527 .pkey_base_id = EVP_PKEY_DH,
528 528
529 .pem_str = "DH", 529 .pem_str = "DH",
530 .info = "OpenSSL PKCS#3 DH method", 530 .info = "OpenSSL PKCS#3 DH method",
diff --git a/src/lib/libcrypto/dsa/dsa_ameth.c b/src/lib/libcrypto/dsa/dsa_ameth.c
index d4cce72fcb..f9b6a9e7d3 100644
--- a/src/lib/libcrypto/dsa/dsa_ameth.c
+++ b/src/lib/libcrypto/dsa/dsa_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_ameth.c,v 1.56 2024/01/04 16:41:56 tb Exp $ */ 1/* $OpenBSD: dsa_ameth.c,v 1.57 2024/01/04 17:01:26 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -675,8 +675,8 @@ dsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2)
675} 675}
676 676
677const EVP_PKEY_ASN1_METHOD dsa_asn1_meth = { 677const EVP_PKEY_ASN1_METHOD dsa_asn1_meth = {
678 .base_method = &dsa_asn1_meth,
678 .pkey_id = EVP_PKEY_DSA, 679 .pkey_id = EVP_PKEY_DSA,
679 .pkey_base_id = EVP_PKEY_DSA,
680 680
681 .pem_str = "DSA", 681 .pem_str = "DSA",
682 .info = "OpenSSL DSA method", 682 .info = "OpenSSL DSA method",
@@ -709,25 +709,25 @@ const EVP_PKEY_ASN1_METHOD dsa_asn1_meth = {
709}; 709};
710 710
711const EVP_PKEY_ASN1_METHOD dsa1_asn1_meth = { 711const EVP_PKEY_ASN1_METHOD dsa1_asn1_meth = {
712 .base_method = &dsa_asn1_meth,
712 .pkey_id = EVP_PKEY_DSA1, 713 .pkey_id = EVP_PKEY_DSA1,
713 .pkey_base_id = EVP_PKEY_DSA,
714 .pkey_flags = ASN1_PKEY_ALIAS, 714 .pkey_flags = ASN1_PKEY_ALIAS,
715}; 715};
716 716
717const EVP_PKEY_ASN1_METHOD dsa2_asn1_meth = { 717const EVP_PKEY_ASN1_METHOD dsa2_asn1_meth = {
718 .base_method = &dsa_asn1_meth,
718 .pkey_id = EVP_PKEY_DSA2, 719 .pkey_id = EVP_PKEY_DSA2,
719 .pkey_base_id = EVP_PKEY_DSA,
720 .pkey_flags = ASN1_PKEY_ALIAS, 720 .pkey_flags = ASN1_PKEY_ALIAS,
721}; 721};
722 722
723const EVP_PKEY_ASN1_METHOD dsa3_asn1_meth = { 723const EVP_PKEY_ASN1_METHOD dsa3_asn1_meth = {
724 .base_method = &dsa_asn1_meth,
724 .pkey_id = EVP_PKEY_DSA3, 725 .pkey_id = EVP_PKEY_DSA3,
725 .pkey_base_id = EVP_PKEY_DSA,
726 .pkey_flags = ASN1_PKEY_ALIAS, 726 .pkey_flags = ASN1_PKEY_ALIAS,
727}; 727};
728 728
729const EVP_PKEY_ASN1_METHOD dsa4_asn1_meth = { 729const EVP_PKEY_ASN1_METHOD dsa4_asn1_meth = {
730 .base_method = &dsa_asn1_meth,
730 .pkey_id = EVP_PKEY_DSA4, 731 .pkey_id = EVP_PKEY_DSA4,
731 .pkey_base_id = EVP_PKEY_DSA,
732 .pkey_flags = ASN1_PKEY_ALIAS, 732 .pkey_flags = ASN1_PKEY_ALIAS,
733}; 733};
diff --git a/src/lib/libcrypto/ec/ec_ameth.c b/src/lib/libcrypto/ec/ec_ameth.c
index c22f38b345..7ca5b18020 100644
--- a/src/lib/libcrypto/ec/ec_ameth.c
+++ b/src/lib/libcrypto/ec/ec_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_ameth.c,v 1.50 2023/12/29 18:49:06 tb Exp $ */ 1/* $OpenBSD: ec_ameth.c,v 1.51 2024/01/04 17:01:26 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -1049,8 +1049,8 @@ ecdh_cms_encrypt(CMS_RecipientInfo *ri)
1049#endif 1049#endif
1050 1050
1051const EVP_PKEY_ASN1_METHOD eckey_asn1_meth = { 1051const EVP_PKEY_ASN1_METHOD eckey_asn1_meth = {
1052 .base_method = &eckey_asn1_meth,
1052 .pkey_id = EVP_PKEY_EC, 1053 .pkey_id = EVP_PKEY_EC,
1053 .pkey_base_id = EVP_PKEY_EC,
1054 1054
1055 .pem_str = "EC", 1055 .pem_str = "EC",
1056 .info = "OpenSSL EC algorithm", 1056 .info = "OpenSSL EC algorithm",
diff --git a/src/lib/libcrypto/ec/ecx_methods.c b/src/lib/libcrypto/ec/ecx_methods.c
index 75988d99ad..cd512a447f 100644
--- a/src/lib/libcrypto/ec/ecx_methods.c
+++ b/src/lib/libcrypto/ec/ecx_methods.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecx_methods.c,v 1.10 2023/11/09 11:39:13 tb Exp $ */ 1/* $OpenBSD: ecx_methods.c,v 1.11 2024/01/04 17:01:26 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2022 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2022 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -813,8 +813,8 @@ pkey_ecx_ed_ctrl(EVP_PKEY_CTX *pkey_ctx, int op, int arg1, void *arg2)
813} 813}
814 814
815const EVP_PKEY_ASN1_METHOD x25519_asn1_meth = { 815const EVP_PKEY_ASN1_METHOD x25519_asn1_meth = {
816 .base_method = &x25519_asn1_meth,
816 .pkey_id = EVP_PKEY_X25519, 817 .pkey_id = EVP_PKEY_X25519,
817 .pkey_base_id = EVP_PKEY_X25519,
818 .pkey_flags = 0, 818 .pkey_flags = 0,
819 .pem_str = "X25519", 819 .pem_str = "X25519",
820 .info = "OpenSSL X25519 algorithm", 820 .info = "OpenSSL X25519 algorithm",
@@ -851,8 +851,8 @@ const EVP_PKEY_METHOD x25519_pkey_meth = {
851}; 851};
852 852
853const EVP_PKEY_ASN1_METHOD ed25519_asn1_meth = { 853const EVP_PKEY_ASN1_METHOD ed25519_asn1_meth = {
854 .base_method = &ed25519_asn1_meth,
854 .pkey_id = EVP_PKEY_ED25519, 855 .pkey_id = EVP_PKEY_ED25519,
855 .pkey_base_id = EVP_PKEY_ED25519,
856 .pkey_flags = 0, 856 .pkey_flags = 0,
857 .pem_str = "ED25519", 857 .pem_str = "ED25519",
858 .info = "OpenSSL ED25519 algorithm", 858 .info = "OpenSSL ED25519 algorithm",
diff --git a/src/lib/libcrypto/evp/evp_local.h b/src/lib/libcrypto/evp/evp_local.h
index eaede4409a..52fa8e1e52 100644
--- a/src/lib/libcrypto/evp/evp_local.h
+++ b/src/lib/libcrypto/evp/evp_local.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_local.h,v 1.11 2024/01/01 15:23:00 tb Exp $ */ 1/* $OpenBSD: evp_local.h,v 1.12 2024/01/04 17:01:26 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -90,8 +90,8 @@ struct ecx_key_st {
90}; 90};
91 91
92struct evp_pkey_asn1_method_st { 92struct evp_pkey_asn1_method_st {
93 const EVP_PKEY_ASN1_METHOD *base_method;
93 int pkey_id; 94 int pkey_id;
94 int pkey_base_id;
95 unsigned long pkey_flags; 95 unsigned long pkey_flags;
96 96
97 char *pem_str; 97 char *pem_str;
diff --git a/src/lib/libcrypto/evp/p_lib.c b/src/lib/libcrypto/evp/p_lib.c
index f46666a008..b43a0fcd5d 100644
--- a/src/lib/libcrypto/evp/p_lib.c
+++ b/src/lib/libcrypto/evp/p_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p_lib.c,v 1.53 2024/01/04 16:41:56 tb Exp $ */ 1/* $OpenBSD: p_lib.c,v 1.54 2024/01/04 17:01:26 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -222,7 +222,7 @@ EVP_PKEY_asn1_find(ENGINE **pe, int type)
222 break; 222 break;
223 if ((mp->pkey_flags & ASN1_PKEY_ALIAS) == 0) 223 if ((mp->pkey_flags & ASN1_PKEY_ALIAS) == 0)
224 break; 224 break;
225 type = mp->pkey_base_id; 225 type = mp->base_method->pkey_id;
226 } 226 }
227 227
228 return mp; 228 return mp;
@@ -259,7 +259,7 @@ EVP_PKEY_asn1_get0_info(int *ppkey_id, int *ppkey_base_id, int *ppkey_flags,
259 if (ppkey_id) 259 if (ppkey_id)
260 *ppkey_id = ameth->pkey_id; 260 *ppkey_id = ameth->pkey_id;
261 if (ppkey_base_id) 261 if (ppkey_base_id)
262 *ppkey_base_id = ameth->pkey_base_id; 262 *ppkey_base_id = ameth->base_method->pkey_id;
263 if (ppkey_flags) 263 if (ppkey_flags)
264 *ppkey_flags = ameth->pkey_flags; 264 *ppkey_flags = ameth->pkey_flags;
265 if (pinfo) 265 if (pinfo)
diff --git a/src/lib/libcrypto/gost/gost89imit_ameth.c b/src/lib/libcrypto/gost/gost89imit_ameth.c
index e300b52801..76e285b2d8 100644
--- a/src/lib/libcrypto/gost/gost89imit_ameth.c
+++ b/src/lib/libcrypto/gost/gost89imit_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gost89imit_ameth.c,v 1.4 2022/11/26 16:08:53 tb Exp $ */ 1/* $OpenBSD: gost89imit_ameth.c,v 1.5 2024/01/04 17:01:26 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> 3 * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
4 * Copyright (c) 2005-2006 Cryptocom LTD 4 * Copyright (c) 2005-2006 Cryptocom LTD
@@ -75,8 +75,8 @@ mac_ctrl_gost(EVP_PKEY *pkey, int op, long arg1, void *arg2)
75} 75}
76 76
77const EVP_PKEY_ASN1_METHOD gostimit_asn1_meth = { 77const EVP_PKEY_ASN1_METHOD gostimit_asn1_meth = {
78 .base_method = &gostimit_asn1_meth,
78 .pkey_id = EVP_PKEY_GOSTIMIT, 79 .pkey_id = EVP_PKEY_GOSTIMIT,
79 .pkey_base_id = EVP_PKEY_GOSTIMIT,
80 .pkey_flags = ASN1_PKEY_SIGPARAM_NULL, 80 .pkey_flags = ASN1_PKEY_SIGPARAM_NULL,
81 81
82 .pem_str = "GOST-MAC", 82 .pem_str = "GOST-MAC",
diff --git a/src/lib/libcrypto/gost/gostr341001_ameth.c b/src/lib/libcrypto/gost/gostr341001_ameth.c
index f917827f7a..e8e8c8aa82 100644
--- a/src/lib/libcrypto/gost/gostr341001_ameth.c
+++ b/src/lib/libcrypto/gost/gostr341001_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gostr341001_ameth.c,v 1.23 2024/01/04 16:41:56 tb Exp $ */ 1/* $OpenBSD: gostr341001_ameth.c,v 1.24 2024/01/04 17:01:26 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> 3 * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
4 * Copyright (c) 2005-2006 Cryptocom LTD 4 * Copyright (c) 2005-2006 Cryptocom LTD
@@ -683,8 +683,8 @@ pkey_ctrl_gost01(EVP_PKEY *pkey, int op, long arg1, void *arg2)
683} 683}
684 684
685const EVP_PKEY_ASN1_METHOD gostr01_asn1_meth = { 685const EVP_PKEY_ASN1_METHOD gostr01_asn1_meth = {
686 .base_method = &gostr01_asn1_meth,
686 .pkey_id = EVP_PKEY_GOSTR01, 687 .pkey_id = EVP_PKEY_GOSTR01,
687 .pkey_base_id = EVP_PKEY_GOSTR01,
688 .pkey_flags = ASN1_PKEY_SIGPARAM_NULL, 688 .pkey_flags = ASN1_PKEY_SIGPARAM_NULL,
689 689
690 .pem_str = "GOST2001", 690 .pem_str = "GOST2001",
@@ -713,14 +713,14 @@ const EVP_PKEY_ASN1_METHOD gostr01_asn1_meth = {
713}; 713};
714 714
715const EVP_PKEY_ASN1_METHOD gostr12_256_asn1_meth = { 715const EVP_PKEY_ASN1_METHOD gostr12_256_asn1_meth = {
716 .base_method = &gostr01_asn1_meth,
716 .pkey_id = EVP_PKEY_GOSTR12_256, 717 .pkey_id = EVP_PKEY_GOSTR12_256,
717 .pkey_base_id = EVP_PKEY_GOSTR01,
718 .pkey_flags = ASN1_PKEY_ALIAS, 718 .pkey_flags = ASN1_PKEY_ALIAS,
719}; 719};
720 720
721const EVP_PKEY_ASN1_METHOD gostr12_512_asn1_meth = { 721const EVP_PKEY_ASN1_METHOD gostr12_512_asn1_meth = {
722 .base_method = &gostr01_asn1_meth,
722 .pkey_id = EVP_PKEY_GOSTR12_512, 723 .pkey_id = EVP_PKEY_GOSTR12_512,
723 .pkey_base_id = EVP_PKEY_GOSTR01,
724 .pkey_flags = ASN1_PKEY_ALIAS, 724 .pkey_flags = ASN1_PKEY_ALIAS,
725}; 725};
726 726
diff --git a/src/lib/libcrypto/hmac/hm_ameth.c b/src/lib/libcrypto/hmac/hm_ameth.c
index 7e6ad6d69e..8bb1dc786f 100644
--- a/src/lib/libcrypto/hmac/hm_ameth.c
+++ b/src/lib/libcrypto/hmac/hm_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: hm_ameth.c,v 1.19 2022/11/26 16:08:53 tb Exp $ */ 1/* $OpenBSD: hm_ameth.c,v 1.20 2024/01/04 17:01:26 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2007. 3 * project 2007.
4 */ 4 */
@@ -153,8 +153,8 @@ hmac_get_priv_key(const EVP_PKEY *pkey, unsigned char *priv, size_t *len)
153} 153}
154 154
155const EVP_PKEY_ASN1_METHOD hmac_asn1_meth = { 155const EVP_PKEY_ASN1_METHOD hmac_asn1_meth = {
156 .base_method = &hmac_asn1_meth,
156 .pkey_id = EVP_PKEY_HMAC, 157 .pkey_id = EVP_PKEY_HMAC,
157 .pkey_base_id = EVP_PKEY_HMAC,
158 158
159 .pem_str = "HMAC", 159 .pem_str = "HMAC",
160 .info = "OpenSSL HMAC method", 160 .info = "OpenSSL HMAC method",
diff --git a/src/lib/libcrypto/rsa/rsa_ameth.c b/src/lib/libcrypto/rsa/rsa_ameth.c
index 918e7b8901..b8957c0d1c 100644
--- a/src/lib/libcrypto/rsa/rsa_ameth.c
+++ b/src/lib/libcrypto/rsa/rsa_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_ameth.c,v 1.55 2024/01/04 16:41:56 tb Exp $ */ 1/* $OpenBSD: rsa_ameth.c,v 1.56 2024/01/04 17:01:26 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -1149,8 +1149,8 @@ rsa_cms_encrypt(CMS_RecipientInfo *ri)
1149#endif 1149#endif
1150 1150
1151const EVP_PKEY_ASN1_METHOD rsa_asn1_meth = { 1151const EVP_PKEY_ASN1_METHOD rsa_asn1_meth = {
1152 .base_method = &rsa_asn1_meth,
1152 .pkey_id = EVP_PKEY_RSA, 1153 .pkey_id = EVP_PKEY_RSA,
1153 .pkey_base_id = EVP_PKEY_RSA,
1154 .pkey_flags = ASN1_PKEY_SIGPARAM_NULL, 1154 .pkey_flags = ASN1_PKEY_SIGPARAM_NULL,
1155 1155
1156 .pem_str = "RSA", 1156 .pem_str = "RSA",
@@ -1182,16 +1182,16 @@ const EVP_PKEY_ASN1_METHOD rsa_asn1_meth = {
1182}; 1182};
1183 1183
1184const EVP_PKEY_ASN1_METHOD rsa2_asn1_meth = { 1184const EVP_PKEY_ASN1_METHOD rsa2_asn1_meth = {
1185 .base_method = &rsa_asn1_meth,
1185 .pkey_id = EVP_PKEY_RSA2, 1186 .pkey_id = EVP_PKEY_RSA2,
1186 .pkey_base_id = EVP_PKEY_RSA,
1187 .pkey_flags = ASN1_PKEY_ALIAS, 1187 .pkey_flags = ASN1_PKEY_ALIAS,
1188 1188
1189 .pkey_check = rsa_pkey_check, 1189 .pkey_check = rsa_pkey_check,
1190}; 1190};
1191 1191
1192const EVP_PKEY_ASN1_METHOD rsa_pss_asn1_meth = { 1192const EVP_PKEY_ASN1_METHOD rsa_pss_asn1_meth = {
1193 .base_method = &rsa_pss_asn1_meth,
1193 .pkey_id = EVP_PKEY_RSA_PSS, 1194 .pkey_id = EVP_PKEY_RSA_PSS,
1194 .pkey_base_id = EVP_PKEY_RSA_PSS,
1195 .pkey_flags = ASN1_PKEY_SIGPARAM_NULL, 1195 .pkey_flags = ASN1_PKEY_SIGPARAM_NULL,
1196 1196
1197 .pem_str = "RSA-PSS", 1197 .pem_str = "RSA-PSS",