rename sha1_ctrl to ossl_sha1_ctrl.
authorPauli <paul.dale@oracle.com>
Mon, 16 Nov 2020 02:08:30 +0000 (12:08 +1000)
committerPauli <paul.dale@oracle.com>
Wed, 18 Nov 2020 21:39:13 +0000 (07:39 +1000)
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13417)

crypto/evp/legacy_sha.c
crypto/sha/sha1dgst.c
include/crypto/sha.h
providers/implementations/digests/sha2_prov.c

index 188f3e3..158591e 100644 (file)
@@ -60,12 +60,13 @@ IMPLEMENT_LEGACY_EVP_MD_METH(sha384, SHA384)
 IMPLEMENT_LEGACY_EVP_MD_METH(sha512, SHA512)
 IMPLEMENT_LEGACY_EVP_MD_METH(sha512_224_int, sha512_224)
 IMPLEMENT_LEGACY_EVP_MD_METH(sha512_256_int, sha512_256)
-IMPLEMENT_LEGACY_EVP_MD_METH_SHA3(sha3_int, sha3, '\x06')
-IMPLEMENT_LEGACY_EVP_MD_METH_SHAKE(shake, sha3, '\x1f')
+IMPLEMENT_LEGACY_EVP_MD_METH_SHA3(sha3_int, ossl_sha3, '\x06')
+IMPLEMENT_LEGACY_EVP_MD_METH_SHAKE(shake, ossl_sha3, '\x1f')
 
 static int sha1_int_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2)
 {
-    return sha1_ctrl(ctx != NULL ? EVP_MD_CTX_md_data(ctx) : NULL, cmd, p1, p2);
+    return ossl_sha1_ctrl(ctx != NULL ? EVP_MD_CTX_md_data(ctx) : NULL,
+                          cmd, p1, p2);
 }
 
 static int shake_ctrl(EVP_MD_CTX *evp_ctx, int cmd, int p1, void *p2)
index 1ece0db..65d7e62 100644 (file)
@@ -25,7 +25,7 @@
 #include "sha_local.h"
 #include "crypto/sha.h"
 
-int sha1_ctrl(SHA_CTX *sha1, int cmd, int mslen, void *ms)
+int ossl_sha1_ctrl(SHA_CTX *sha1, int cmd, int mslen, void *ms)
 {
     unsigned char padtmp[40];
     unsigned char sha1tmp[SHA_DIGEST_LENGTH];
index 57a3d20..450c011 100644 (file)
@@ -15,6 +15,6 @@
 
 int sha512_224_init(SHA512_CTX *);
 int sha512_256_init(SHA512_CTX *);
-int sha1_ctrl(SHA_CTX *ctx, int cmd, int mslen, void *ms);
+int ossl_sha1_ctrl(SHA_CTX *ctx, int cmd, int mslen, void *ms);
 
 #endif
index dec9c31..2f01149 100644 (file)
@@ -45,8 +45,8 @@ static int sha1_set_ctx_params(void *vctx, const OSSL_PARAM params[])
     if (ctx != NULL && params != NULL) {
         p = OSSL_PARAM_locate_const(params, OSSL_DIGEST_PARAM_SSL3_MS);
         if (p != NULL && p->data_type == OSSL_PARAM_OCTET_STRING)
-            return sha1_ctrl(ctx, EVP_CTRL_SSL3_MASTER_SECRET, p->data_size,
-                             p->data);
+            return ossl_sha1_ctrl(ctx, EVP_CTRL_SSL3_MASTER_SECRET,
+                                  p->data_size, p->data);
     }
     return 0;
 }