]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
core: add param argument to KDF derive call
authorPauli <ppzgs1@gmail.com>
Fri, 26 Feb 2021 00:05:46 +0000 (10:05 +1000)
committerPauli <ppzgs1@gmail.com>
Sun, 28 Feb 2021 07:25:49 +0000 (17:25 +1000)
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

doc/man7/provider-kdf.pod
include/openssl/core_dispatch.h

index 4d3d91a4e7be8ffd70437bb0e2a2b7207df2d360..0b13537e8d454ca3549498712980030bc46550fe 100644 (file)
@@ -24,7 +24,8 @@ provider-kdf - The KDF library E<lt>-E<gt> provider functions
 
  /* Encryption/decryption */
  int OSSL_FUNC_kdf_reset(void *kctx);
- int OSSL_FUNC_kdf_derive(void *kctx, unsigned char *key, size_t keylen);
+ int OSSL_FUNC_kdf_derive(void *kctx, unsigned char *key, size_t keylen,
+                          const OSSL_PARAM params[]);
 
  /* KDF parameter descriptors */
  const OSSL_PARAM *OSSL_FUNC_kdf_gettable_params(void *provctx);
@@ -108,7 +109,8 @@ I<kctx> parameter and return the duplicate copy.
 OSSL_FUNC_kdf_reset() initialises a KDF operation given a provider
 side KDF context in the I<kctx> parameter.
 
-OSSL_FUNC_kdf_derive() performs the KDF operation.
+OSSL_FUNC_kdf_derive() performs the KDF operation after processing the
+I<params> as per OSSL_FUNC_kdf_set_ctx_params().
 The I<kctx> parameter contains a pointer to the provider side context.
 The resulting key of the desired I<keylen> should be written to I<key>.
 If the algorithm does not support the requested I<keylen> the function must
index 97939a46fe8b9e15e8c7208d1bd1a57b03bb7cf7..d4f34557a6b12df618e2e711e31c93ca248f86e8 100644 (file)
@@ -374,7 +374,7 @@ OSSL_CORE_MAKE_FUNC(void *, kdf_dupctx, (void *src))
 OSSL_CORE_MAKE_FUNC(void, kdf_freectx, (void *kctx))
 OSSL_CORE_MAKE_FUNC(void, kdf_reset, (void *kctx))
 OSSL_CORE_MAKE_FUNC(int, kdf_derive, (void *kctx, unsigned char *key,
-                                          size_t keylen))
+                                      size_t keylen, const OSSL_PARAM params[]))
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_gettable_params, (void *provctx))
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_gettable_ctx_params,
                     (void *kctx, void *provctx))