Skip to content

Commit

Permalink
prov/drbg: cleanup some RAND_DRBG leftovers
Browse files Browse the repository at this point in the history
These are leftovers from the RAND_DRBG removal (openssl#12509).

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from openssl#12866)
  • Loading branch information
mspncp committed Sep 14, 2020
1 parent 1d30b0a commit 4f14a37
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 45 deletions.
7 changes: 0 additions & 7 deletions crypto/err/openssl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1136,17 +1136,10 @@ RAND_F_GET_ENTROPY:106:get_entropy
RAND_F_RAND_BYTES:100:RAND_bytes
RAND_F_RAND_BYTES_EX:126:rand_bytes_ex
RAND_F_RAND_DRBG_ENABLE_LOCKING:119:rand_drbg_enable_locking
RAND_F_RAND_DRBG_GENERATE:107:RAND_DRBG_generate
RAND_F_RAND_DRBG_GET_ENTROPY:120:rand_drbg_get_entropy
RAND_F_RAND_DRBG_GET_NONCE:123:rand_drbg_get_nonce
RAND_F_RAND_DRBG_INIT_METHOD:130:
RAND_F_RAND_DRBG_INSTANTIATE:108:RAND_DRBG_instantiate
RAND_F_RAND_DRBG_NEW:109:RAND_DRBG_new
RAND_F_RAND_DRBG_RESEED:110:RAND_DRBG_reseed
RAND_F_RAND_DRBG_RESTART:102:rand_drbg_restart
RAND_F_RAND_DRBG_SET:104:RAND_DRBG_set
RAND_F_RAND_DRBG_SET_DEFAULTS:121:RAND_DRBG_set_defaults
RAND_F_RAND_DRBG_UNINSTANTIATE:118:RAND_DRBG_uninstantiate
RAND_F_RAND_LOAD_FILE:111:RAND_load_file
RAND_F_RAND_POOL_ACQUIRE_ENTROPY:122:rand_pool_acquire_entropy
RAND_F_RAND_POOL_ADD:103:rand_pool_add
Expand Down
4 changes: 2 additions & 2 deletions providers/fips/self_test_kats.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ static int self_test_drbg(const ST_KAT_DRBG *t, OSSL_SELF_TEST *st,
if (!EVP_RAND_set_ctx_params(test, drbg_params))
goto err;

/* This calls RAND_DRBG_reseed() internally when prediction_resistance = 1 */
/* This calls PROV_DRBG_reseed() internally when prediction_resistance = 1 */
if (!EVP_RAND_generate(drbg, out, t->expectedlen, strength,
prediction_resistance,
t->entropyaddin2, t->entropyaddin2len))
Expand All @@ -329,7 +329,7 @@ static int self_test_drbg(const ST_KAT_DRBG *t, OSSL_SELF_TEST *st,
if (!EVP_RAND_uninstantiate(drbg))
goto err;
/*
* Check that the DRBG data has been zeroized after RAND_DRBG_uninstantiate.
* Check that the DRBG data has been zeroized after PROV_DRBG_uninstantiate.
*/
if (!EVP_RAND_verify_zeroization(drbg))
goto err;
Expand Down
6 changes: 3 additions & 3 deletions providers/implementations/rands/drbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ static unsigned int get_parent_reseed_count(PROV_DRBG *drbg)
}

/*
* Implements the get_entropy() callback (see RAND_DRBG_set_callbacks())
* Implements the get_entropy() callback
*
* If the DRBG has a parent, then the required amount of entropy input
* is fetched using the parent's RAND_DRBG_generate().
* is fetched using the parent's PROV_DRBG_generate().
*
* Otherwise, the entropy is polled from the system entropy sources
* using prov_pool_acquire_entropy().
Expand Down Expand Up @@ -229,7 +229,7 @@ static size_t prov_drbg_get_entropy(PROV_DRBG *drbg, unsigned char **pout,
}

/*
* Implements the cleanup_entropy() callback (see RAND_DRBG_set_callbacks())
* Implements the cleanup_entropy() callback
*
*/
static void prov_drbg_cleanup_entropy(PROV_DRBG *drbg,
Expand Down
6 changes: 0 additions & 6 deletions test/drbgtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
* https://www.openssl.org/source/license.html
*/

/*
* RAND_DRBG_set is deprecated for public use, but still ok for
* internal use.
*/
#include "internal/deprecated.h"

#include <string.h>
#include "internal/nelem.h"
#include <openssl/crypto.h>
Expand Down
22 changes: 0 additions & 22 deletions util/libcrypto.num
Original file line number Diff line number Diff line change
Expand Up @@ -4198,17 +4198,6 @@ OSSL_STORE_LOADER_get0_engine 4287 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_
OPENSSL_fork_prepare 4288 3_0_0 EXIST:UNIX:FUNCTION:
OPENSSL_fork_parent 4289 3_0_0 EXIST:UNIX:FUNCTION:
OPENSSL_fork_child 4290 3_0_0 EXIST:UNIX:FUNCTION:
RAND_DRBG_instantiate 4292 3_0_0 NOEXIST::FUNCTION:
RAND_DRBG_uninstantiate 4293 3_0_0 NOEXIST::FUNCTION:
RAND_DRBG_set 4295 3_0_0 NOEXIST::FUNCTION:DEPRECATEDIN_3_0
RAND_DRBG_set_callbacks 4296 3_0_0 NOEXIST::FUNCTION:
RAND_DRBG_new 4297 3_0_0 NOEXIST::FUNCTION:
RAND_DRBG_set_reseed_interval 4298 3_0_0 NOEXIST::FUNCTION:
RAND_DRBG_free 4299 3_0_0 NOEXIST::FUNCTION:
RAND_DRBG_generate 4300 3_0_0 NOEXIST::FUNCTION:
RAND_DRBG_reseed 4301 3_0_0 NOEXIST::FUNCTION:
RAND_DRBG_set_ex_data 4302 3_0_0 NOEXIST::FUNCTION:
RAND_DRBG_get_ex_data 4303 3_0_0 NOEXIST::FUNCTION:
EVP_sha3_224 4304 3_0_0 EXIST::FUNCTION:
EVP_sha3_256 4305 3_0_0 EXIST::FUNCTION:
EVP_sha3_384 4306 3_0_0 EXIST::FUNCTION:
Expand All @@ -4223,7 +4212,6 @@ SCRYPT_PARAMS_it 4314 3_0_0 EXIST::FUNCTION:SCRYPT
CRYPTO_secure_clear_free 4315 3_0_0 EXIST::FUNCTION:
EVP_PKEY_meth_get0 4316 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
EVP_PKEY_meth_get_count 4317 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
RAND_DRBG_get0_public 4319 3_0_0 NOEXIST::FUNCTION:
RAND_priv_bytes 4320 3_0_0 EXIST::FUNCTION:
BN_priv_rand 4321 3_0_0 EXIST::FUNCTION:
BN_priv_rand_range 4322 3_0_0 EXIST::FUNCTION:
Expand All @@ -4233,7 +4221,6 @@ ASN1_TIME_compare 4325 3_0_0 EXIST::FUNCTION:
EVP_PKEY_CTX_ctrl_uint64 4326 3_0_0 EXIST::FUNCTION:
EVP_DigestFinalXOF 4327 3_0_0 EXIST::FUNCTION:
ERR_clear_last_mark 4328 3_0_0 EXIST::FUNCTION:
RAND_DRBG_get0_private 4329 3_0_0 NOEXIST::FUNCTION:
EVP_aria_192_ccm 4330 3_0_0 EXIST::FUNCTION:ARIA
EVP_aria_256_gcm 4331 3_0_0 EXIST::FUNCTION:ARIA
EVP_aria_256_ccm 4332 3_0_0 EXIST::FUNCTION:ARIA
Expand Down Expand Up @@ -4281,8 +4268,6 @@ RSA_set0_multi_prime_params 4376 3_0_0 EXIST::FUNCTION:RSA
RSA_get_version 4377 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,RSA
RSA_meth_get_multi_prime_keygen 4378 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,RSA
RSA_meth_set_multi_prime_keygen 4379 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,RSA
RAND_DRBG_get0_master 4380 3_0_0 NOEXIST::FUNCTION:
RAND_DRBG_set_reseed_time_interval 4381 3_0_0 NOEXIST::FUNCTION:
PROFESSION_INFO_get0_addProfessionInfo 4382 3_0_0 EXIST::FUNCTION:
ADMISSION_SYNTAX_free 4383 3_0_0 EXIST::FUNCTION:
d2i_ADMISSION_SYNTAX 4384 3_0_0 EXIST::FUNCTION:
Expand Down Expand Up @@ -4332,7 +4317,6 @@ ADMISSION_SYNTAX_new 4427 3_0_0 EXIST::FUNCTION:
EVP_sha512_256 4428 3_0_0 EXIST::FUNCTION:
EVP_sha512_224 4429 3_0_0 EXIST::FUNCTION:
OCSP_basic_sign_ctx 4430 3_0_0 EXIST::FUNCTION:OCSP
RAND_DRBG_bytes 4431 3_0_0 NOEXIST::FUNCTION:
OSSL_STORE_vctrl 4433 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
OSSL_STORE_SEARCH_by_alias 4434 3_0_0 EXIST::FUNCTION:
BIO_bind 4435 3_0_0 EXIST::FUNCTION:SOCK
Expand All @@ -4352,13 +4336,11 @@ X509_get0_authority_key_id 4448 3_0_0 EXIST::FUNCTION:
OSSL_STORE_LOADER_set_find 4449 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
OSSL_STORE_SEARCH_free 4450 3_0_0 EXIST::FUNCTION:
OSSL_STORE_SEARCH_get0_digest 4451 3_0_0 EXIST::FUNCTION:
RAND_DRBG_set_reseed_defaults 4452 3_0_0 NOEXIST::FUNCTION:
EVP_PKEY_new_raw_private_key 4453 3_0_0 EXIST::FUNCTION:
EVP_PKEY_new_raw_public_key 4454 3_0_0 EXIST::FUNCTION:
EVP_PKEY_new_CMAC_key 4455 3_0_0 EXIST::FUNCTION:
EVP_PKEY_asn1_set_set_priv_key 4456 3_0_0 EXIST::FUNCTION:
EVP_PKEY_asn1_set_set_pub_key 4457 3_0_0 EXIST::FUNCTION:
RAND_DRBG_set_defaults 4458 3_0_0 NOEXIST::FUNCTION:
conf_ssl_name_find 4469 3_0_0 EXIST::FUNCTION:
conf_ssl_get_cmd 4470 3_0_0 EXIST::FUNCTION:
conf_ssl_get 4471 3_0_0 EXIST::FUNCTION:
Expand Down Expand Up @@ -4643,7 +4625,6 @@ OSSL_CMP_MSG_free ? 3_0_0 EXIST::FUNCTION:CMP
ERR_load_CMP_strings ? 3_0_0 EXIST::FUNCTION:CMP
EVP_MD_CTX_set_params ? 3_0_0 EXIST::FUNCTION:
EVP_MD_CTX_get_params ? 3_0_0 EXIST::FUNCTION:
RAND_DRBG_new_ex ? 3_0_0 NOEXIST::FUNCTION:
OPENSSL_CTX_get0_primary_drbg ? 3_0_0 NOEXIST::FUNCTION:
OPENSSL_CTX_get0_public_drbg ? 3_0_0 NOEXIST::FUNCTION:
OPENSSL_CTX_get0_private_drbg ? 3_0_0 NOEXIST::FUNCTION:
Expand Down Expand Up @@ -4930,8 +4911,6 @@ EVP_PKEY_pairwise_check ? 3_0_0 EXIST::FUNCTION:
ASN1_item_verify_ctx ? 3_0_0 EXIST::FUNCTION:
ASN1_item_sign_with_libctx ? 3_0_0 EXIST::FUNCTION:
ASN1_item_verify_with_libctx ? 3_0_0 EXIST::FUNCTION:
RAND_DRBG_set_callback_data ? 3_0_0 NOEXIST::FUNCTION:
RAND_DRBG_get_callback_data ? 3_0_0 NOEXIST::FUNCTION:
BIO_socket_wait ? 3_0_0 EXIST::FUNCTION:SOCK
BIO_wait ? 3_0_0 EXIST::FUNCTION:
BIO_do_connect_retry ? 3_0_0 EXIST::FUNCTION:
Expand Down Expand Up @@ -5118,7 +5097,6 @@ EVP_RAND_enable_locking ? 3_0_0 EXIST::FUNCTION:
EVP_RAND_verify_zeroization ? 3_0_0 EXIST::FUNCTION:
EVP_RAND_strength ? 3_0_0 EXIST::FUNCTION:
EVP_RAND_state ? 3_0_0 EXIST::FUNCTION:
RAND_DRBG_verify_zeroization ? 3_0_0 NOEXIST::FUNCTION:
EVP_default_properties_is_fips_enabled ? 3_0_0 EXIST::FUNCTION:
EVP_default_properties_enable_fips ? 3_0_0 EXIST::FUNCTION:
EVP_PKEY_new_raw_private_key_with_libctx ? 3_0_0 EXIST::FUNCTION:
Expand Down
5 changes: 0 additions & 5 deletions util/other.syms
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ OSSL_STORE_post_process_info_fn datatype
OSSL_trace_cb datatype
PROFESSION_INFO datatype
PROFESSION_INFOS datatype
RAND_DRBG_cleanup_entropy_fn datatype
RAND_DRBG_cleanup_nonce_fn datatype
RAND_DRBG_get_entropy_fn datatype
RAND_DRBG_get_nonce_fn datatype
RAND_poll_cb datatype
SSL_CTX_allow_early_data_cb_fn datatype
SSL_CTX_keylog_cb_func datatype
Expand Down Expand Up @@ -427,7 +423,6 @@ PEM_FLAG_EAY_COMPATIBLE define
PEM_FLAG_ONLY_B64 define
PEM_FLAG_SECURE define
RAND_cleanup define deprecated 1.1.0
RAND_DRBG_get_ex_new_index define
SSL_COMP_free_compression_methods define deprecated 1.1.0
SSL_CTX_add0_chain_cert define
SSL_CTX_add1_chain_cert define
Expand Down

0 comments on commit 4f14a37

Please sign in to comment.