Fixes for building with `WOLFSSL_ARMASM` when user_settings.h is used.

This commit is contained in:
David Garske 2020-07-22 10:47:35 -07:00
parent 056ee0987c
commit 1af38c5c55
4 changed files with 32 additions and 12 deletions

View File

@ -95,6 +95,9 @@
A4ADF9281FCE0C5600A06E90 /* ecc.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8CC1FCE0C5500A06E90 /* ecc.c */; };
A4ADF92A1FCE0C5600A06E90 /* coding.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8CE1FCE0C5500A06E90 /* coding.c */; };
A4ADF92C1FCE0C5600A06E90 /* ge_low_mem.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8D01FCE0C5500A06E90 /* ge_low_mem.c */; };
A4CA2EA124C8AF97003CCC50 /* armv8-curve25519.c in Sources */ = {isa = PBXBuildFile; fileRef = A4CA2E9C24C8AF97003CCC50 /* armv8-curve25519.c */; };
A4CA2EA324C8AF97003CCC50 /* armv8-sha512.c in Sources */ = {isa = PBXBuildFile; fileRef = A4CA2E9E24C8AF97003CCC50 /* armv8-sha512.c */; };
A4CA2EA524C8B273003CCC50 /* armv8-sha512-asm.c in Sources */ = {isa = PBXBuildFile; fileRef = A4CA2EA424C8B273003CCC50 /* armv8-sha512-asm.c */; };
A4DFEC0D1FD4CAA300A7BB33 /* benchmark.c in Sources */ = {isa = PBXBuildFile; fileRef = A4DFEC0C1FD4CAA300A7BB33 /* benchmark.c */; };
A4DFEC101FD4CB8500A7BB33 /* armv8-sha256.c in Sources */ = {isa = PBXBuildFile; fileRef = A4DFEC0E1FD4CB8500A7BB33 /* armv8-sha256.c */; };
A4DFEC111FD4CB8500A7BB33 /* armv8-aes.c in Sources */ = {isa = PBXBuildFile; fileRef = A4DFEC0F1FD4CB8500A7BB33 /* armv8-aes.c */; };
@ -195,6 +198,9 @@
A4ADF8CC1FCE0C5500A06E90 /* ecc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ecc.c; path = ../../../wolfcrypt/src/ecc.c; sourceTree = "<group>"; };
A4ADF8CE1FCE0C5500A06E90 /* coding.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = coding.c; path = ../../../wolfcrypt/src/coding.c; sourceTree = "<group>"; };
A4ADF8D01FCE0C5500A06E90 /* ge_low_mem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ge_low_mem.c; path = ../../../wolfcrypt/src/ge_low_mem.c; sourceTree = "<group>"; };
A4CA2E9C24C8AF97003CCC50 /* armv8-curve25519.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "armv8-curve25519.c"; path = "../../../wolfcrypt/src/port/arm/armv8-curve25519.c"; sourceTree = "<group>"; };
A4CA2E9E24C8AF97003CCC50 /* armv8-sha512.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "armv8-sha512.c"; path = "../../../wolfcrypt/src/port/arm/armv8-sha512.c"; sourceTree = "<group>"; };
A4CA2EA424C8B273003CCC50 /* armv8-sha512-asm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "armv8-sha512-asm.c"; path = "../../../wolfcrypt/src/port/arm/armv8-sha512-asm.c"; sourceTree = "<group>"; };
A4DFEC0C1FD4CAA300A7BB33 /* benchmark.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = benchmark.c; path = ../../../wolfcrypt/benchmark/benchmark.c; sourceTree = "<group>"; };
A4DFEC0E1FD4CB8500A7BB33 /* armv8-sha256.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "armv8-sha256.c"; path = "../../../wolfcrypt/src/port/arm/armv8-sha256.c"; sourceTree = "<group>"; };
A4DFEC0F1FD4CB8500A7BB33 /* armv8-aes.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "armv8-aes.c"; path = "../../../wolfcrypt/src/port/arm/armv8-aes.c"; sourceTree = "<group>"; };
@ -273,8 +279,11 @@
A4ADF8921FCE0C4E00A06E90 /* arc4.c */,
A4DFEC0F1FD4CB8500A7BB33 /* armv8-aes.c */,
A46FE14C2493E8F500A25BE7 /* armv8-chacha.c */,
A4CA2E9C24C8AF97003CCC50 /* armv8-curve25519.c */,
A46FE1502493E8F600A25BE7 /* armv8-poly1305.c */,
A4DFEC0E1FD4CB8500A7BB33 /* armv8-sha256.c */,
A4CA2EA424C8B273003CCC50 /* armv8-sha512-asm.c */,
A4CA2E9E24C8AF97003CCC50 /* armv8-sha512.c */,
A4ADF8A01FCE0C4F00A06E90 /* asm.c */,
A4ADF8C21FCE0C5300A06E90 /* asn.c */,
A4ADF8B11FCE0C5100A06E90 /* blake2b.c */,
@ -455,6 +464,7 @@
A4ADF8DB1FCE0C5600A06E90 /* hc128.c in Sources */,
A4ADF8E31FCE0C5600A06E90 /* compress.c in Sources */,
A4ADF8731FCE0C1C00A06E90 /* tls13.c in Sources */,
A4CA2EA124C8AF97003CCC50 /* armv8-curve25519.c in Sources */,
A4ADF90D1FCE0C5600A06E90 /* blake2b.c in Sources */,
A4ADF9071FCE0C5600A06E90 /* dh.c in Sources */,
A46FE1912493E8F800A25BE7 /* sp_c32.c in Sources */,
@ -473,6 +483,7 @@
A4ADF8D51FCE0C5600A06E90 /* md5.c in Sources */,
A46FE1892493E8F800A25BE7 /* sp_dsp32.c in Sources */,
A4ADF8DF1FCE0C5600A06E90 /* sha256.c in Sources */,
A4CA2EA524C8B273003CCC50 /* armv8-sha512-asm.c in Sources */,
A4ADF8711FCE0C1C00A06E90 /* sniffer.c in Sources */,
A46FE1882493E8F800A25BE7 /* sp_arm32.c in Sources */,
A4ADF8701FCE0C1C00A06E90 /* tls.c in Sources */,
@ -522,6 +533,7 @@
A4ADF8D71FCE0C5600A06E90 /* wolfevent.c in Sources */,
A46FE1802493E8F800A25BE7 /* ed448.c in Sources */,
A4DFEC0D1FD4CAA300A7BB33 /* benchmark.c in Sources */,
A4CA2EA324C8AF97003CCC50 /* armv8-sha512.c in Sources */,
A4ADF91D1FCE0C5600A06E90 /* cpuid.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;

View File

@ -23,15 +23,20 @@
* cd ../scripts
* ruby ./x25519/x25519.rb arm64 ../wolfssl/wolfcrypt/src/port/arm/armv8-curve25519.c
*/
#ifdef WOLFSSL_ARMASM
#ifdef __aarch64__
#include <stdint.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif /* HAVE_CONFIG_H */
#endif
#include <wolfssl/wolfcrypt/settings.h>
#ifdef WOLFSSL_ARMASM
#ifdef __aarch64__
#include <stdint.h>
#include <wolfssl/wolfcrypt/fe_operations.h>
void fe_init()
{
__asm__ __volatile__ (

View File

@ -24,9 +24,6 @@
* and Daniel J. Bernstein
*/
#ifdef __aarch64__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@ -34,6 +31,8 @@
#include <wolfssl/wolfcrypt/settings.h>
#ifdef WOLFSSL_ARMASM
#ifdef __aarch64__
#ifdef HAVE_POLY1305
#include <wolfssl/wolfcrypt/poly1305.h>
#include <wolfssl/wolfcrypt/error-crypt.h>
@ -1162,5 +1161,5 @@ int wc_Poly1305Final(Poly1305* ctx, byte* mac)
}
#endif /* HAVE_POLY1305 */
#endif /* WOLFSSL_ARMASM */
#endif /* __aarch64__ */
#endif /* WOLFSSL_ARMASM */

View File

@ -23,13 +23,17 @@
* cd ../scripts
* ruby ./sha2/sha512.rb arm64 ../wolfssl/wolfcrypt/src/port/arm/armv8-sha512-asm.c
*/
#ifdef WOLFSSL_ARMASM
#ifdef __aarch64__
#include <stdint.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif /* HAVE_CONFIG_H */
#endif
#include <wolfssl/wolfcrypt/settings.h>
#ifdef WOLFSSL_ARMASM
#ifdef __aarch64__
#include <stdint.h>
#include <wolfssl/wolfcrypt/sha512.h>
static const uint64_t L_SHA512_transform_neon_len_k[] = {