Add chacha20poly1305 support to crypto build
This is a dependency for in-kernel wireguard. Reviewed by: cem@ MFC after: 1 week Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D23689
This commit is contained in:
parent
132fb3dc99
commit
bbb7a2c7c3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357986
@ -4824,6 +4824,23 @@ crypto/libsodium/randombytes.c optional crypto \
|
|||||||
compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium"
|
compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium"
|
||||||
crypto/libsodium/utils.c optional crypto \
|
crypto/libsodium/utils.c optional crypto \
|
||||||
compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium"
|
compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium"
|
||||||
|
contrib/libsodium/src/libsodium/crypto_core/hchacha20/core_hchacha20.c \
|
||||||
|
optional crypto \
|
||||||
|
compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium"
|
||||||
|
contrib/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20.c \
|
||||||
|
optional crypto \
|
||||||
|
compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium"
|
||||||
|
contrib/libsodium/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c \
|
||||||
|
optional crypto \
|
||||||
|
compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium"
|
||||||
|
contrib/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c \
|
||||||
|
optional crypto \
|
||||||
|
compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium"
|
||||||
|
contrib/libsodium/src/libsodium/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c \
|
||||||
|
optional crypto \
|
||||||
|
compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium"
|
||||||
|
|
||||||
|
|
||||||
opencrypto/cbc_mac.c optional crypto
|
opencrypto/cbc_mac.c optional crypto
|
||||||
opencrypto/xform_cbc_mac.c optional crypto
|
opencrypto/xform_cbc_mac.c optional crypto
|
||||||
rpc/auth_none.c optional krpc | nfslockd | nfscl | nfsd
|
rpc/auth_none.c optional krpc | nfslockd | nfscl | nfsd
|
||||||
|
@ -16,11 +16,11 @@ int sodium_init(void)
|
|||||||
|
|
||||||
SODIUM_EXPORT
|
SODIUM_EXPORT
|
||||||
int sodium_set_misuse_handler(void (*handler)(void));
|
int sodium_set_misuse_handler(void (*handler)(void));
|
||||||
|
#ifndef _KERNEL
|
||||||
SODIUM_EXPORT
|
SODIUM_EXPORT
|
||||||
void sodium_misuse(void)
|
void sodium_misuse(void)
|
||||||
__attribute__ ((noreturn));
|
__attribute__ ((noreturn));
|
||||||
|
#endif
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -54,4 +54,14 @@
|
|||||||
#define SODIUM_MIN(A, B) ((A) < (B) ? (A) : (B))
|
#define SODIUM_MIN(A, B) ((A) < (B) ? (A) : (B))
|
||||||
#define SODIUM_SIZE_MAX SODIUM_MIN(UINT64_MAX, SIZE_MAX)
|
#define SODIUM_SIZE_MAX SODIUM_MIN(UINT64_MAX, SIZE_MAX)
|
||||||
|
|
||||||
|
#ifdef _KERNEL
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <sys/libkern.h>
|
||||||
|
static inline void
|
||||||
|
sodium_misuse(void)
|
||||||
|
{
|
||||||
|
panic("bad value passed to sodium");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user