[openssl] master update

shane.lontis at oracle.com shane.lontis at oracle.com
Thu Oct 22 10:49:17 UTC 2020


The branch master has been updated
       via  a49d0a491c659aacabadc957ab11c738db03a734 (commit)
       via  1ba21239ddbd1b18a3676efaa8dd9402e1468818 (commit)
       via  90a2576b9bbb327141df0bd244830b462fcaeee6 (commit)
      from  42445046354a4ac7671143600e888c6b230e56ff (commit)


- Log -----------------------------------------------------------------
commit a49d0a491c659aacabadc957ab11c738db03a734
Author: Shane Lontis <shane.lontis at oracle.com>
Date:   Tue Oct 13 14:33:01 2020 +1000

    Rename EVP_KDF_reset() to EVP_KDF_CTX_reset().
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/13116)

commit 1ba21239ddbd1b18a3676efaa8dd9402e1468818
Author: Shane Lontis <shane.lontis at oracle.com>
Date:   Tue Oct 13 14:30:12 2020 +1000

    Rename EVP_KDF_size() to EVP_KDF_CTX_get_kdf_size().
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/13116)

commit 90a2576b9bbb327141df0bd244830b462fcaeee6
Author: Shane Lontis <shane.lontis at oracle.com>
Date:   Tue Oct 13 14:22:17 2020 +1000

    Rename EVP_MAC_size() to EVP_MAC_CTX_get_mac_size().
    
    Fixes #11320
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/13116)

-----------------------------------------------------------------------

Summary of changes:
 apps/fipsinstall.c                        |  2 +-
 crypto/evp/kdf_lib.c                      |  4 ++--
 crypto/evp/mac_lib.c                      |  4 ++--
 doc/man3/EVP_KDF.pod                      | 18 +++++++++---------
 doc/man3/EVP_MAC.pod                      |  9 ++++-----
 doc/man7/EVP_KDF-HKDF.pod                 |  6 +++---
 doc/man7/EVP_KDF-KB.pod                   |  2 +-
 doc/man7/EVP_KDF-KRB5KDF.pod              |  4 ++--
 doc/man7/EVP_KDF-SS.pod                   |  2 +-
 doc/man7/EVP_KDF-SSHKDF.pod               |  4 ++--
 doc/man7/EVP_KDF-X942.pod                 |  2 +-
 doc/man7/EVP_KDF-X963.pod                 |  2 +-
 doc/man7/EVP_MAC-BLAKE2.pod               |  2 +-
 doc/man7/EVP_MAC-CMAC.pod                 |  2 +-
 doc/man7/EVP_MAC-GMAC.pod                 |  2 +-
 doc/man7/EVP_MAC-HMAC.pod                 |  2 +-
 doc/man7/EVP_MAC-KMAC.pod                 |  2 +-
 doc/man7/EVP_MAC-Poly1305.pod             |  2 +-
 doc/man7/EVP_MAC-Siphash.pod              |  2 +-
 include/openssl/evp.h                     |  2 +-
 include/openssl/kdf.h                     |  4 ++--
 providers/implementations/kdfs/kbkdf.c    |  2 +-
 providers/implementations/kdfs/sskdf.c    |  2 +-
 providers/implementations/kdfs/tls1_prf.c |  2 +-
 ssl/t1_lib.c                              |  2 +-
 util/libcrypto.num                        |  6 +++---
 26 files changed, 46 insertions(+), 47 deletions(-)

