summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/ameth_lib.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2006-04-04 18:16:03 +0000
committerDr. Stephen Henson <steve@openssl.org>2006-04-04 18:16:03 +0000
commit0b33dac3100c68ab19a6be804cdeaaa87582b9a0 (patch)
tree4e4e480f898e6d2cedf0cc802f3144a25b415931 /crypto/asn1/ameth_lib.c
parente2bce37720b4a165ffeb8172bfd504fbdd17e379 (diff)
New function to retrieve ASN1 info on public key algorithms. New command
line option to print out info.
Diffstat (limited to 'crypto/asn1/ameth_lib.c')
-rw-r--r--crypto/asn1/ameth_lib.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/crypto/asn1/ameth_lib.c b/crypto/asn1/ameth_lib.c
index 3616816c1c..6f98872cf1 100644
--- a/crypto/asn1/ameth_lib.c
+++ b/crypto/asn1/ameth_lib.c
@@ -186,6 +186,25 @@ int EVP_PKEY_asn1_add(const EVP_PKEY_ASN1_METHOD *ameth)
return 1;
}
+int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *ppkey_base_id, int *ppkey_flags,
+ const char **pinfo, const char **ppem_str,
+ const EVP_PKEY_ASN1_METHOD *ameth)
+ {
+ if (!ameth)
+ return 0;
+ if (ppkey_id)
+ *ppkey_id = ameth->pkey_id;
+ if (ppkey_base_id)
+ *ppkey_base_id = ameth->pkey_base_id;
+ if (ppkey_flags)
+ *ppkey_flags = ameth->pkey_flags;
+ if (pinfo)
+ *pinfo = ameth->info;
+ if (ppem_str)
+ *ppem_str = ameth->pem_str;
+ return 1;
+ }
+
EVP_PKEY_ASN1_METHOD* EVP_PKEY_asn1_new(int id,
const char *pem_str, const char *info)
{