X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=include%2Fopenssl%2Frand_drbg.h;h=c37df348d2860cf9bd309f4ebfee12ce50ad727d;hp=984c40df91e5531b79dcd59d50138adebff82132;hb=8da42c8b26393f56acc4f301b95f925eb8902442;hpb=50cd4768c6b89c757645f28519236bb989216f8d diff --git a/include/openssl/rand_drbg.h b/include/openssl/rand_drbg.h index 984c40df91..c37df348d2 100644 --- a/include/openssl/rand_drbg.h +++ b/include/openssl/rand_drbg.h @@ -1,5 +1,5 @@ /* - * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -7,8 +7,14 @@ * https://www.openssl.org/source/license.html */ -#ifndef HEADER_DRBG_RAND_H -# define HEADER_DRBG_RAND_H +#ifndef OPENSSL_RAND_DRBG_H +# define OPENSSL_RAND_DRBG_H +# pragma once + +# include +# ifndef OPENSSL_NO_DEPRECATED_3_0 +# define HEADER_DRBG_RAND_H +# endif # include # include @@ -36,7 +42,7 @@ /* Used by RAND_DRBG_set_defaults() to set the private DRBG type and flags. */ # define RAND_DRBG_FLAG_PRIVATE 0x10 -# if !OPENSSL_API_3 +# ifndef OPENSSL_NO_DEPRECATED_3_0 /* This #define was replaced by an internal constant and should not be used. */ # define RAND_DRBG_USED_FLAGS (RAND_DRBG_FLAG_CTR_NO_DF) # endif @@ -117,7 +123,7 @@ RAND_DRBG *RAND_DRBG_get0_private(void); * EXDATA */ # define RAND_DRBG_get_ex_new_index(l, p, newf, dupf, freef) \ - CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DRBG, l, p, newf, dupf, freef) + CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_RAND_DRBG, l, p, newf, dupf, freef) int RAND_DRBG_set_ex_data(RAND_DRBG *drbg, int idx, void *arg); void *RAND_DRBG_get_ex_data(const RAND_DRBG *drbg, int idx); @@ -144,6 +150,10 @@ int RAND_DRBG_set_callbacks(RAND_DRBG *drbg, RAND_DRBG_cleanup_nonce_fn cleanup_nonce); +int RAND_DRBG_set_callback_data(RAND_DRBG *drbg, void *data); + +void *RAND_DRBG_get_callback_data(RAND_DRBG *drbg); + # ifdef __cplusplus } # endif