diff --git a/apps/fipsinstall.c b/apps/fipsinstall.c
index cb78489eef..d1cda24941 100644
--- a/apps/fipsinstall.c
+++ b/apps/fipsinstall.c
@@ -80,7 +80,7 @@ static int do_mac(EVP_MAC_CTX *ctx, unsigned char *tmp, BIO *in,
 
     if (!EVP_MAC_init(ctx))
         goto err;
-    if (EVP_MAC_size(ctx) > outsz)
+    if (EVP_MAC_CTX_get_mac_size(ctx) > outsz)
         goto end;
     while ((i = BIO_read(in, (char *)tmp, BUFSIZE)) != 0) {
         if (i < 0 || !EVP_MAC_update(ctx, tmp, i))
diff --git a/crypto/evp/kdf_lib.c b/crypto/evp/kdf_lib.c
index 9ccaec8cc1..7a3e9d681c 100644
--- a/crypto/evp/kdf_lib.c
+++ b/crypto/evp/kdf_lib.c
@@ -110,7 +110,7 @@ const EVP_KDF *EVP_KDF_CTX_kdf(EVP_KDF_CTX *ctx)
     return ctx->meth;
 }
 
-void EVP_KDF_reset(EVP_KDF_CTX *ctx)
+void EVP_KDF_CTX_reset(EVP_KDF_CTX *ctx)
 {
     if (ctx == NULL)
         return;
@@ -119,7 +119,7 @@ void EVP_KDF_reset(EVP_KDF_CTX *ctx)
         ctx->meth->reset(ctx->data);
 }
 
-size_t EVP_KDF_size(EVP_KDF_CTX *ctx)
+size_t EVP_KDF_CTX_get_kdf_size(EVP_KDF_CTX *ctx)
 {
     OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END };
     size_t s;
diff --git a/crypto/evp/mac_lib.c b/crypto/evp/mac_lib.c
index d76ffedcb8..ac8bfb150c 100644
--- a/crypto/evp/mac_lib.c
+++ b/crypto/evp/mac_lib.c
@@ -82,7 +82,7 @@ EVP_MAC *EVP_MAC_CTX_mac(EVP_MAC_CTX *ctx)
     return ctx->meth;
 }
 
