diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ec_ameth.c')
| -rw-r--r-- | src/lib/libcrypto/ec/ec_ameth.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/ec_ameth.c b/src/lib/libcrypto/ec/ec_ameth.c index 7ca5b18020..ebedab3325 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.51 2024/01/04 17:01:26 tb Exp $ */ | 1 | /* $OpenBSD: ec_ameth.c,v 1.52 2024/04/13 14:02:51 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 | */ |
| @@ -69,6 +69,7 @@ | |||
| 69 | #include "asn1_local.h" | 69 | #include "asn1_local.h" |
| 70 | #include "ec_local.h" | 70 | #include "ec_local.h" |
| 71 | #include "evp_local.h" | 71 | #include "evp_local.h" |
| 72 | #include "x509_local.h" | ||
| 72 | 73 | ||
| 73 | #ifndef OPENSSL_NO_CMS | 74 | #ifndef OPENSSL_NO_CMS |
| 74 | static int ecdh_cms_decrypt(CMS_RecipientInfo *ri); | 75 | static int ecdh_cms_decrypt(CMS_RecipientInfo *ri); |
| @@ -637,7 +638,9 @@ ec_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) | |||
| 637 | return -1; | 638 | return -1; |
| 638 | if (!OBJ_find_sigid_by_algs(&snid, hnid, EVP_PKEY_id(pkey))) | 639 | if (!OBJ_find_sigid_by_algs(&snid, hnid, EVP_PKEY_id(pkey))) |
| 639 | return -1; | 640 | return -1; |
| 640 | X509_ALGOR_set0(alg2, OBJ_nid2obj(snid), V_ASN1_UNDEF, 0); | 641 | if (!X509_ALGOR_set0_by_nid(alg2, snid, V_ASN1_UNDEF, |
| 642 | NULL)) | ||
| 643 | return -1; | ||
| 641 | } | 644 | } |
| 642 | return 1; | 645 | return 1; |
| 643 | 646 | ||
| @@ -655,7 +658,9 @@ ec_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) | |||
| 655 | return -1; | 658 | return -1; |
| 656 | if (!OBJ_find_sigid_by_algs(&snid, hnid, EVP_PKEY_id(pkey))) | 659 | if (!OBJ_find_sigid_by_algs(&snid, hnid, EVP_PKEY_id(pkey))) |
| 657 | return -1; | 660 | return -1; |
| 658 | X509_ALGOR_set0(alg2, OBJ_nid2obj(snid), V_ASN1_UNDEF, 0); | 661 | if (!X509_ALGOR_set0_by_nid(alg2, snid, V_ASN1_UNDEF, |
| 662 | NULL)) | ||
| 663 | return -1; | ||
| 659 | } | 664 | } |
| 660 | return 1; | 665 | return 1; |
| 661 | 666 | ||
