From: joshua Date: Sat, 30 Mar 2024 03:45:47 +0000 (+0000) Subject: Hide symbols in whrlpool X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=480f00ed4367ba0e9b1147c77e2b1292d1b33532;p=openbsd Hide symbols in whrlpool ok tb --- diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index 812a4280db0..21f24c9ef52 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -2599,3 +2599,8 @@ _libre_CMS_get1_ReceiptRequest _libre_CMS_ReceiptRequest_create0 _libre_CMS_add1_ReceiptRequest _libre_CMS_ReceiptRequest_get0_values +_libre_WHIRLPOOL_Init +_libre_WHIRLPOOL_Update +_libre_WHIRLPOOL_BitUpdate +_libre_WHIRLPOOL_Final +_libre_WHIRLPOOL diff --git a/lib/libcrypto/hidden/openssl/whrlpool.h b/lib/libcrypto/hidden/openssl/whrlpool.h new file mode 100644 index 00000000000..c3e4a51d380 --- /dev/null +++ b/lib/libcrypto/hidden/openssl/whrlpool.h @@ -0,0 +1,34 @@ +/* $OpenBSD: whrlpool.h,v 1.1 2024/03/30 03:45:47 joshua Exp $ */ +/* + * Copyright (c) 2024 Joshua Sing + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _LIBCRYPTO_WHRLPOOL_H +#define _LIBCRYPTO_WHRLPOOL_H + +#ifndef _MSC_VER +#include_next +#else +#include "../include/openssl/whrlpool.h" +#endif +#include "crypto_namespace.h" + +LCRYPTO_USED(WHIRLPOOL_Init); +LCRYPTO_USED(WHIRLPOOL_Update); +LCRYPTO_USED(WHIRLPOOL_BitUpdate); +LCRYPTO_USED(WHIRLPOOL_Final); +LCRYPTO_USED(WHIRLPOOL); + +#endif /* _LIBCRYPTO_WHRLPOOL_H */ diff --git a/lib/libcrypto/whrlpool/whirlpool.c b/lib/libcrypto/whrlpool/whirlpool.c index 217c5a919b0..e1e0f7a8990 100644 --- a/lib/libcrypto/whrlpool/whirlpool.c +++ b/lib/libcrypto/whrlpool/whirlpool.c @@ -1,4 +1,4 @@ -/* $OpenBSD: whirlpool.c,v 1.1 2024/03/29 02:41:49 jsing Exp $ */ +/* $OpenBSD: whirlpool.c,v 1.2 2024/03/30 03:45:47 joshua Exp $ */ /** * The Whirlpool hashing function. * @@ -650,6 +650,7 @@ WHIRLPOOL_Init(WHIRLPOOL_CTX *c) memset (c, 0, sizeof(*c)); return (1); } +LCRYPTO_ALIAS(WHIRLPOOL_Init); int WHIRLPOOL_Update(WHIRLPOOL_CTX *c, const void *_inp, size_t bytes) @@ -671,6 +672,7 @@ WHIRLPOOL_Update(WHIRLPOOL_CTX *c, const void *_inp, size_t bytes) return (1); } +LCRYPTO_ALIAS(WHIRLPOOL_Update); void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *_inp, size_t bits) @@ -796,6 +798,7 @@ reconsider: } } } +LCRYPTO_ALIAS(WHIRLPOOL_BitUpdate); int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c) @@ -837,6 +840,7 @@ WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c) } return (0); } +LCRYPTO_ALIAS(WHIRLPOOL_Final); unsigned char * WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md) @@ -851,3 +855,4 @@ WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md) WHIRLPOOL_Final(md, &ctx); return (md); } +LCRYPTO_ALIAS(WHIRLPOOL);