From: joshua Date: Thu, 28 Mar 2024 23:54:15 +0000 (+0000) Subject: Hide symbols in RIPEMD X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1abe9018187a1ccb78aaab773a526fea0c01193f;p=openbsd Hide symbols in RIPEMD ok beck jsing --- diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index b4ccdfb78ba..48dfbe5fd79 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -2544,3 +2544,8 @@ _libre_ENGINE_load_private_key _libre_ENGINE_load_public_key _libre_RC4_set_key _libre_RC4 +_libre_RIPEMD160_Init +_libre_RIPEMD160_Update +_libre_RIPEMD160_Final +_libre_RIPEMD160 +_libre_RIPEMD160_Transform diff --git a/lib/libcrypto/hidden/openssl/ripemd.h b/lib/libcrypto/hidden/openssl/ripemd.h new file mode 100644 index 00000000000..1fd4a0a46dc --- /dev/null +++ b/lib/libcrypto/hidden/openssl/ripemd.h @@ -0,0 +1,34 @@ +/* $OpenBSD: ripemd.h,v 1.1 2024/03/28 23:54:15 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_RIPEMD_H +#define _LIBCRYPTO_RIPEMD_H + +#ifndef _MSC_VER +#include_next +#else +#include "../include/openssl/ripemd.h" +#endif +#include "crypto_namespace.h" + +LCRYPTO_USED(RIPEMD160_Init); +LCRYPTO_USED(RIPEMD160_Update); +LCRYPTO_USED(RIPEMD160_Final); +LCRYPTO_USED(RIPEMD160); +LCRYPTO_USED(RIPEMD160_Transform); + +#endif /* _LIBCRYPTO_RIPEMD_H */ diff --git a/lib/libcrypto/ripemd/ripemd.c b/lib/libcrypto/ripemd/ripemd.c index 3a229d204ac..b2d798c4954 100644 --- a/lib/libcrypto/ripemd/ripemd.c +++ b/lib/libcrypto/ripemd/ripemd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ripemd.c,v 1.17 2024/03/28 10:45:30 jsing Exp $ */ +/* $OpenBSD: ripemd.c,v 1.18 2024/03/28 23:54:15 joshua Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -385,6 +385,7 @@ RIPEMD160_Init(RIPEMD160_CTX *c) return 1; } +LCRYPTO_ALIAS(RIPEMD160_Init); int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data_, size_t len) @@ -439,12 +440,14 @@ RIPEMD160_Update(RIPEMD160_CTX *c, const void *data_, size_t len) } return 1; } +LCRYPTO_ALIAS(RIPEMD160_Update); void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *data) { ripemd160_block_data_order(c, data, 1); } +LCRYPTO_ALIAS(RIPEMD160_Transform); int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c) @@ -477,6 +480,7 @@ RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c) return 1; } +LCRYPTO_ALIAS(RIPEMD160_Final); unsigned char * RIPEMD160(const unsigned char *d, size_t n, @@ -494,3 +498,4 @@ RIPEMD160(const unsigned char *d, size_t n, explicit_bzero(&c, sizeof(c)); return (md); } +LCRYPTO_ALIAS(RIPEMD160);