From: beck Date: Sat, 8 Jul 2023 10:45:57 +0000 (+0000) Subject: Hide symbols in md4 and md5 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b48d1b5aa70f743293062ea238ad31979a1482a3;p=openbsd Hide symbols in md4 and md5 ok tb@ --- diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index 37063b03be9..b134de290e4 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -2239,3 +2239,13 @@ _libre_OCSP_REQUEST_print _libre_OCSP_RESPONSE_print _libre_OCSP_basic_verify _libre_ERR_load_OCSP_strings +_libre_MD5_Init +_libre_MD5_Update +_libre_MD5_Final +_libre_MD5 +_libre_MD5_Transform +_libre_MD4_Init +_libre_MD4_Update +_libre_MD4_Final +_libre_MD4 +_libre_MD4_Transform diff --git a/lib/libcrypto/hidden/openssl/md4.h b/lib/libcrypto/hidden/openssl/md4.h new file mode 100644 index 00000000000..c5fc22c47e8 --- /dev/null +++ b/lib/libcrypto/hidden/openssl/md4.h @@ -0,0 +1,34 @@ +/* $OpenBSD: md4.h,v 1.1 2023/07/08 10:45:57 beck Exp $ */ +/* + * Copyright (c) 2023 Bob Beck + * + * 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_MD4_H +#define _LIBCRYPTO_MD4_H + +#ifndef _MSC_VER +#include_next +#else +#include "../include/openssl/md4.h" +#endif +#include "crypto_namespace.h" + +LCRYPTO_USED(MD4_Init); +LCRYPTO_USED(MD4_Update); +LCRYPTO_USED(MD4_Final); +LCRYPTO_USED(MD4); +LCRYPTO_USED(MD4_Transform); + +#endif /* _LIBCRYPTO_MD4_H */ diff --git a/lib/libcrypto/hidden/openssl/md5.h b/lib/libcrypto/hidden/openssl/md5.h new file mode 100644 index 00000000000..3dfade7f7ce --- /dev/null +++ b/lib/libcrypto/hidden/openssl/md5.h @@ -0,0 +1,34 @@ +/* $OpenBSD: md5.h,v 1.1 2023/07/08 10:45:57 beck Exp $ */ +/* + * Copyright (c) 2023 Bob Beck + * + * 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_MD5_H +#define _LIBCRYPTO_MD5_H + +#ifndef _MSC_VER +#include_next +#else +#include "../include/openssl/md5.h" +#endif +#include "crypto_namespace.h" + +LCRYPTO_USED(MD5_Init); +LCRYPTO_USED(MD5_Update); +LCRYPTO_USED(MD5_Final); +LCRYPTO_USED(MD5); +LCRYPTO_USED(MD5_Transform); + +#endif /* _LIBCRYPTO_MD5_H */ diff --git a/lib/libcrypto/md4/md4_dgst.c b/lib/libcrypto/md4/md4_dgst.c index dedb5902cd0..e6fff4893da 100644 --- a/lib/libcrypto/md4/md4_dgst.c +++ b/lib/libcrypto/md4/md4_dgst.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md4_dgst.c,v 1.19 2023/07/08 06:47:26 jsing Exp $ */ +/* $OpenBSD: md4_dgst.c,v 1.20 2023/07/08 10:45:57 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -89,6 +89,9 @@ __END_HIDDEN_DECLS #define HASH_BLOCK_DATA_ORDER md4_block_data_order #include "md32_common.h" +LCRYPTO_ALIAS(MD4_Update); +LCRYPTO_ALIAS(MD4_Final); +LCRYPTO_ALIAS(MD4_Transform); /* #define F(x,y,z) (((x) & (y)) | ((~(x)) & (z))) @@ -133,6 +136,7 @@ MD4_Init(MD4_CTX *c) c->D = INIT_DATA_D; return 1; } +LCRYPTO_ALIAS(MD4_Init); #ifndef md4_block_data_order #ifdef X diff --git a/lib/libcrypto/md4/md4_one.c b/lib/libcrypto/md4/md4_one.c index 63c8a09940a..3879a2ab419 100644 --- a/lib/libcrypto/md4/md4_one.c +++ b/lib/libcrypto/md4/md4_one.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md4_one.c,v 1.11 2023/07/08 06:47:26 jsing Exp $ */ +/* $OpenBSD: md4_one.c,v 1.12 2023/07/08 10:45:57 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -76,4 +76,4 @@ MD4(const unsigned char *d, size_t n, unsigned char *md) explicit_bzero(&c, sizeof(c)); return (md); } - +LCRYPTO_ALIAS(MD4); diff --git a/lib/libcrypto/md5/md5_dgst.c b/lib/libcrypto/md5/md5_dgst.c index 19a2b01e174..b0eb47219a7 100644 --- a/lib/libcrypto/md5/md5_dgst.c +++ b/lib/libcrypto/md5/md5_dgst.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md5_dgst.c,v 1.17 2023/07/08 06:50:38 jsing Exp $ */ +/* $OpenBSD: md5_dgst.c,v 1.18 2023/07/08 10:45:57 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -100,6 +100,9 @@ __END_HIDDEN_DECLS #define HASH_BLOCK_DATA_ORDER md5_block_data_order #include "md32_common.h" +LCRYPTO_ALIAS(MD5_Update); +LCRYPTO_ALIAS(MD5_Transform); +LCRYPTO_ALIAS(MD5_Final); /* #define F(x,y,z) (((x) & (y)) | ((~(x)) & (z))) @@ -153,6 +156,7 @@ MD5_Init(MD5_CTX *c) c->D = INIT_DATA_D; return 1; } +LCRYPTO_ALIAS(MD5_Init); #ifndef md5_block_data_order #ifdef X diff --git a/lib/libcrypto/md5/md5_one.c b/lib/libcrypto/md5/md5_one.c index 6e894de7fe0..3d5fba57235 100644 --- a/lib/libcrypto/md5/md5_one.c +++ b/lib/libcrypto/md5/md5_one.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md5_one.c,v 1.11 2023/07/08 06:50:38 jsing Exp $ */ +/* $OpenBSD: md5_one.c,v 1.12 2023/07/08 10:45:57 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -76,4 +76,4 @@ MD5(const unsigned char *d, size_t n, unsigned char *md) explicit_bzero(&c, sizeof(c)); return (md); } - +LCRYPTO_ALIAS(MD5);