sync with OpenBSD -current

This commit is contained in:
purplerain 2024-08-03 16:51:23 +00:00
parent c0bca71075
commit 4d0363822b
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
10 changed files with 63 additions and 27 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: crypto_ex_data.c,v 1.2 2024/08/02 14:02:33 tb Exp $ */
/* $OpenBSD: crypto_ex_data.c,v 1.4 2024/08/03 07:45:26 tb Exp $ */
/*
* Copyright (c) 2023 Joel Sing <jsing@openbsd.org>
*
@ -19,7 +19,7 @@
#include <openssl/crypto.h>
#define CRYPTO_EX_DATA_MAX_INDEX 16
#define CRYPTO_EX_DATA_MAX_INDEX 32
struct crypto_ex_data {
int class_index;
@ -104,7 +104,7 @@ CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
sizeof(struct crypto_ex_data_class))) == NULL)
goto err;
if ((new_class->indexes = calloc(CRYPTO_EX_DATA_MAX_INDEX,
sizeof(struct crypto_ex_data_index))) == NULL)
sizeof(struct crypto_ex_data_index *))) == NULL)
goto err;
new_class->indexes_len = CRYPTO_EX_DATA_MAX_INDEX;
new_class->next_index = 1;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: ec_kmeth.c,v 1.13 2023/11/19 15:46:09 tb Exp $ */
/* $OpenBSD: ec_kmeth.c,v 1.14 2024/08/03 13:06:37 tb Exp $ */
/*
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
@ -149,7 +149,7 @@ EC_KEY_new_method(ENGINE *engine)
ret->conv_form = POINT_CONVERSION_UNCOMPRESSED;
ret->references = 1;
if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data))
if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_EC_KEY, ret, &ret->ex_data))
goto err;
if (ret->meth->init != NULL && ret->meth->init(ret) == 0)
goto err;