sync with OpenBSD -current

This commit is contained in:
purplerain 2024-06-24 17:59:29 +00:00
parent 7bc640af07
commit 4a6edb3688
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
61 changed files with 680 additions and 286 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: rand_err.c,v 1.17 2023/07/07 12:01:32 beck Exp $ */
/* $OpenBSD: rand_err.c,v 1.18 2024/06/24 06:43:22 tb Exp $ */
/* ====================================================================
* Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved.
*
@ -60,17 +60,19 @@
#include <openssl/err.h>
#include <openssl/rand.h>
#include "err_local.h"
#ifndef OPENSSL_NO_ERR
#define ERR_FUNC(func) ERR_PACK(ERR_LIB_RAND,func,0)
#define ERR_REASON(reason) ERR_PACK(ERR_LIB_RAND,0,reason)
static ERR_STRING_DATA RAND_str_functs[] = {
static const ERR_STRING_DATA RAND_str_functs[] = {
{ERR_FUNC(0xfff), "CRYPTO_internal"},
{0, NULL}
};
static ERR_STRING_DATA RAND_str_reasons[] = {
static const ERR_STRING_DATA RAND_str_reasons[] = {
{ERR_REASON(RAND_R_DUAL_EC_DRBG_DISABLED), "dual ec drbg disabled"},
{ERR_REASON(RAND_R_ERROR_INITIALISING_DRBG), "error initialising drbg"},
{ERR_REASON(RAND_R_ERROR_INSTANTIATING_DRBG), "error instantiating drbg"},
@ -86,8 +88,8 @@ ERR_load_RAND_strings(void)
{
#ifndef OPENSSL_NO_ERR
if (ERR_func_error_string(RAND_str_functs[0].error) == NULL) {
ERR_load_strings(0, RAND_str_functs);
ERR_load_strings(0, RAND_str_reasons);
ERR_load_const_strings(RAND_str_functs);
ERR_load_const_strings(RAND_str_reasons);
}
#endif
}