diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/ameth_lib.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/ameth_lib.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/ameth_lib.c b/src/lib/libcrypto/asn1/ameth_lib.c index 8701e97337..e9f73cb3a6 100644 --- a/src/lib/libcrypto/asn1/ameth_lib.c +++ b/src/lib/libcrypto/asn1/ameth_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ameth_lib.c,v 1.12 2014/07/11 08:44:47 jsing Exp $ */ | 1 | /* $OpenBSD: ameth_lib.c,v 1.13 2014/07/11 13:41:59 miod 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 | */ |
| @@ -242,11 +242,16 @@ int | |||
| 242 | EVP_PKEY_asn1_add_alias(int to, int from) | 242 | EVP_PKEY_asn1_add_alias(int to, int from) |
| 243 | { | 243 | { |
| 244 | EVP_PKEY_ASN1_METHOD *ameth; | 244 | EVP_PKEY_ASN1_METHOD *ameth; |
| 245 | |||
| 245 | ameth = EVP_PKEY_asn1_new(from, ASN1_PKEY_ALIAS, NULL, NULL); | 246 | ameth = EVP_PKEY_asn1_new(from, ASN1_PKEY_ALIAS, NULL, NULL); |
| 246 | if (!ameth) | 247 | if (!ameth) |
| 247 | return 0; | 248 | return 0; |
| 248 | ameth->pkey_base_id = to; | 249 | ameth->pkey_base_id = to; |
| 249 | return EVP_PKEY_asn1_add0(ameth); | 250 | if (!EVP_PKEY_asn1_add0(ameth)) { |
| 251 | EVP_PKEY_asn1_free(ameth); | ||
| 252 | return 0; | ||
| 253 | } | ||
| 254 | return 1; | ||
| 250 | } | 255 | } |
| 251 | 256 | ||
| 252 | int | 257 | int |
