summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/ameth_lib.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2006-04-05 13:24:19 +0000
committerDr. Stephen Henson <steve@openssl.org>2006-04-05 13:24:19 +0000
commite46691a0bc17cad1e242668792a796ac50be7456 (patch)
tree06443e6982986af5557c563035687f2ffca87723 /crypto/asn1/ameth_lib.c
parent732a40e107f056a6678602ab869f2ba9230e0d24 (diff)
New function to add dynamic alias.
Diffstat (limited to 'crypto/asn1/ameth_lib.c')
-rw-r--r--crypto/asn1/ameth_lib.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/crypto/asn1/ameth_lib.c b/crypto/asn1/ameth_lib.c
index 6b4690e5b7..60d159477c 100644
--- a/crypto/asn1/ameth_lib.c
+++ b/crypto/asn1/ameth_lib.c
@@ -172,7 +172,7 @@ const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(const char *str, int len)
return NULL;
}
-int EVP_PKEY_asn1_add(const EVP_PKEY_ASN1_METHOD *ameth)
+int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth)
{
if (app_methods == NULL)
{
@@ -186,6 +186,17 @@ int EVP_PKEY_asn1_add(const EVP_PKEY_ASN1_METHOD *ameth)
return 1;
}
+int EVP_PKEY_asn1_add_alias(int to, int from)
+ {
+ EVP_PKEY_ASN1_METHOD *ameth;
+ ameth = EVP_PKEY_asn1_new(from, NULL, NULL);
+ if (!ameth)
+ return 0;
+ ameth->pkey_base_id = to;
+ ameth->pkey_flags |= ASN1_PKEY_ALIAS;
+ return EVP_PKEY_asn1_add0(ameth);
+ }
+
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)