Apple "fat binaries" are back!
This commit is contained in:
parent
6b67cb0e2a
commit
31d8758ad9
3 changed files with 12 additions and 7 deletions
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "Packet.hpp"
|
||||
|
||||
#ifdef ZT_USE_X64_ASM_SALSA2012
|
||||
#if defined(ZT_USE_X64_ASM_SALSA2012) && defined(ZT_ARCH_X64)
|
||||
#include "../ext/x64-salsa2012-asm/salsa2012.h"
|
||||
#endif
|
||||
#ifdef ZT_USE_ARM32_NEON_ASM_SALSA2012
|
||||
|
@ -42,7 +42,7 @@ namespace ZeroTier {
|
|||
/* Set up macros for fast single-pass ASM Salsa20/12 crypto, if we have it */
|
||||
|
||||
// x64 SSE crypto
|
||||
#ifdef ZT_USE_X64_ASM_SALSA2012
|
||||
#if defined(ZT_USE_X64_ASM_SALSA2012) && defined(ZT_ARCH_X64)
|
||||
#define ZT_HAS_FAST_CRYPTO() (true)
|
||||
#define ZT_FAST_SINGLE_PASS_SALSA2012(b,l,n,k) zt_salsa2012_amd64_xmm6(reinterpret_cast<unsigned char *>(b),(l),reinterpret_cast<const unsigned char *>(n),reinterpret_cast<const unsigned char *>(k))
|
||||
#endif
|
||||
|
@ -880,7 +880,7 @@ void Packet::armor(const void *key,bool encryptPayload,const AES aesKeys[2])
|
|||
{
|
||||
uint8_t *const data = reinterpret_cast<uint8_t *>(unsafeData());
|
||||
if ((aesKeys) && (encryptPayload)) {
|
||||
char tmp0[16],tmp1[16];
|
||||
//char tmp0[16],tmp1[16];
|
||||
setCipher(ZT_PROTO_CIPHER_SUITE__AES_GMAC_SIV);
|
||||
|
||||
uint8_t *const payload = data + ZT_PACKET_IDX_VERB;
|
||||
|
|
|
@ -96,13 +96,16 @@ const char Utils::HEXCHARS[16] = { '0','1','2','3','4','5','6','7','8','9','a','
|
|||
#ifdef ZT_ARCH_ARM_HAS_NEON
|
||||
Utils::ARMCapabilities::ARMCapabilities() noexcept
|
||||
{
|
||||
#if TARGET_OS_IPHONE
|
||||
#ifdef __APPLE__
|
||||
|
||||
this->aes = true;
|
||||
this->crc32 = true;
|
||||
this->pmull = true;
|
||||
this->sha1 = true;
|
||||
this->sha2 = true;
|
||||
|
||||
#else
|
||||
|
||||
#ifdef HWCAP2_AES
|
||||
if (sizeof(void *) == 4) {
|
||||
const long hwcaps2 = getauxval(AT_HWCAP2);
|
||||
|
@ -122,7 +125,8 @@ Utils::ARMCapabilities::ARMCapabilities() noexcept
|
|||
#ifdef HWCAP2_AES
|
||||
}
|
||||
#endif
|
||||
#endif // TARGET_OS_IPHONE
|
||||
|
||||
#endif // __APPLE__
|
||||
}
|
||||
|
||||
const Utils::ARMCapabilities Utils::ARMCAP;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue