apps: avoid memory overrun.
[oweals/openssl.git] / include / openssl / core_numbers.h
index ce8306e5bcdcdcee514b4e45a3b58a140de8c461..af2a35efc096746cda493488ce5dea2a8e9b1b7c 100644 (file)
@@ -359,28 +359,28 @@ OSSL_CORE_MAKE_FUNC(int, OP_kdf_set_ctx_params,
 # define OSSL_FUNC_RAND_GET_CTX_PARAMS               15
 # define OSSL_FUNC_RAND_SET_CTX_PARAMS               16
 # define OSSL_FUNC_RAND_SET_CALLBACKS                17
+# define OSSL_FUNC_RAND_VERIFY_ZEROIZATION           18
 
 OSSL_CORE_MAKE_FUNC(void *, OP_rand_newctx,
-                    (void *provctx, int secure, unsigned int df, void *parent,
+                    (void *provctx, void *parent,
                     const OSSL_DISPATCH *parent_calls))
 OSSL_CORE_MAKE_FUNC(void, OP_rand_freectx, (void *vctx))
 OSSL_CORE_MAKE_FUNC(int, OP_rand_instantiate,
-                    (void *vdrbg, int strength, int prediction_resistance,
+                    (void *vdrbg, unsigned int strength,
+                     int prediction_resistance,
                      const unsigned char *pstr, size_t pstr_len))
 OSSL_CORE_MAKE_FUNC(int, OP_rand_uninstantiate, (void *vdrbg))
 OSSL_CORE_MAKE_FUNC(int, OP_rand_generate,
                     (void *vctx, unsigned char *out, size_t outlen,
-                     int strength, int prediction_resistance,
+                     unsigned int strength, int prediction_resistance,
                      const unsigned char *addin, size_t addin_len))
 OSSL_CORE_MAKE_FUNC(int, OP_rand_reseed,
                     (void *vctx, int prediction_resistance,
+                     const unsigned char *ent, size_t ent_len,
                      const unsigned char *addin, size_t addin_len))
-OSSL_CORE_MAKE_FUNC(int, OP_rand_nonce,
-                    (void *vctx, unsigned char *out, size_t outlen))
-OSSL_CORE_MAKE_FUNC(int, OP_rand_set_callbacks,
-                    (void *vctx,
-                     OSSL_CALLBACK *get_entropy, OSSL_CALLBACK *cleanup_entropy,
-                     OSSL_CALLBACK *get_nonce, OSSL_CALLBACK *cleanup_nonce))
+OSSL_CORE_MAKE_FUNC(size_t, OP_rand_nonce,
+                    (void *vctx, unsigned char *out, unsigned int strength,
+                     size_t min_noncelen, size_t max_noncelen))
 OSSL_CORE_MAKE_FUNC(int, OP_rand_enable_locking, (void *vctx))
 OSSL_CORE_MAKE_FUNC(int, OP_rand_lock, (void *vctx))
 OSSL_CORE_MAKE_FUNC(void, OP_rand_unlock, (void *vctx))
@@ -392,6 +392,13 @@ OSSL_CORE_MAKE_FUNC(int, OP_rand_get_ctx_params,
                     (void *vctx, OSSL_PARAM params[]))
 OSSL_CORE_MAKE_FUNC(int, OP_rand_set_ctx_params,
                     (void *vctx, const OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(void, OP_rand_set_callbacks,
+                    (void *vctx, OSSL_INOUT_CALLBACK *get_entropy,
+                     OSSL_CALLBACK *cleanup_entropy,
+                     OSSL_INOUT_CALLBACK *get_nonce,
+                     OSSL_CALLBACK *cleanup_nonce, void *arg))
+OSSL_CORE_MAKE_FUNC(int, OP_rand_verify_zeroization,
+                    (void *vctx))
 
 /*-
  * Key management