diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/dsa/dsa_ameth.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_ameth.c b/src/lib/libcrypto/dsa/dsa_ameth.c index 2fb80108bc..866e5ec476 100644 --- a/src/lib/libcrypto/dsa/dsa_ameth.c +++ b/src/lib/libcrypto/dsa/dsa_ameth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: dsa_ameth.c,v 1.58 2024/04/13 13:57:54 tb Exp $ */ | 1 | /* $OpenBSD: dsa_ameth.c,v 1.59 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 | */ |
| @@ -71,6 +71,7 @@ | |||
| 71 | #include "bn_local.h" | 71 | #include "bn_local.h" |
| 72 | #include "dsa_local.h" | 72 | #include "dsa_local.h" |
| 73 | #include "evp_local.h" | 73 | #include "evp_local.h" |
| 74 | #include "x509_local.h" | ||
| 74 | 75 | ||
| 75 | static int | 76 | static int |
| 76 | dsa_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey) | 77 | dsa_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey) |
| @@ -636,8 +637,9 @@ dsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) | |||
| 636 | return -1; | 637 | return -1; |
| 637 | if (!OBJ_find_sigid_by_algs(&snid, hnid, EVP_PKEY_id(pkey))) | 638 | if (!OBJ_find_sigid_by_algs(&snid, hnid, EVP_PKEY_id(pkey))) |
| 638 | return -1; | 639 | return -1; |
| 639 | X509_ALGOR_set0(alg2, OBJ_nid2obj(snid), V_ASN1_UNDEF, | 640 | if (!X509_ALGOR_set0_by_nid(alg2, snid, V_ASN1_UNDEF, |
| 640 | 0); | 641 | NULL)) |
| 642 | return -1; | ||
| 641 | } | 643 | } |
| 642 | return 1; | 644 | return 1; |
| 643 | 645 | ||
| @@ -655,7 +657,9 @@ dsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) | |||
| 655 | return -1; | 657 | return -1; |
| 656 | if (!OBJ_find_sigid_by_algs(&snid, hnid, EVP_PKEY_id(pkey))) | 658 | if (!OBJ_find_sigid_by_algs(&snid, hnid, EVP_PKEY_id(pkey))) |
| 657 | return -1; | 659 | return -1; |
| 658 | X509_ALGOR_set0(alg2, OBJ_nid2obj(snid), V_ASN1_UNDEF, 0); | 660 | if (!X509_ALGOR_set0_by_nid(alg2, snid, V_ASN1_UNDEF, |
| 661 | NULL)) | ||
| 662 | return -1; | ||
| 659 | } | 663 | } |
| 660 | return 1; | 664 | return 1; |
| 661 | 665 | ||