-size_t EVP_MAC_size(EVP_MAC_CTX *ctx)
+size_t EVP_MAC_CTX_get_mac_size(EVP_MAC_CTX *ctx)
 {
     size_t sz = 0;
 
@@ -124,7 +124,7 @@ int EVP_MAC_final(EVP_MAC_CTX *ctx,
     if (out != NULL)
         res = ctx->meth->final(ctx->data, out, &l, outsize);
     else
-        l = EVP_MAC_size(ctx);
+        l = EVP_MAC_CTX_get_mac_size(ctx);
     if (outl != NULL)
         *outl = l;
     return res;
diff --git a/doc/man3/EVP_KDF.pod b/doc/man3/EVP_KDF.pod
index 3dba50cdb6..103eafe8c1 100644
--- a/doc/man3/EVP_KDF.pod
+++ b/doc/man3/EVP_KDF.pod
@@ -4,8 +4,8 @@
 
 EVP_KDF, EVP_KDF_fetch, EVP_KDF_free, EVP_KDF_up_ref,
 EVP_KDF_CTX, EVP_KDF_CTX_new, EVP_KDF_CTX_free, EVP_KDF_CTX_dup,
-EVP_KDF_reset, EVP_KDF_derive,
-EVP_KDF_size, EVP_KDF_provider, EVP_KDF_CTX_kdf, EVP_KDF_is_a,
+EVP_KDF_CTX_reset, EVP_KDF_derive,
+EVP_KDF_CTX_get_kdf_size, EVP_KDF_provider, EVP_KDF_CTX_kdf, EVP_KDF_is_a,
 EVP_KDF_number, EVP_KDF_name, EVP_KDF_names_do_all,
 EVP_KDF_CTX_get_params, EVP_KDF_CTX_set_params, EVP_KDF_do_all_provided,
 EVP_KDF_get_params, EVP_KDF_gettable_ctx_params, EVP_KDF_settable_ctx_params,
@@ -22,8 +22,8 @@ EVP_KDF_gettable_params - EVP KDF routines
  const EVP_KDF *EVP_KDF_CTX_kdf(EVP_KDF_CTX *ctx);
  void EVP_KDF_CTX_free(EVP_KDF_CTX *ctx);
  EVP_KDF_CTX *EVP_KDF_CTX_dup(const EVP_KDF_CTX *src);
- void EVP_KDF_reset(EVP_KDF_CTX *ctx);
- size_t EVP_KDF_size(EVP_KDF_CTX *ctx);
+ void EVP_KDF_CTX_reset(EVP_KDF_CTX *ctx);
+ size_t EVP_KDF_CTX_get_kdf_size(EVP_KDF_CTX *ctx);
  int EVP_KDF_derive(EVP_KDF_CTX *ctx, unsigned char *key, size_t keylen);
  int EVP_KDF_up_ref(EVP_KDF *kdf);
  void EVP_KDF_free(EVP_KDF *kdf);
@@ -93,13 +93,13 @@ I<ctx>.
 
 =head2 Computing functions
 
-EVP_KDF_reset() resets the context to the default state as if the context
+EVP_KDF_CTX_reset() resets the context to the default state as if the context
 had just been created.
 
 EVP_KDF_derive() derives I<keylen> bytes of key material and places it in the
 I<key> buffer.  If the algorithm produces a fixed amount of output then an
 error will occur unless the I<keylen> parameter is equal to that output size,
-as returned by EVP_KDF_size().
+as returned by EVP_KDF_CTX_get_kdf_size().
 
 EVP_KDF_get_params() retrieves details about the implementation
 I<kdf>.
@@ -133,7 +133,7 @@ See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as parameter descriptor.
 
 =head2 Information functions
 
-EVP_KDF_size() returns the output size if the algorithm produces a fixed amount
+EVP_KDF_CTX_get_kdf_size() returns the output size if the algorithm produces a fixed amount
 of output and B<SIZE_MAX> otherwise.  If an error occurs then 0 is returned.
 For some algorithms an error may result if input parameters necessary to
 calculate a fixed output size have not yet been supplied.
@@ -245,9 +245,9 @@ EVP_KDF_up_ref() returns 1 on success, 0 on error.
 EVP_KDF_CTX_new() returns either the newly allocated
 B<EVP_KDF_CTX> structure or NULL if an error occurred.
 
-EVP_KDF_CTX_free() and EVP_KDF_reset() do not return a value.
+EVP_KDF_CTX_free() and EVP_KDF_CTX_reset() do not return a value.
 
-EVP_KDF_size() returns the output size.  B<SIZE_MAX> is returned to indicate
+EVP_KDF_CTX_get_kdf_size() returns the output size.  B<SIZE_MAX> is returned to indicate
 that the algorithm produces a variable amount of output; 0 to indicate failure.
 
 EVP_KDF_name() returns the name of the KDF, or NULL on error.
diff --git a/doc/man3/EVP_MAC.pod b/doc/man3/EVP_MAC.pod
index 87f2518754..455d154cee 100644
--- a/doc/man3/EVP_MAC.pod
+++ b/doc/man3/EVP_MAC.pod
@@ -7,7 +7,7 @@ EVP_MAC_is_a, EVP_MAC_number, EVP_MAC_name, EVP_MAC_names_do_all,
 EVP_MAC_provider, EVP_MAC_get_params, EVP_MAC_gettable_params,
 EVP_MAC_CTX, EVP_MAC_CTX_new, EVP_MAC_CTX_free, EVP_MAC_CTX_dup,
 EVP_MAC_CTX_mac, EVP_MAC_CTX_get_params, EVP_MAC_CTX_set_params,
-EVP_MAC_size, EVP_MAC_init, EVP_MAC_update, EVP_MAC_final,
+EVP_MAC_CTX_get_mac_size, EVP_MAC_init, EVP_MAC_update, EVP_MAC_final,
 EVP_MAC_gettable_ctx_params, EVP_MAC_settable_ctx_params,
 EVP_MAC_do_all_provided - EVP MAC routines
 
@@ -38,7 +38,7 @@ EVP_MAC_do_all_provided - EVP MAC routines
  int EVP_MAC_CTX_get_params(EVP_MAC_CTX *ctx, OSSL_PARAM params[]);
  int EVP_MAC_CTX_set_params(EVP_MAC_CTX *ctx, const OSSL_PARAM params[]);
 
- size_t EVP_MAC_size(EVP_MAC_CTX *ctx);
+ size_t EVP_MAC_CTX_get_mac_size(EVP_MAC_CTX *ctx);
  int EVP_MAC_init(EVP_MAC_CTX *ctx);
  int EVP_MAC_update(EVP_MAC_CTX *ctx, const unsigned char *data, size_t datalen);
  int EVP_MAC_final(EVP_MAC_CTX *ctx,
@@ -162,7 +162,7 @@ See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as parameter descriptor.
 
 =head2 Information functions
 
-EVP_MAC_size() returns the MAC output size for the given context.
+EVP_MAC_CTX_get_mac_size() returns the MAC output size for the given context.
 
 EVP_MAC_is_a() checks if the given I<mac> is an implementation of an
 algorithm that's identifiable with I<name>.
@@ -303,8 +303,7 @@ success, 0 on error.
 EVP_MAC_init(), EVP_MAC_update(), and EVP_MAC_final() return 1 on success, 0
 on error.
 
-EVP_MAC_size() returns the expected output size, or 0 if it isn't
-set.
+EVP_MAC_CTX_get_mac_size() returns the expected output size, or 0 if it isn't set.
 If it isn't set, a call to EVP_MAC_init() should get it set.
 
 EVP_MAC_do_all_provided() returns nothing at all.
diff --git a/doc/man7/EVP_KDF-HKDF.pod b/doc/man7/EVP_KDF-HKDF.pod
index a8bb5dacd9..830bf90e92 100644
--- a/doc/man7/EVP_KDF-HKDF.pod
+++ b/doc/man7/EVP_KDF-HKDF.pod
@@ -64,7 +64,7 @@ derived otherwise an error will occur.
 In this mode calling L<EVP_KDF_derive(3)> will just perform the extract
 operation. The value returned will be the intermediate fixed-length pseudorandom
 key K.  The I<keylen> parameter must match the size of K, which can be looked
-up by calling EVP_KDF_size() after setting the mode and digest.
+up by calling EVP_KDF_CTX_get_kdf_size() after setting the mode and digest.
 
 The digest, key and salt values must be set before a key is derived otherwise
 an error will occur.
@@ -93,7 +93,7 @@ The output length of an HKDF expand operation is specified via the I<keylen>
 parameter to the L<EVP_KDF_derive(3)> function.  When using
 EVP_KDF_HKDF_MODE_EXTRACT_ONLY the I<keylen> parameter must equal the size of
 the intermediate fixed-length pseudorandom key otherwise an error will occur.
-For that mode, the fixed output size can be looked up by calling EVP_KDF_size()
+For that mode, the fixed output size can be looked up by calling EVP_KDF_CTX_get_kdf_size()
 after setting the mode and digest on the B<EVP_KDF_CTX>.
 
 =head1 EXAMPLES
@@ -137,7 +137,7 @@ RFC 5869
 L<EVP_KDF(3)>,
 L<EVP_KDF_CTX_new(3)>,
 L<EVP_KDF_CTX_free(3)>,
-L<EVP_KDF_size(3)>,
+L<EVP_KDF_CTX_get_kdf_size(3)>,
 L<EVP_KDF_CTX_set_params(3)>,
 L<EVP_KDF_derive(3)>,
 L<EVP_KDF(3)/PARAMETERS>
diff --git a/doc/man7/EVP_KDF-KB.pod b/doc/man7/EVP_KDF-KB.pod
index 0a84e925d9..fdaa483e77 100644
--- a/doc/man7/EVP_KDF-KB.pod
+++ b/doc/man7/EVP_KDF-KB.pod
@@ -137,7 +137,7 @@ NIST SP800-108, IETF RFC 6803, IETF RFC 8009.
 
 L<EVP_KDF(3)>,
 L<EVP_KDF_CTX_free(3)>,
-L<EVP_KDF_size(3)>,
+L<EVP_KDF_CTX_get_kdf_size(3)>,
 L<EVP_KDF_derive(3)>,
 L<EVP_KDF(3)/PARAMETERS>
 
diff --git a/doc/man7/EVP_KDF-KRB5KDF.pod b/doc/man7/EVP_KDF-KRB5KDF.pod
index 62f941c3ca..8d730d40b8 100644
--- a/doc/man7/EVP_KDF-KRB5KDF.pod
+++ b/doc/man7/EVP_KDF-KRB5KDF.pod
@@ -51,7 +51,7 @@ parameter to the L<EVP_KDF_derive(3)> function, and MUST match the key
 length for the chosen cipher or an error is returned. Moreover, the
 constant's length must not exceed the block size of the cipher.
 Since the KRB5KDF output length depends on the chosen cipher, calling
-L<EVP_KDF_size(3)> to obtain the requisite length returns the correct length
+L<EVP_KDF_CTX_get_kdf_size(3)> to obtain the requisite length returns the correct length
 only after the cipher is set. Prior to that B<EVP_MAX_KEY_LENGTH> is returned.
 The caller must allocate a buffer of the correct length for the chosen
 cipher, and pass that buffer to the L<EVP_KDF_derive(3)> function along
@@ -98,7 +98,7 @@ RFC 3961
 L<EVP_KDF(3)>,
 L<EVP_KDF_CTX_free(3)>,
 L<EVP_KDF_ctrl(3)>,
-L<EVP_KDF_size(3)>,
+L<EVP_KDF_CTX_get_kdf_size(3)>,
 L<EVP_KDF_derive(3)>,
 L<EVP_KDF(3)/PARAMETERS>
 
diff --git a/doc/man7/EVP_KDF-SS.pod b/doc/man7/EVP_KDF-SS.pod
index e64417388f..088ffe0ea7 100644
--- a/doc/man7/EVP_KDF-SS.pod
+++ b/doc/man7/EVP_KDF-SS.pod
@@ -176,7 +176,7 @@ L<EVP_KDF(3)>,
 L<EVP_KDF_CTX_new(3)>,
 L<EVP_KDF_CTX_free(3)>,
 L<EVP_KDF_CTX_set_params(3)>,
-L<EVP_KDF_size(3)>,
+L<EVP_KDF_CTX_get_kdf_size(3)>,
 L<EVP_KDF_derive(3)>,
 L<EVP_KDF(3)/PARAMETERS>
 
diff --git a/doc/man7/EVP_KDF-SSHKDF.pod b/doc/man7/EVP_KDF-SSHKDF.pod
index e91858c051..454bb6b699 100644
--- a/doc/man7/EVP_KDF-SSHKDF.pod
+++ b/doc/man7/EVP_KDF-SSHKDF.pod
@@ -91,7 +91,7 @@ A context for SSHKDF can be obtained by calling:
 
 The output length of the SSHKDF derivation is specified via the I<keylen>
 parameter to the L<EVP_KDF_derive(3)> function.
-Since the SSHKDF output length is variable, calling L<EVP_KDF_size(3)>
+Since the SSHKDF output length is variable, calling L<EVP_KDF_CTX_get_kdf_size(3)>
 to obtain the requisite length is not meaningful. The caller must
 allocate a buffer of the desired length, and pass that buffer to the
 L<EVP_KDF_derive(3)> function along with the desired length.
@@ -142,7 +142,7 @@ L<EVP_KDF(3)>,
 L<EVP_KDF_CTX_new(3)>,
 L<EVP_KDF_CTX_free(3)>,
 L<EVP_KDF_CTX_set_params(3)>,
-L<EVP_KDF_size(3)>,
+L<EVP_KDF_CTX_get_kdf_size(3)>,
 L<EVP_KDF_derive(3)>,
 L<EVP_KDF(3)/PARAMETERS>
 
diff --git a/doc/man7/EVP_KDF-X942.pod b/doc/man7/EVP_KDF-X942.pod
index e607212b28..70da41437b 100644
--- a/doc/man7/EVP_KDF-X942.pod
+++ b/doc/man7/EVP_KDF-X942.pod
@@ -102,7 +102,7 @@ L<EVP_KDF(3)>,
 L<EVP_KDF_CTX_new(3)>,
 L<EVP_KDF_CTX_free(3)>,
 L<EVP_KDF_CTX_set_params(3)>,
-L<EVP_KDF_size(3)>,
+L<EVP_KDF_CTX_get_kdf_size(3)>,
 L<EVP_KDF_derive(3)>,
 L<EVP_KDF(3)/PARAMETERS>
 
diff --git a/doc/man7/EVP_KDF-X963.pod b/doc/man7/EVP_KDF-X963.pod
index 93ec14c837..b814fe5b47 100644
--- a/doc/man7/EVP_KDF-X963.pod
+++ b/doc/man7/EVP_KDF-X963.pod
@@ -91,7 +91,7 @@ L<EVP_KDF(3)>,
 L<EVP_KDF_CTX_new(3)>,
 L<EVP_KDF_CTX_free(3)>,
 L<EVP_KDF_CTX_set_params(3)>,
-L<EVP_KDF_size(3)>,
+L<EVP_KDF_CTX_get_kdf_size(3)>,
 L<EVP_KDF_derive(3)>,
 L<EVP_KDF(3)/PARAMETERS>
 
diff --git a/doc/man7/EVP_MAC-BLAKE2.pod b/doc/man7/EVP_MAC-BLAKE2.pod
index 90b065340d..51bac880b5 100644
--- a/doc/man7/EVP_MAC-BLAKE2.pod
+++ b/doc/man7/EVP_MAC-BLAKE2.pod
@@ -29,7 +29,7 @@ L<EVP_MAC(3)/PARAMETERS>.
 
 All these parameters can be set with EVP_MAC_CTX_set_params().
 Furthermore, the "size" parameter can be retrieved with
-EVP_MAC_CTX_get_params(), or with EVP_MAC_size().
+EVP_MAC_CTX_get_params(), or with EVP_MAC_CTX_get_mac_size().
 The length of the "size" parameter should not exceed that of a B<size_t>.
 
 =over 4
diff --git a/doc/man7/EVP_MAC-CMAC.pod b/doc/man7/EVP_MAC-CMAC.pod
index c210d693ce..4d05919b8f 100644
--- a/doc/man7/EVP_MAC-CMAC.pod
+++ b/doc/man7/EVP_MAC-CMAC.pod
@@ -45,7 +45,7 @@ EVP_MAC_CTX_get_params():
 
 =back
 
-The "size" parameter can also be retrieved with with EVP_MAC_size().
+The "size" parameter can also be retrieved with with EVP_MAC_CTX_get_mac_size().
 The length of the "size" parameter is equal to that of an B<unsigned int>.
 
 =head1 SEE ALSO
diff --git a/doc/man7/EVP_MAC-GMAC.pod b/doc/man7/EVP_MAC-GMAC.pod
index 7c9477c215..d662e7d5d2 100644
--- a/doc/man7/EVP_MAC-GMAC.pod
+++ b/doc/man7/EVP_MAC-GMAC.pod
@@ -47,7 +47,7 @@ EVP_MAC_CTX_get_params():
 
 =back
 
-The "size" parameter can also be retrieved with EVP_MAC_size().
+The "size" parameter can also be retrieved with EVP_MAC_CTX_get_mac_size().
 The length of the "size" parameter is equal to that of an B<unsigned int>.
 
 =head1 SEE ALSO
diff --git a/doc/man7/EVP_MAC-HMAC.pod b/doc/man7/EVP_MAC-HMAC.pod
index 45ccd17211..94bac8dbcf 100644
--- a/doc/man7/EVP_MAC-HMAC.pod
+++ b/doc/man7/EVP_MAC-HMAC.pod
@@ -51,7 +51,7 @@ EVP_MAC_CTX_get_params():
 
 =back
 
-The "size" parameter can also be retrieved with EVP_MAC_size().
+The "size" parameter can also be retrieved with EVP_MAC_CTX_get_mac_size().
 The length of the "size" parameter is equal to that of an B<unsigned int>.
 
 =head1 SEE ALSO
diff --git a/doc/man7/EVP_MAC-KMAC.pod b/doc/man7/EVP_MAC-KMAC.pod
index df7ac1ddf6..245d998e4a 100644
--- a/doc/man7/EVP_MAC-KMAC.pod
+++ b/doc/man7/EVP_MAC-KMAC.pod
@@ -29,7 +29,7 @@ L<EVP_MAC(3)/PARAMETERS>.
 
 All these parameters can be set with EVP_MAC_CTX_set_params().
 Furthermore, the "size" parameter can be retrieved with
-EVP_MAC_CTX_get_params(), or with EVP_MAC_size().
+EVP_MAC_CTX_get_params(), or with EVP_MAC_CTX_get_mac_size().
 The length of the "size" parameter should not exceed that of a B<size_t>.
 
 =over 4
diff --git a/doc/man7/EVP_MAC-Poly1305.pod b/doc/man7/EVP_MAC-Poly1305.pod
index da9953a1d5..8a0989ab71 100644
--- a/doc/man7/EVP_MAC-Poly1305.pod
+++ b/doc/man7/EVP_MAC-Poly1305.pod
@@ -41,7 +41,7 @@ EVP_MAC_CTX_get_params():
 
 =back
 
-The "size" parameter can also be retrieved with with EVP_MAC_size().
+The "size" parameter can also be retrieved with with EVP_MAC_CTX_get_mac_size().
 The length of the "size" parameter should not exceed that of an B<unsigned int>.
 
 =head1 SEE ALSO
diff --git a/doc/man7/EVP_MAC-Siphash.pod b/doc/man7/EVP_MAC-Siphash.pod
index 8b610c4383..d0a4226ae5 100644
--- a/doc/man7/EVP_MAC-Siphash.pod
+++ b/doc/man7/EVP_MAC-Siphash.pod
@@ -27,7 +27,7 @@ L<EVP_MAC(3)/PARAMETERS>.
 
 All these parameters can be set with EVP_MAC_CTX_set_params().
 Furthermore, the "size" parameter can be retrieved with
-EVP_MAC_CTX_get_params(), or with EVP_MAC_size().
+EVP_MAC_CTX_get_params(), or with EVP_MAC_CTX_get_mac_size().
 The length of the "size" parameter should not exceed that of a B<size_t>.
 
 =over 4
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index 7c36e78ce1..b2b87f2ab4 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -1105,7 +1105,7 @@ EVP_MAC *EVP_MAC_CTX_mac(EVP_MAC_CTX *ctx);
 int EVP_MAC_CTX_get_params(EVP_MAC_CTX *ctx, OSSL_PARAM params[]);
 int EVP_MAC_CTX_set_params(EVP_MAC_CTX *ctx, const OSSL_PARAM params[]);
 
-size_t EVP_MAC_size(EVP_MAC_CTX *ctx);
+size_t EVP_MAC_CTX_get_mac_size(EVP_MAC_CTX *ctx);
 int EVP_MAC_init(EVP_MAC_CTX *ctx);
 int EVP_MAC_update(EVP_MAC_CTX *ctx, const unsigned char *data, size_t datalen);
 int EVP_MAC_final(EVP_MAC_CTX *ctx,
diff --git a/include/openssl/kdf.h b/include/openssl/kdf.h
index 96521922ed..7f89f75270 100644
--- a/include/openssl/kdf.h
+++ b/include/openssl/kdf.h
@@ -39,8 +39,8 @@ const char *EVP_KDF_name(const EVP_KDF *kdf);
 const OSSL_PROVIDER *EVP_KDF_provider(const EVP_KDF *kdf);
 const EVP_KDF *EVP_KDF_CTX_kdf(EVP_KDF_CTX *ctx);
 
-void EVP_KDF_reset(EVP_KDF_CTX *ctx);
-size_t EVP_KDF_size(EVP_KDF_CTX *ctx);
+void EVP_KDF_CTX_reset(EVP_KDF_CTX *ctx);
+size_t EVP_KDF_CTX_get_kdf_size(EVP_KDF_CTX *ctx);
 int EVP_KDF_derive(EVP_KDF_CTX *ctx, unsigned char *key, size_t keylen);
 int EVP_KDF_get_params(EVP_KDF *kdf, OSSL_PARAM params[]);
 int EVP_KDF_CTX_get_params(EVP_KDF_CTX *ctx, OSSL_PARAM params[]);
diff --git a/providers/implementations/kdfs/kbkdf.c b/providers/implementations/kdfs/kbkdf.c
index cf3b90c19c..74a694e8ea 100644
--- a/providers/implementations/kdfs/kbkdf.c
+++ b/providers/implementations/kdfs/kbkdf.c
@@ -218,7 +218,7 @@ static int kbkdf_derive(void *vctx, unsigned char *key, size_t keylen)
         return 0;
     }
 
-    h = EVP_MAC_size(ctx->ctx_init);
+    h = EVP_MAC_CTX_get_mac_size(ctx->ctx_init);
     if (h == 0)
         goto done;
     if (ctx->iv_len != 0 && ctx->iv_len != h) {
diff --git a/providers/implementations/kdfs/sskdf.c b/providers/implementations/kdfs/sskdf.c
index 6cfde97842..84711dde27 100644
--- a/providers/implementations/kdfs/sskdf.c
+++ b/providers/implementations/kdfs/sskdf.c
@@ -246,7 +246,7 @@ static int SSKDF_mac_kdm(EVP_MAC_CTX *ctx_init,
     if (!EVP_MAC_init(ctx_init))
         goto end;
 
-    out_len = EVP_MAC_size(ctx_init); /* output size */
+    out_len = EVP_MAC_CTX_get_mac_size(ctx_init); /* output size */
     if (out_len <= 0)
         goto end;
     len = derived_key_len;
diff --git a/providers/implementations/kdfs/tls1_prf.c b/providers/implementations/kdfs/tls1_prf.c
index 315971a96e..aba08068ca 100644
--- a/providers/implementations/kdfs/tls1_prf.c
+++ b/providers/implementations/kdfs/tls1_prf.c
@@ -296,7 +296,7 @@ static int tls1_prf_P_hash(EVP_MAC_CTX *ctx_init,
         goto err;
     if (!EVP_MAC_init(ctx_init))
         goto err;
-    chunk = EVP_MAC_size(ctx_init);
+    chunk = EVP_MAC_CTX_get_mac_size(ctx_init);
     if (chunk == 0)
         goto err;
     /* A(0) = seed */
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index 1971a8e0bc..8836069097 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -3461,7 +3461,7 @@ int ssl_hmac_final(SSL_HMAC *ctx, unsigned char *md, size_t *len,
 size_t ssl_hmac_size(const SSL_HMAC *ctx)
 {
     if (ctx->ctx != NULL)
-        return EVP_MAC_size(ctx->ctx);
+        return EVP_MAC_CTX_get_mac_size(ctx->ctx);
 #ifndef OPENSSL_NO_DEPRECATED_3_0
     if (ctx->old_ctx != NULL)
         return ssl_hmac_old_size(ctx);
diff --git a/util/libcrypto.num b/util/libcrypto.num
index 0e8d3953c8..3d3edf9356 100644
--- a/util/libcrypto.num
+++ b/util/libcrypto.num
@@ -4410,7 +4410,7 @@ EVP_MAC_CTX_new                         ?	3_0_0	EXIST::FUNCTION:
 EVP_MAC_CTX_free                        ?	3_0_0	EXIST::FUNCTION:
 EVP_MAC_CTX_dup                         ?	3_0_0	EXIST::FUNCTION:
 EVP_MAC_CTX_mac                         ?	3_0_0	EXIST::FUNCTION:
-EVP_MAC_size                            ?	3_0_0	EXIST::FUNCTION:
+EVP_MAC_CTX_get_mac_size                ?	3_0_0	EXIST::FUNCTION:
 EVP_MAC_init                            ?	3_0_0	EXIST::FUNCTION:
 EVP_MAC_update                          ?	3_0_0	EXIST::FUNCTION:
 EVP_MAC_final                           ?	3_0_0	EXIST::FUNCTION:
@@ -4438,8 +4438,8 @@ ASYNC_WAIT_CTX_set_status               ?	3_0_0	EXIST::FUNCTION:
 ASYNC_WAIT_CTX_get_status               ?	3_0_0	EXIST::FUNCTION:
 ERR_load_ESS_strings                    ?	3_0_0	EXIST::FUNCTION:
 EVP_KDF_CTX_free                        ?	3_0_0	EXIST::FUNCTION:
-EVP_KDF_reset                           ?	3_0_0	EXIST::FUNCTION:
-EVP_KDF_size                            ?	3_0_0	EXIST::FUNCTION:
+EVP_KDF_CTX_reset                       ?	3_0_0	EXIST::FUNCTION:
+EVP_KDF_CTX_get_kdf_size                ?	3_0_0	EXIST::FUNCTION:
 EVP_KDF_derive                          ?	3_0_0	EXIST::FUNCTION:
 EVP_KDF_name                            ?	3_0_0	EXIST::FUNCTION:
 EC_GROUP_get0_field                     ?	3_0_0	EXIST::FUNCTION:EC


More information about the openssl-commits mailing list