sync with OpenBSD -current

This commit is contained in:
purplerain 2024-04-14 02:31:08 +00:00
parent 137d408ac1
commit e0d126d03b
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
143 changed files with 5355 additions and 3727 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: dsa_ameth.c,v 1.57 2024/01/04 17:01:26 tb Exp $ */
/* $OpenBSD: dsa_ameth.c,v 1.59 2024/04/13 14:02:51 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
@ -71,6 +71,7 @@
#include "bn_local.h"
#include "dsa_local.h"
#include "evp_local.h"
#include "x509_local.h"
static int
dsa_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey)
@ -634,11 +635,11 @@ dsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2)
hnid = OBJ_obj2nid(alg1->algorithm);
if (hnid == NID_undef)
return -1;
if (!OBJ_find_sigid_by_algs(&snid, hnid,
EVP_PKEY_id(pkey)))
if (!OBJ_find_sigid_by_algs(&snid, hnid, EVP_PKEY_id(pkey)))
return -1;
if (!X509_ALGOR_set0_by_nid(alg2, snid, V_ASN1_UNDEF,
NULL))
return -1;
X509_ALGOR_set0(alg2, OBJ_nid2obj(snid), V_ASN1_UNDEF,
0);
}
return 1;
@ -656,7 +657,9 @@ dsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2)
return -1;
if (!OBJ_find_sigid_by_algs(&snid, hnid, EVP_PKEY_id(pkey)))
return -1;
X509_ALGOR_set0(alg2, OBJ_nid2obj(snid), V_ASN1_UNDEF, 0);
if (!X509_ALGOR_set0_by_nid(alg2, snid, V_ASN1_UNDEF,
NULL))
return -1;
}
return 1;