diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2006-04-21 17:38:58 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2006-04-21 17:38:58 +0000 |
commit | cddaba8ede007579e0f174275312a4c722afa82e (patch) | |
tree | b6e0452cc273023e097359a1fee7e967770eb7d5 /crypto/asn1/ameth_lib.c | |
parent | 49c5f38d3dceda33dcbdc940079f6f86ff3d0c03 (diff) | |
download | openssl-cddaba8ede007579e0f174275312a4c722afa82e.tar.gz |
Add 'flags' parameter to EVP_PKEY_asn1_meth_new() to set algorithm flags.
Diffstat (limited to 'crypto/asn1/ameth_lib.c')
-rw-r--r-- | crypto/asn1/ameth_lib.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/asn1/ameth_lib.c b/crypto/asn1/ameth_lib.c index 8c33ca5625..af08defbe4 100644 --- a/crypto/asn1/ameth_lib.c +++ b/crypto/asn1/ameth_lib.c @@ -191,11 +191,10 @@ int EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth) int EVP_PKEY_asn1_add_alias(int to, int from) { EVP_PKEY_ASN1_METHOD *ameth; - ameth = EVP_PKEY_asn1_new(from, NULL, NULL); + ameth = EVP_PKEY_asn1_new(from, ASN1_PKEY_ALIAS, NULL, NULL); if (!ameth) return 0; ameth->pkey_base_id = to; - ameth->pkey_flags |= ASN1_PKEY_ALIAS; return EVP_PKEY_asn1_add0(ameth); } @@ -218,7 +217,7 @@ int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *ppkey_base_id, int *ppkey_flags, return 1; } -EVP_PKEY_ASN1_METHOD* EVP_PKEY_asn1_new(int id, +EVP_PKEY_ASN1_METHOD* EVP_PKEY_asn1_new(int id, int flags, const char *pem_str, const char *info) { EVP_PKEY_ASN1_METHOD *ameth; @@ -228,7 +227,7 @@ EVP_PKEY_ASN1_METHOD* EVP_PKEY_asn1_new(int id, ameth->pkey_id = id; ameth->pkey_base_id = id; - ameth->pkey_flags = ASN1_PKEY_DYNAMIC; + ameth->pkey_flags = flags | ASN1_PKEY_DYNAMIC; if (info) { |