/*
- * Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2000-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
/* EVP_MD_CTX related stuff */
#include <openssl/core_numbers.h>
+#include "internal/refcount.h"
#define EVP_CTRL_RET_UNSUPPORTED -1
void *data; /* Algorithm-specific data */
} /* EVP_KDF_CTX */ ;
+struct evp_rand_ctx_st {
+ EVP_RAND *meth; /* Method structure */
+ void *data; /* Algorithm-specific data */
+ size_t max_request; /*
+ * Cached: maximum number of bytes generated
+ * in a single call to the generate function
+ */
+ unsigned int strength; /* Cached: bit strength of generator */
+} /* EVP_RAND_CTX */ ;
+
+struct evp_rand_st {
+ OSSL_PROVIDER *prov;
+ int name_id;
+ CRYPTO_REF_COUNT refcnt;
+ CRYPTO_RWLOCK *refcnt_lock;
+
+ const OSSL_DISPATCH *dispatch;
+ OSSL_OP_rand_newctx_fn *newctx;
+ OSSL_OP_rand_freectx_fn *freectx;
+ OSSL_OP_rand_instantiate_fn *instantiate;
+ OSSL_OP_rand_uninstantiate_fn *uninstantiate;
+ OSSL_OP_rand_generate_fn *generate;
+ OSSL_OP_rand_reseed_fn *reseed;
+ OSSL_OP_rand_nonce_fn *nonce;
+ OSSL_OP_rand_enable_locking_fn *enable_locking;
+ OSSL_OP_rand_lock_fn *lock;
+ OSSL_OP_rand_unlock_fn *unlock;
+ OSSL_OP_rand_gettable_params_fn *gettable_params;
+ OSSL_OP_rand_gettable_ctx_params_fn *gettable_ctx_params;
+ OSSL_OP_rand_settable_ctx_params_fn *settable_ctx_params;
+ OSSL_OP_rand_get_params_fn *get_params;
+ OSSL_OP_rand_get_ctx_params_fn *get_ctx_params;
+ OSSL_OP_rand_set_ctx_params_fn *set_ctx_params;
+ OSSL_OP_rand_set_callbacks_fn *set_callbacks;
+ OSSL_OP_rand_verify_zeroization_fn *verify_zeroization;
+} /* EVP_RAND */ ;
+
struct evp_keymgmt_st {
int id; /* libcrypto internal */
OSSL_OP_keymgmt_set_params_fn *set_params;
OSSL_OP_keymgmt_settable_params_fn *settable_params;
+ /* Generation, a complex constructor */
+ OSSL_OP_keymgmt_gen_init_fn *gen_init;
+ OSSL_OP_keymgmt_gen_set_template_fn *gen_set_template;
+ OSSL_OP_keymgmt_gen_set_params_fn *gen_set_params;
+ OSSL_OP_keymgmt_gen_settable_params_fn *gen_settable_params;
+ OSSL_OP_keymgmt_gen_fn *gen;
+ OSSL_OP_keymgmt_gen_cleanup_fn *gen_cleanup;
+
/* Key object checking */
OSSL_OP_keymgmt_query_operation_name_fn *query_operation_name;
OSSL_OP_keymgmt_has_fn *has;