sync with OpenBSD -current
This commit is contained in:
parent
38a9ea224a
commit
61b0c3d2c1
27 changed files with 196 additions and 125 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: crypto_namespace.h,v 1.2 2023/02/16 08:38:17 tb Exp $ */
|
||||
/* $OpenBSD: crypto_namespace.h,v 1.3 2024/03/30 10:09:43 tb Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2016 Philip Guenther <guenther@openbsd.org>
|
||||
*
|
||||
|
@ -25,14 +25,17 @@
|
|||
*/
|
||||
|
||||
#ifdef LIBRESSL_NAMESPACE
|
||||
# define LCRYPTO_UNUSED(x) typeof(x) x __attribute__((deprecated))
|
||||
#ifdef LIBRESSL_CRYPTO_NAMESPACE
|
||||
# define LCRYPTO_USED(x) __attribute__((visibility("hidden"))) \
|
||||
# define LCRYPTO_UNUSED(x) __attribute__((deprecated)) \
|
||||
__attribute__((visibility("hidden"))) \
|
||||
typeof(x) x asm("_lcry_"#x)
|
||||
# define LCRYPTO_USED(x) __attribute__((visibility("hidden"))) \
|
||||
typeof(x) x asm("_lcry_"#x)
|
||||
# define LCRYPTO_ALIAS1(pre,x) asm(".global "#pre#x"; "#pre#x" = _lcry_"#x)
|
||||
# define LCRYPTO_ALIAS(x) LCRYPTO_ALIAS1(,x); LCRYPTO_ALIAS1(_libre_,x)
|
||||
#else
|
||||
# define LCRYPTO_USED(x) typeof(x) x asm("_libre_"#x)
|
||||
# define LCRYPTO_UNUSED(x) typeof(x) x __attribute__((deprecated))
|
||||
# define LCRYPTO_USED(x) typeof(x) x asm("_libre_"#x)
|
||||
#endif
|
||||
#else
|
||||
# define LCRYPTO_UNUSED(x)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: hmac.c,v 1.33 2024/03/26 12:10:50 joshua Exp $ */
|
||||
/* $OpenBSD: hmac.c,v 1.34 2024/03/30 10:10:58 tb Exp $ */
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
|
@ -143,6 +143,7 @@ HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md)
|
|||
HMAC_CTX_init(ctx);
|
||||
return HMAC_Init_ex(ctx, key, len, md, NULL);
|
||||
}
|
||||
LCRYPTO_ALIAS(HMAC_Init);
|
||||
|
||||
int
|
||||
HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len)
|
||||
|
@ -203,6 +204,7 @@ HMAC_CTX_reset(HMAC_CTX *ctx)
|
|||
HMAC_CTX_init(ctx);
|
||||
return 1;
|
||||
}
|
||||
LCRYPTO_ALIAS(HMAC_CTX_reset);
|
||||
|
||||
void
|
||||
HMAC_CTX_init(HMAC_CTX *ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue