Compare commits
251 Commits
v3.12.0-st
...
v3.12.2-st
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
182028819d | ||
|
|
8a01d725da | ||
|
|
c0105b3008 | ||
|
|
e0734d56df | ||
|
|
2dfad0918a | ||
|
|
96667b47ee | ||
|
|
d46ab1f724 | ||
|
|
7f30397252 | ||
|
|
372e8b04d0 | ||
|
|
911b6f95f8 | ||
|
|
39749ed5be | ||
|
|
d7ae1df778 | ||
|
|
c5f80760a8 | ||
|
|
bdefdfe860 | ||
|
|
024c8725ad | ||
|
|
e904a38092 | ||
|
|
5362d46da9 | ||
|
|
06f564dea3 | ||
|
|
c9558ee27b | ||
|
|
f23ec7d5f2 | ||
|
|
e82807024b | ||
|
|
7f2e6e1d8a | ||
|
|
1377577af5 | ||
|
|
c9516e20b2 | ||
|
|
ccda176bfa | ||
|
|
9bea6cca52 | ||
|
|
9920bdf097 | ||
|
|
1bf9d092af | ||
|
|
1a7d58715a | ||
|
|
3d7e86f08d | ||
|
|
ddb5e57811 | ||
|
|
b82a529ec2 | ||
|
|
aab1e060a0 | ||
|
|
8659140494 | ||
|
|
32103891e2 | ||
|
|
e49560fbf0 | ||
|
|
7dccd9d478 | ||
|
|
d5b7c13fbf | ||
|
|
d65704c6b4 | ||
|
|
c0472a3a89 | ||
|
|
c49188cc89 | ||
|
|
9e4e58fe8c | ||
|
|
f724206e37 | ||
|
|
90f8f67982 | ||
|
|
9a6e4b2939 | ||
|
|
1e445e10a1 | ||
|
|
2b077b2792 | ||
|
|
1f72696359 | ||
|
|
130e026139 | ||
|
|
de34ec0f0c | ||
|
|
02ee22e73b | ||
|
|
819acd18a7 | ||
|
|
2c2217fcdc | ||
|
|
b79b816276 | ||
|
|
6fd53d31c2 | ||
|
|
04106a0089 | ||
|
|
de77d5cc83 | ||
|
|
34cac68f81 | ||
|
|
6548f32ee0 | ||
|
|
6021c37ec7 | ||
|
|
6707be2b0e | ||
|
|
7dca25ea88 | ||
|
|
09f8ddd0f0 | ||
|
|
4c8d228080 | ||
|
|
35141c335d | ||
|
|
898893fbcd | ||
|
|
280de41515 | ||
|
|
effad6e91c | ||
|
|
c945e65479 | ||
|
|
541f60801d | ||
|
|
152c24f210 | ||
|
|
f344f04e60 | ||
|
|
d855fd9452 | ||
|
|
75e04a08cd | ||
|
|
c4052607d7 | ||
|
|
6058362970 | ||
|
|
614736cbb2 | ||
|
|
d88d8c3ed8 | ||
|
|
d4b18a6d3f | ||
|
|
a02903c43e | ||
|
|
2d67f46247 | ||
|
|
69b25ee508 | ||
|
|
19ea4716f3 | ||
|
|
dcf61bd10e | ||
|
|
5c636b4f4a | ||
|
|
918a5fd5a6 | ||
|
|
9bf14a152f | ||
|
|
cb94911e1f | ||
|
|
8cd0b7dfc7 | ||
|
|
09e92c518d | ||
|
|
3b12b7223a | ||
|
|
34ef7207f9 | ||
|
|
eff781c0aa | ||
|
|
c836724685 | ||
|
|
7350bf93b3 | ||
|
|
fd9b2d3b8d | ||
|
|
0376a53f6b | ||
|
|
ef141c3ce9 | ||
|
|
6c85bc5d3d | ||
|
|
fadee8fbf2 | ||
|
|
4f15cde2eb | ||
|
|
e8dd7d0c4a | ||
|
|
b4f7997fdc | ||
|
|
19aaa88c72 | ||
|
|
9eb7e2aafa | ||
|
|
931fbde41d | ||
|
|
b172585fc3 | ||
|
|
e8f95b9252 | ||
|
|
8f3aa49ef6 | ||
|
|
d15704b2ba | ||
|
|
46f7e786cb | ||
|
|
0ced1f4847 | ||
|
|
ee6f88cd98 | ||
|
|
6451e12313 | ||
|
|
763d5f26c7 | ||
|
|
2c4844d5ef | ||
|
|
4a510218c2 | ||
|
|
eec5f9bb41 | ||
|
|
218f944984 | ||
|
|
a2ed22286f | ||
|
|
824eb55648 | ||
|
|
f5c4a68ab3 | ||
|
|
80333979a9 | ||
|
|
3f493770d4 | ||
|
|
2f96f1ae9f | ||
|
|
1c2199be24 | ||
|
|
5777b92745 | ||
|
|
5e6213bfa1 | ||
|
|
28c15bed1c | ||
|
|
3763b88397 | ||
|
|
60dca94821 | ||
|
|
4d8e1c9e5a | ||
|
|
816767744f | ||
|
|
2620cb4559 | ||
|
|
c4e87c8cc4 | ||
|
|
a9e540fc07 | ||
|
|
23903ec903 | ||
|
|
3f16fba4f8 | ||
|
|
27d607efa3 | ||
|
|
dcab2f47ee | ||
|
|
63e8d63943 | ||
|
|
0b11b265f6 | ||
|
|
5f0afcfe88 | ||
|
|
1f7d73f626 | ||
|
|
00e073424a | ||
|
|
f97f9a6158 | ||
|
|
e10b2f027f | ||
|
|
1b3a8f40b8 | ||
|
|
7721aca114 | ||
|
|
afcef7d394 | ||
|
|
23fff62d8b | ||
|
|
4c31c53f37 | ||
|
|
bea82ce214 | ||
|
|
a5eaecaa0e | ||
|
|
932773735b | ||
|
|
398252ddad | ||
|
|
2c39219f2a | ||
|
|
c018a1abf3 | ||
|
|
1d1fc66374 | ||
|
|
ee9d410326 | ||
|
|
a073d5d448 | ||
|
|
c482524b78 | ||
|
|
f7ea118dd7 | ||
|
|
6a226efd15 | ||
|
|
8807b8af4f | ||
|
|
3da5ddd49e | ||
|
|
d48c940334 | ||
|
|
ef73c1df7c | ||
|
|
7ac0bab37e | ||
|
|
9aef8a91fd | ||
|
|
1ba77e4306 | ||
|
|
3b351fd640 | ||
|
|
3dbe5d2af9 | ||
|
|
34dc4a493d | ||
|
|
61ff3e136a | ||
|
|
e6cf3c88f2 | ||
|
|
a8417c1078 | ||
|
|
6970333473 | ||
|
|
a308a56044 | ||
|
|
59358fd91d | ||
|
|
7918b31cae | ||
|
|
23342337ab | ||
|
|
2d5194cdf0 | ||
|
|
b10e0b789b | ||
|
|
4b630b67fa | ||
|
|
73b8be8fcc | ||
|
|
7c604bfc48 | ||
|
|
c25832ad14 | ||
|
|
71f4d546a8 | ||
|
|
fbae4420ad | ||
|
|
8865b272bb | ||
|
|
439e803bd1 | ||
|
|
7892714516 | ||
|
|
07d137480d | ||
|
|
075adcb15b | ||
|
|
5a27e2f621 | ||
|
|
2b7f4b0903 | ||
|
|
c9d6a4de6f | ||
|
|
c330c6b7f9 | ||
|
|
8a37af42bf | ||
|
|
d7f7c27e0a | ||
|
|
74ed94ddb1 | ||
|
|
7460aaf5ea | ||
|
|
c6e722170e | ||
|
|
c9efcc4561 | ||
|
|
84a396b7dc | ||
|
|
f6ad5524eb | ||
|
|
c06e672eb7 | ||
|
|
9909c8428c | ||
|
|
3ca679c1d7 | ||
|
|
9fb0862bc1 | ||
|
|
ff6a136b8a | ||
|
|
3fda99cbc4 | ||
|
|
f7ca2f157d | ||
|
|
68c04bd821 | ||
|
|
53e05786da | ||
|
|
ad4849d692 | ||
|
|
0ed03987df | ||
|
|
2e4000acb4 | ||
|
|
1f80fb952f | ||
|
|
ccc226eae4 | ||
|
|
b32be20110 | ||
|
|
a9c943d5bd | ||
|
|
b4aaeb5768 | ||
|
|
44a3622248 | ||
|
|
dd5430d188 | ||
|
|
af00787f80 | ||
|
|
a6db5fc882 | ||
|
|
2f92998529 | ||
|
|
f6d0b2898d | ||
|
|
2740d313a7 | ||
|
|
7736125156 | ||
|
|
21a8662948 | ||
|
|
963746fb3e | ||
|
|
294a13f9a2 | ||
|
|
5865816198 | ||
|
|
3c1140d90e | ||
|
|
8b41fc841b | ||
|
|
219fcde773 | ||
|
|
36b1a666d0 | ||
|
|
df1e5f2e1a | ||
|
|
04c16ca843 | ||
|
|
af4158d231 | ||
|
|
d12e98eea3 | ||
|
|
f27b3a83aa | ||
|
|
032d606f99 | ||
|
|
32cedb2b12 | ||
|
|
d0ff6067a6 | ||
|
|
ea6b719ec2 | ||
|
|
5c2736f1a9 | ||
|
|
3560eed52b |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -81,6 +81,8 @@ certecc.der
|
||||
certecc.pem
|
||||
othercert.der
|
||||
othercert.pem
|
||||
certeccrsa.der
|
||||
certeccrsa.pem
|
||||
ntru-cert.der
|
||||
ntru-cert.pem
|
||||
ntru-key.raw
|
||||
@@ -215,8 +217,10 @@ wrapper/CSharp/x64/
|
||||
|
||||
# Visual Studio Code Workspace Files
|
||||
*.vscode
|
||||
*.userprefs
|
||||
|
||||
IDE/INTIME-RTOS/Debug_*
|
||||
IDE/VS-ARM/.vs
|
||||
|
||||
# Hexiwear
|
||||
IDE/HEXIWEAR/wolfSSL_HW/Debug
|
||||
@@ -227,4 +231,4 @@ IDE/LINUX-SGX/*.a
|
||||
# Binaries
|
||||
wolfcrypt/src/port/intel/qat_test
|
||||
/mplabx/wolfssl.X/dist/default/
|
||||
/mplabx/wolfcrypt_test.X/dist/default/
|
||||
/mplabx/wolfcrypt_test.X/dist/default/
|
||||
|
||||
440
IDE/GCC-ARM/Header/user_settings.h
Normal file
440
IDE/GCC-ARM/Header/user_settings.h
Normal file
@@ -0,0 +1,440 @@
|
||||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
/* Custom wolfSSL user settings for GCC ARM */
|
||||
|
||||
#ifndef WOLFSSL_USER_SETTINGS_H
|
||||
#define WOLFSSL_USER_SETTINGS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Platform */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#undef WOLFSSL_GENERAL_ALIGNMENT
|
||||
#define WOLFSSL_GENERAL_ALIGNMENT 4
|
||||
|
||||
#undef SINGLE_THREADED
|
||||
#define SINGLE_THREADED
|
||||
|
||||
#undef WOLFSSL_SMALL_STACK
|
||||
#define WOLFSSL_SMALL_STACK
|
||||
|
||||
#undef WOLFSSL_USER_IO
|
||||
#define WOLFSSL_USER_IO
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Math Configuration */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#undef USE_FAST_MATH
|
||||
#define USE_FAST_MATH
|
||||
|
||||
#undef SIZEOF_LONG_LONG
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
#ifdef USE_FAST_MATH
|
||||
#undef TFM_TIMING_RESISTANT
|
||||
#define TFM_TIMING_RESISTANT
|
||||
|
||||
/* Optimizations (on M0 UMULL is not supported, need another assembly solution) */
|
||||
//#define TFM_ARM
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Crypto */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* RSA */
|
||||
#undef NO_RSA
|
||||
#if 1
|
||||
#ifdef USE_FAST_MATH
|
||||
/* Maximum math bits (Max RSA key bits * 2) */
|
||||
#undef FP_MAX_BITS
|
||||
#define FP_MAX_BITS 4096
|
||||
#endif
|
||||
|
||||
/* half as much memory but twice as slow */
|
||||
#undef RSA_LOW_MEM
|
||||
//#define RSA_LOW_MEM
|
||||
|
||||
/* Enables blinding mode, to prevent timing attacks */
|
||||
#undef WC_RSA_BLINDING
|
||||
#define WC_RSA_BLINDING
|
||||
|
||||
#else
|
||||
#define NO_RSA
|
||||
#endif
|
||||
|
||||
/* ECC */
|
||||
#if 1
|
||||
#undef HAVE_ECC
|
||||
#define HAVE_ECC
|
||||
|
||||
/* Manually define enabled curves */
|
||||
#undef ECC_USER_CURVES
|
||||
#define ECC_USER_CURVES
|
||||
|
||||
//#define HAVE_ECC192
|
||||
//#define HAVE_ECC224
|
||||
#undef NO_ECC256
|
||||
//#define HAVE_ECC384
|
||||
//#define HAVE_ECC521
|
||||
|
||||
/* Fixed point cache (speeds repeated operations against same private key) */
|
||||
#undef FP_ECC
|
||||
//#define FP_ECC
|
||||
#ifdef FP_ECC
|
||||
/* Bits / Entries */
|
||||
#undef FP_ENTRIES
|
||||
#define FP_ENTRIES 2
|
||||
#undef FP_LUT
|
||||
#define FP_LUT 4
|
||||
#endif
|
||||
|
||||
/* Optional ECC calculation method */
|
||||
/* Note: doubles heap usage, but slightly faster */
|
||||
#undef ECC_SHAMIR
|
||||
#define ECC_SHAMIR
|
||||
|
||||
/* Reduces heap usage, but slower */
|
||||
#undef ECC_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
|
||||
/* Use alternate ECC size for ECC math */
|
||||
#ifdef USE_FAST_MATH
|
||||
#ifdef NO_RSA
|
||||
/* if not using RSA set FP_MAX_BITS to 256*2 */
|
||||
#undef FP_MAX_BITS
|
||||
#define FP_MAX_BITS 512
|
||||
#else
|
||||
#undef ALT_ECC_SIZE
|
||||
#define ALT_ECC_SIZE
|
||||
#endif
|
||||
|
||||
#ifndef NO_ECC256
|
||||
#undef TFM_ECC256
|
||||
#define TFM_ECC256
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* AES */
|
||||
#undef NO_AES
|
||||
#if 1
|
||||
#undef HAVE_AES_CBC
|
||||
#define HAVE_AES_CBC
|
||||
|
||||
#undef HAVE_AESGCM
|
||||
#define HAVE_AESGCM
|
||||
|
||||
#undef HAVE_AESCCM
|
||||
#define HAVE_AESCCM
|
||||
|
||||
/* GCM Method: GCM_SMALL, GCM_WORD32 or GCM_TABLE */
|
||||
#undef GCM_SMALL
|
||||
#define GCM_SMALL
|
||||
#else
|
||||
#define NO_AES
|
||||
#endif
|
||||
|
||||
/* ChaCha20 / Poly1305 */
|
||||
#undef HAVE_CHACHA
|
||||
#undef HAVE_POLY1305
|
||||
#if 0
|
||||
#define HAVE_CHACHA
|
||||
#define HAVE_POLY1305
|
||||
|
||||
/* Needed for Poly1305 */
|
||||
#undef HAVE_ONE_TIME_AUTH
|
||||
#define HAVE_ONE_TIME_AUTH
|
||||
#endif
|
||||
|
||||
/* Ed25519 / Curve25519 */
|
||||
#undef HAVE_CURVE25519
|
||||
#undef HAVE_ED25519
|
||||
#if 0
|
||||
#define HAVE_CURVE25519
|
||||
#define HAVE_ED25519 /* ED25519 Requires SHA512 */
|
||||
|
||||
/* Optionally use small math (less flash usage, but much slower) */
|
||||
#if 1
|
||||
#define CURVED25519_SMALL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Hashing */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Sha */
|
||||
#undef NO_SHA
|
||||
#if 1
|
||||
/* 1k smaller, but 25% slower */
|
||||
//#define USE_SLOW_SHA
|
||||
#else
|
||||
#define NO_SHA
|
||||
#endif
|
||||
|
||||
/* Sha256 */
|
||||
#undef NO_SHA256
|
||||
#if 1
|
||||
#else
|
||||
#define NO_SHA256
|
||||
#endif
|
||||
|
||||
/* Sha512 */
|
||||
#undef WOLFSSL_SHA512
|
||||
#if 0
|
||||
#define WOLFSSL_SHA512
|
||||
|
||||
/* Sha384 */
|
||||
#undef WOLFSSL_SHA384
|
||||
#if 0
|
||||
#define WOLFSSL_SHA384
|
||||
#endif
|
||||
|
||||
/* over twice as small, but 50% slower */
|
||||
#define USE_SLOW_SHA2
|
||||
#endif
|
||||
|
||||
/* MD5 */
|
||||
#undef NO_MD5
|
||||
#if 1
|
||||
|
||||
#else
|
||||
#define NO_MD5
|
||||
#endif
|
||||
|
||||
#undef WOLFSSL_SHA3
|
||||
#if 0
|
||||
#define WOLFSSL_SHA3
|
||||
#else
|
||||
#endif
|
||||
|
||||
/* HKDF */
|
||||
#undef HAVE_HKDF
|
||||
#if 0
|
||||
#define HAVE_HKDF
|
||||
#else
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Benchmark / Test */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Use reduced benchmark / test sizes */
|
||||
#undef BENCH_EMBEDDED
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
#undef USE_CERT_BUFFERS_2048
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
|
||||
//#undef USE_CERT_BUFFERS_1024
|
||||
//#define USE_CERT_BUFFERS_1024
|
||||
|
||||
#undef USE_CERT_BUFFERS_256
|
||||
#define USE_CERT_BUFFERS_256
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Debugging */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#undef DEBUG_WOLFSSL
|
||||
//#define DEBUG_WOLFSSL
|
||||
|
||||
/* Use this to measure / print heap usage */
|
||||
#if 0
|
||||
#undef USE_WOLFSSL_MEMORY
|
||||
#define USE_WOLFSSL_MEMORY
|
||||
|
||||
#undef WOLFSSL_TRACK_MEMORY
|
||||
//#define WOLFSSL_TRACK_MEMORY
|
||||
|
||||
#undef WOLFSSL_DEBUG_MEMORY
|
||||
//#define WOLFSSL_DEBUG_MEMORY
|
||||
#else
|
||||
#undef NO_WOLFSSL_MEMORY
|
||||
#define NO_WOLFSSL_MEMORY
|
||||
#endif
|
||||
|
||||
#ifndef DEBUG_WOLFSSL
|
||||
#undef NO_ERROR_STRINGS
|
||||
#define NO_ERROR_STRINGS
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Port */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/* Override Current Time */
|
||||
/* Allows custom "custom_time()" function to be used for benchmark */
|
||||
#define WOLFSSL_USER_CURRTIME
|
||||
#define USER_TICKS
|
||||
extern unsigned long my_time(unsigned long* timer);
|
||||
#define XTIME my_time
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* RNG */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Size of returned HW RNG value */
|
||||
#define CUSTOM_RAND_TYPE unsigned int
|
||||
|
||||
/* Seed source */
|
||||
extern unsigned int custom_rand_generate(void);
|
||||
#undef CUSTOM_RAND_GENERATE
|
||||
#define CUSTOM_RAND_GENERATE custom_rand_generate
|
||||
|
||||
/* Choose RNG method */
|
||||
#if 0
|
||||
/* Use built-in P-RNG (SHA256 based) with HW RNG */
|
||||
/* P-RNG + HW RNG (P-RNG is ~8K) */
|
||||
#undef HAVE_HASHDRBG
|
||||
#define HAVE_HASHDRBG
|
||||
#else
|
||||
#undef WC_NO_HASHDRBG
|
||||
#define WC_NO_HASHDRBG
|
||||
|
||||
/* Bypass P-RNG and use only HW RNG */
|
||||
extern int custom_rand_generate_block(unsigned char* output, unsigned int sz);
|
||||
#undef CUSTOM_RAND_GENERATE_BLOCK
|
||||
#define CUSTOM_RAND_GENERATE_BLOCK custom_rand_generate_block
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Enable Features */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#if 0
|
||||
#undef WOLFSSL_TLS13
|
||||
#define WOLFSSL_TLS13
|
||||
#endif
|
||||
|
||||
#undef KEEP_PEER_CERT
|
||||
//#define KEEP_PEER_CERT
|
||||
|
||||
#undef HAVE_COMP_KEY
|
||||
//#define HAVE_COMP_KEY
|
||||
|
||||
#undef HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
|
||||
#undef HAVE_SUPPORTED_CURVES
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
|
||||
#undef WOLFSSL_BASE64_ENCODE
|
||||
#define WOLFSSL_BASE64_ENCODE
|
||||
|
||||
/* TLS Session Cache */
|
||||
#if 0
|
||||
#define SMALL_SESSION_CACHE
|
||||
#else
|
||||
#define NO_SESSION_CACHE
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Disable Features */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#undef NO_WOLFSSL_SERVER
|
||||
//#define NO_WOLFSSL_SERVER
|
||||
|
||||
#undef NO_WOLFSSL_CLIENT
|
||||
//#define NO_WOLFSSL_CLIENT
|
||||
|
||||
#undef NO_CRYPT_TEST
|
||||
//#define NO_CRYPT_TEST
|
||||
|
||||
#undef NO_CRYPT_BENCHMARK
|
||||
//#define NO_CRYPT_BENCHMARK
|
||||
|
||||
/* In-lining of misc.c functions */
|
||||
/* If defined, must include wolfcrypt/src/misc.c in build */
|
||||
/* Slower, but about 1k smaller */
|
||||
#undef NO_INLINE
|
||||
//#define NO_INLINE
|
||||
|
||||
#undef NO_FILESYSTEM
|
||||
#define NO_FILESYSTEM
|
||||
|
||||
#undef NO_WRITEV
|
||||
#define NO_WRITEV
|
||||
|
||||
#undef NO_MAIN_DRIVER
|
||||
#define NO_MAIN_DRIVER
|
||||
|
||||
#undef NO_DEV_RANDOM
|
||||
#define NO_DEV_RANDOM
|
||||
|
||||
#undef NO_DSA
|
||||
#define NO_DSA
|
||||
|
||||
#undef NO_DH
|
||||
#define NO_DH
|
||||
|
||||
#undef NO_DES3
|
||||
#define NO_DES3
|
||||
|
||||
#undef NO_RC4
|
||||
#define NO_RC4
|
||||
|
||||
#undef NO_OLD_TLS
|
||||
#define NO_OLD_TLS
|
||||
|
||||
#undef NO_HC128
|
||||
#define NO_HC128
|
||||
|
||||
#undef NO_RABBIT
|
||||
#define NO_RABBIT
|
||||
|
||||
#undef NO_PSK
|
||||
#define NO_PSK
|
||||
|
||||
#undef NO_MD4
|
||||
#define NO_MD4
|
||||
|
||||
#undef NO_PWDBASED
|
||||
#define NO_PWDBASED
|
||||
|
||||
#undef NO_CODING
|
||||
//#define NO_CODING
|
||||
|
||||
#undef NO_ASN_TIME
|
||||
//#define NO_ASN_TIME
|
||||
|
||||
#undef NO_CERTS
|
||||
//#define NO_CERTS
|
||||
|
||||
#undef NO_SIG_WRAPPER
|
||||
//#define NO_SIG_WRAPPER
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* WOLFSSL_USER_SETTINGS_H */
|
||||
|
||||
16
IDE/GCC-ARM/Makefile
Normal file
16
IDE/GCC-ARM/Makefile
Normal file
@@ -0,0 +1,16 @@
|
||||
BUILD_DIR = ./Build
|
||||
|
||||
all: WolfSSLStaticLib WolfCryptTest WolfCryptBench WolfSSLClient
|
||||
|
||||
WolfCryptTest:
|
||||
$(MAKE) -f Makefile.test
|
||||
WolfCryptBench:
|
||||
$(MAKE) -f Makefile.bench
|
||||
WolfSSLClient:
|
||||
$(MAKE) -f Makefile.client
|
||||
WolfSSLStaticLib:
|
||||
$(MAKE) -f Makefile.static
|
||||
|
||||
clean:
|
||||
rm -f $(BUILD_DIR)/*.elf $(BUILD_DIR)/*.hex $(BUILD_DIR)/*.map
|
||||
rm -f $(BUILD_DIR)/*.o $(BUILD_DIR)/*.sym $(BUILD_DIR)/*.disasm
|
||||
7
IDE/GCC-ARM/Makefile.bench
Normal file
7
IDE/GCC-ARM/Makefile.bench
Normal file
@@ -0,0 +1,7 @@
|
||||
# Project name
|
||||
BIN = WolfCryptBench
|
||||
SRC_C = ./Source/benchmark_main.c
|
||||
|
||||
all: build_hex
|
||||
|
||||
include Makefile.common
|
||||
7
IDE/GCC-ARM/Makefile.client
Normal file
7
IDE/GCC-ARM/Makefile.client
Normal file
@@ -0,0 +1,7 @@
|
||||
# Project name
|
||||
BIN = WolfSSLClient
|
||||
SRC_C = ./Source/tls_client.c
|
||||
|
||||
all: build_hex
|
||||
|
||||
include Makefile.common
|
||||
108
IDE/GCC-ARM/Makefile.common
Normal file
108
IDE/GCC-ARM/Makefile.common
Normal file
@@ -0,0 +1,108 @@
|
||||
# Set to @ if you want to suppress command echo
|
||||
CMD_ECHO =
|
||||
|
||||
# Important directories
|
||||
BUILD_DIR = ./Build
|
||||
|
||||
# Toolchain location and prefix
|
||||
TOOLCHAIN = /opt/gcc-arm-none-eabi/bin/arm-none-eabi-
|
||||
|
||||
INC = -I./Header \
|
||||
-I./Source \
|
||||
-I../..
|
||||
|
||||
# Memory Map
|
||||
SRC_LD = -T./linker.ld
|
||||
|
||||
# Defines
|
||||
DEF = -DWOLFSSL_USER_SETTINGS
|
||||
|
||||
# Compiler and linker flags
|
||||
ARCHFLAGS = -mcpu=cortex-m0 -mthumb -mabi=aapcs
|
||||
DBGFLAGS = -ggdb
|
||||
ASFLAGS = $(ARCHFLAGS)
|
||||
|
||||
# CC: Place functions and data into separate sections to allow dead code removal
|
||||
# by the linker (-f*-sections). Enable link time optimization (-flto)
|
||||
CFLAGS = $(ARCHFLAGS) -std=gnu99 -Wall -Wno-cpp \
|
||||
-ffunction-sections -fdata-sections \
|
||||
-Os -flto $(DBGFLAGS)
|
||||
|
||||
# LD: Remove unused sections
|
||||
LDFLAGS = $(ARCHFLAGS) -Wl,--gc-sections
|
||||
|
||||
# LD: Link with newlib-nano implementation
|
||||
LDFLAGS += --specs=nano.specs --specs=nosys.specs
|
||||
|
||||
# LD: generate map
|
||||
LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(BIN).map $(DBGFLAGS)
|
||||
|
||||
# LD: Entry point
|
||||
LDFLAGS += -Wl,-ereset_handler
|
||||
|
||||
# Math lib (for DH)
|
||||
LIBS = -lm
|
||||
|
||||
SRC_C += ./Source/armtarget.c
|
||||
SRC_C += $(wildcard ../../src/*.c ../../wolfcrypt/src/*.c ../../wolfcrypt/benchmark/*.c ../../wolfcrypt/test/*.c)
|
||||
FILENAMES_C = $(notdir $(SRC_C))
|
||||
FILENAMES_C := $(filter-out evp.c, $(FILENAMES_C))
|
||||
OBJS_C = $(addprefix $(BUILD_DIR)/, $(FILENAMES_C:.c=.o))
|
||||
vpath %.c $(dir $(SRC_C))
|
||||
|
||||
# Tools selection
|
||||
CC = $(TOOLCHAIN)gcc
|
||||
AS = $(TOOLCHAIN)gcc
|
||||
LD = $(TOOLCHAIN)gcc
|
||||
AR = $(TOOLCHAIN)ar
|
||||
NM = $(TOOLCHAIN)nm
|
||||
OBJCOPY = $(TOOLCHAIN)objcopy
|
||||
OBJDUMP = $(TOOLCHAIN)objdump
|
||||
SIZE = $(TOOLCHAIN)size
|
||||
|
||||
build_hex: $(BUILD_DIR) $(BUILD_DIR)/$(BIN).hex
|
||||
@echo ""
|
||||
$(CMD_ECHO) @$(SIZE) $(BUILD_DIR)/$(BIN).elf
|
||||
|
||||
build_static: $(BUILD_DIR) $(BUILD_DIR)/$(BIN).a
|
||||
@echo ""
|
||||
$(CMD_ECHO) @$(SIZE) $(BUILD_DIR)/$(BIN).a
|
||||
|
||||
$(BUILD_DIR):
|
||||
$(CMD_ECHO) mkdir -p $(BUILD_DIR)
|
||||
|
||||
$(BUILD_DIR)/$(BIN).hex: $(BUILD_DIR)/$(BIN).elf
|
||||
@echo "Generating HEX binary: $(notdir $@)"
|
||||
$(CMD_ECHO) $(OBJCOPY) -O ihex $< $@
|
||||
|
||||
$(BUILD_DIR)/%.o: %.s
|
||||
@echo "Compiling ASM file: $(notdir $<)"
|
||||
$(CMD_ECHO) $(AS) $(ASFLAGS) $(DEF) $(INC) -c -o $@ $<
|
||||
|
||||
$(BUILD_DIR)/%.o: %.c
|
||||
@echo "Compiling C file: $(notdir $<)"
|
||||
$(CMD_ECHO) $(CC) $(CFLAGS) $(DEF) $(INC) -c -o $@ $<
|
||||
|
||||
$(BUILD_DIR)/$(BIN).elf: $(OBJS_ASM) $(OBJS_C)
|
||||
@echo "Linking ELF binary: $(notdir $@)"
|
||||
$(CMD_ECHO) $(LD) $(LDFLAGS) $(SRC_LD) -o $@ $^ $(LIBS)
|
||||
|
||||
@echo "Generating name list: $(BIN).sym"
|
||||
$(CMD_ECHO) $(NM) -n $@ > $(BUILD_DIR)/$(BIN).sym
|
||||
|
||||
@echo "Generating disassembly: $(BIN).disasm"
|
||||
$(CMD_ECHO) $(OBJDUMP) -S $@ > $(BUILD_DIR)/$(BIN).disasm
|
||||
|
||||
$(BUILD_DIR)/$(BIN).a: $(OBJS_ASM) $(OBJS_C)
|
||||
@echo "Building static library: $(notdir $@)"
|
||||
$(CMD_ECHO) $(AR) -r $@ $^
|
||||
|
||||
@echo "Generating name list: $(BIN).sym"
|
||||
$(CMD_ECHO) $(NM) -n $@ > $(BUILD_DIR)/$(BIN).sym
|
||||
|
||||
@echo "Generating disassembly: $(BIN).disasm"
|
||||
$(CMD_ECHO) $(OBJDUMP) -S $@ > $(BUILD_DIR)/$(BIN).disasm
|
||||
|
||||
clean:
|
||||
rm -f $(BUILD_DIR)/*.elf $(BUILD_DIR)/*.hex $(BUILD_DIR)/*.map
|
||||
rm -f $(BUILD_DIR)/*.o $(BUILD_DIR)/*.sym $(BUILD_DIR)/*.disasm
|
||||
6
IDE/GCC-ARM/Makefile.static
Normal file
6
IDE/GCC-ARM/Makefile.static
Normal file
@@ -0,0 +1,6 @@
|
||||
# Project name
|
||||
BIN = libwolfssl
|
||||
|
||||
all: build_static
|
||||
|
||||
include Makefile.common
|
||||
7
IDE/GCC-ARM/Makefile.test
Normal file
7
IDE/GCC-ARM/Makefile.test
Normal file
@@ -0,0 +1,7 @@
|
||||
# Project name
|
||||
BIN = WolfCryptTest
|
||||
SRC_C = ./Source/test_main.c
|
||||
|
||||
all: build_hex
|
||||
|
||||
include Makefile.common
|
||||
65
IDE/GCC-ARM/README.md
Normal file
65
IDE/GCC-ARM/README.md
Normal file
@@ -0,0 +1,65 @@
|
||||
# Example Project for GCC ARM
|
||||
|
||||
This example is for Cortex M series, but can be adopted for other architectures.
|
||||
|
||||
## Design
|
||||
|
||||
* All library options are defined in `Header/user_settings.h`.
|
||||
* The memory map is located in the linker file in `linker.ld`.
|
||||
* Entry point function is `reset_handler` in `armtarget.c`.
|
||||
* The RTC and RNG hardware interface needs implemented for real production applications in `armtarget.c`
|
||||
|
||||
## Building
|
||||
|
||||
1. Make sure you have `gcc-arm-none-eabi` installed.
|
||||
2. Modify the `Makefile.common`:
|
||||
* Use correct toolchain path `TOOLCHAIN`.
|
||||
* Use correct architecture 'ARCHFLAGS' (default is cortex-m0 / thumb). See [GCC ARM Options](https://gcc.gnu.org/onlinedocs/gcc-4.7.3/gcc/ARM-Options.html) `-mcpu=name`.
|
||||
3. Use `make` and it will build the static library and wolfCrypt test/benchmark and wolfSSL TLS client targets as `.elf` and `.hex` in `/Build`.
|
||||
|
||||
### Building for Raspberry Pi
|
||||
|
||||
Example `Makefile.common` changes for Rasperry Pi with Cortex-A53:
|
||||
|
||||
1. Change ARCHFLAGS to `ARCHFLAGS = -mcpu=cortex-a53 -mthumb -mabi=aapcs` to specify Cortex-A53.
|
||||
2. Comment out `SRC_LD`, since custom memory map is not applicable.
|
||||
3. Clear `TOOLCHAIN`, so it will use default `gcc`. Set `TOOLCHAIN = `
|
||||
4. Comment out `LDFLAGS += --specs=nano.specs --specs=nosys.specs` to disable newlib-nano.
|
||||
|
||||
Note: To comment out a line in a Makefile use place `#` in front of line.
|
||||
|
||||
### Example Build
|
||||
|
||||
```
|
||||
make clean && make
|
||||
|
||||
text data bss dec hex filename
|
||||
50076 2508 44 52628 cd94 ./Build/WolfCryptTest.elf
|
||||
|
||||
text data bss dec hex filename
|
||||
39155 2508 60 41723 a2fb ./Build/WolfCryptBench.elf
|
||||
|
||||
text data bss dec hex filename
|
||||
70368 464 36 70868 114d4 ./Build/WolfSSLClient.elf
|
||||
```
|
||||
|
||||
## Performace Tuning Options
|
||||
|
||||
These settings are located in `Header/user_settings.h`.
|
||||
|
||||
* `DEBUG_WOLFSSL`: Undefine this to disable debug logging.
|
||||
* `NO_ERROR_STRINGS`: Disables error strings to save code space.
|
||||
* `NO_INLINE`: Disabling inline function saves about 1KB, but is slower.
|
||||
* `WOLFSSL_SMALL_STACK`: Enables stack reduction techniques to allocate stack sections over 100 bytes from heap.
|
||||
* `USE_FAST_MATH`: Uses stack based math, which is faster than the heap based math.
|
||||
* `ALT_ECC_SIZE`: If using fast math and RSA/DH you can define this to reduce your ECC memory consumption.
|
||||
* `FP_MAX_BITS`: Is the maximum math size (key size * 2). Used only with `USE_FAST_MATH`.
|
||||
* `ECC_TIMING_RESISTANT`: Enables timing resistance for ECC and uses slightly less memory.
|
||||
* `ECC_SHAMIR`: Doubles heap usage, but slightly faster
|
||||
* `RSA_LOW_MEM`: Half as much memory but twice as slow. Uses Non-CRT method for private key.
|
||||
AES GCM: `GCM_SMALL`, `GCM_WORD32` or `GCM_TABLE`: Tunes performance and flash/memory usage.
|
||||
* `CURVED25519_SMALL`: Enables small versions of Ed/Curve (FE/GE math).
|
||||
* `USE_SLOW_SHA`: Enables smaller/slower version of SHA.
|
||||
* `USE_SLOW_SHA2`: Over twice as small, but 50% slower
|
||||
* `USE_CERT_BUFFERS_1024` or `USE_CERT_BUFFERS_2048`: Size of RSA certs / keys to test with.
|
||||
* `BENCH_EMBEDDED`: Define this if using the wolfCrypt test/benchmark and using a low memory target.
|
||||
280
IDE/GCC-ARM/Source/armtarget.c
Normal file
280
IDE/GCC-ARM/Source/armtarget.c
Normal file
@@ -0,0 +1,280 @@
|
||||
/* armtarget.c
|
||||
*
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#include "user_settings.h"
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/wolfcrypt/random.h> /* for CUSTOM_RAND_TYPE */
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Test to determine if ARM Cortex M */
|
||||
#if defined(__arm__) && defined(__ARM_ARCH) && (__ARM_ARCH == 6 || __ARM_ARCH == 7)
|
||||
#define CORTEX_M_SERIES
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CORTEX_M_SERIES
|
||||
/* Memory initialization */
|
||||
extern uint32_t __data_load_start__[];
|
||||
extern uint32_t __data_start__[];
|
||||
extern uint32_t __data_end__[];
|
||||
|
||||
extern uint32_t __bss_start__[];
|
||||
extern uint32_t __bss_end__[];
|
||||
|
||||
extern uint32_t __stack_process_end__[];
|
||||
|
||||
extern uint32_t __heap_start__[];
|
||||
extern uint32_t __heap_end__[];
|
||||
|
||||
/* Copy memory: src=Source, dst_beg=Destination Begin, dst_end=Destination End */
|
||||
void memcpy32(uint32_t* src, uint32_t* dst_beg, uint32_t* dst_end)
|
||||
{
|
||||
while (dst_beg < dst_end) {
|
||||
*dst_beg++ = *src++;
|
||||
}
|
||||
}
|
||||
/* Zero address in range */
|
||||
void meminit32(uint32_t* start, uint32_t* end)
|
||||
{
|
||||
while (start < end) {
|
||||
*start++ = 0;
|
||||
}
|
||||
}
|
||||
#endif /* CORTEX_M_SERIES */
|
||||
|
||||
/* Entry Point */
|
||||
void reset_handler(void)
|
||||
{
|
||||
#ifdef CORTEX_M_SERIES
|
||||
/* Init sections */
|
||||
memcpy32(__data_load_start__, __data_start__, __data_end__);
|
||||
meminit32(__bss_start__, __bss_end__);
|
||||
|
||||
/* Init heap */
|
||||
__heap_start__[0] = 0;
|
||||
__heap_start__[1] = ((uint32_t)__heap_end__ - (uint32_t)__heap_start__);
|
||||
#endif /* CORTEX_M_SERIES */
|
||||
|
||||
/* Start main */
|
||||
extern int main(void);
|
||||
main();
|
||||
|
||||
/* Application has ended, so busy wait */
|
||||
while(1);
|
||||
}
|
||||
|
||||
#ifdef CORTEX_M_SERIES
|
||||
// Vector Exception/Interrupt Handlers
|
||||
static void Default_Handler(void)
|
||||
{
|
||||
/* If we get here then need to implement real IRQ handler */
|
||||
while(1);
|
||||
}
|
||||
|
||||
__attribute__((section(".sys"))) __attribute__ ((used))
|
||||
void HardFault_HandlerC( uint32_t *hardfault_args )
|
||||
{
|
||||
/* These are volatile to try and prevent the compiler/linker optimizing them
|
||||
away as the variables never actually get used. If the debugger won't show the
|
||||
values of the variables, make them global my moving their declaration outside
|
||||
of this function. */
|
||||
volatile uint32_t stacked_r0;
|
||||
volatile uint32_t stacked_r1;
|
||||
volatile uint32_t stacked_r2;
|
||||
volatile uint32_t stacked_r3;
|
||||
volatile uint32_t stacked_r12;
|
||||
volatile uint32_t stacked_lr;
|
||||
volatile uint32_t stacked_pc;
|
||||
volatile uint32_t stacked_psr;
|
||||
volatile uint32_t _CFSR;
|
||||
volatile uint32_t _HFSR;
|
||||
volatile uint32_t _DFSR;
|
||||
volatile uint32_t _AFSR;
|
||||
volatile uint32_t _BFAR;
|
||||
volatile uint32_t _MMAR;
|
||||
|
||||
stacked_r0 = ((uint32_t)hardfault_args[0]);
|
||||
stacked_r1 = ((uint32_t)hardfault_args[1]);
|
||||
stacked_r2 = ((uint32_t)hardfault_args[2]);
|
||||
stacked_r3 = ((uint32_t)hardfault_args[3]);
|
||||
stacked_r12 = ((uint32_t)hardfault_args[4]);
|
||||
stacked_lr = ((uint32_t)hardfault_args[5]);
|
||||
stacked_pc = ((uint32_t)hardfault_args[6]);
|
||||
stacked_psr = ((uint32_t)hardfault_args[7]);
|
||||
|
||||
// Configurable Fault Status Register
|
||||
// Consists of MMSR, BFSR and UFSR
|
||||
_CFSR = (*((volatile uint32_t *)(0xE000ED28)));
|
||||
|
||||
// Hard Fault Status Register
|
||||
_HFSR = (*((volatile uint32_t *)(0xE000ED2C)));
|
||||
|
||||
// Debug Fault Status Register
|
||||
_DFSR = (*((volatile uint32_t *)(0xE000ED30)));
|
||||
|
||||
// Auxiliary Fault Status Register
|
||||
_AFSR = (*((volatile uint32_t *)(0xE000ED3C)));
|
||||
|
||||
// Read the Fault Address Registers. These may not contain valid values.
|
||||
// Check BFARVALID/MMARVALID to see if they are valid values
|
||||
// MemManage Fault Address Register
|
||||
_MMAR = (*((volatile uint32_t *)(0xE000ED34)));
|
||||
// Bus Fault Address Register
|
||||
_BFAR = (*((volatile uint32_t *)(0xE000ED38)));
|
||||
|
||||
printf ("\n\nHard fault handler (all numbers in hex):\n");
|
||||
printf ("R0 = %lx\n", stacked_r0);
|
||||
printf ("R1 = %lx\n", stacked_r1);
|
||||
printf ("R2 = %lx\n", stacked_r2);
|
||||
printf ("R3 = %lx\n", stacked_r3);
|
||||
printf ("R12 = %lx\n", stacked_r12);
|
||||
printf ("LR [R14] = %lx subroutine call return address\n", stacked_lr);
|
||||
printf ("PC [R15] = %lx program counter\n", stacked_pc);
|
||||
printf ("PSR = %lx\n", stacked_psr);
|
||||
printf ("CFSR = %lx\n", _CFSR);
|
||||
printf ("HFSR = %lx\n", _HFSR);
|
||||
printf ("DFSR = %lx\n", _DFSR);
|
||||
printf ("AFSR = %lx\n", _AFSR);
|
||||
printf ("MMAR = %lx\n", _MMAR);
|
||||
printf ("BFAR = %lx\n", _BFAR);
|
||||
|
||||
// Break into the debugger
|
||||
__asm("BKPT #0\n");
|
||||
}
|
||||
|
||||
__attribute__((section(".sys"))) __attribute__( ( naked ) )
|
||||
void HardFault_Handler(void)
|
||||
{
|
||||
__asm volatile
|
||||
(
|
||||
" movs r0,#4 \n" /* load bit mask into R0 */
|
||||
" mov r1, lr \n" /* load link register into R1 */
|
||||
" tst r0, r1 \n" /* compare with bitmask */
|
||||
" beq _MSP \n" /* if bitmask is set: stack pointer is in PSP. Otherwise in MSP */
|
||||
" mrs r0, psp \n" /* otherwise: stack pointer is in PSP */
|
||||
" b _GetPC \n" /* go to part which loads the PC */
|
||||
"_MSP: \n" /* stack pointer is in MSP register */
|
||||
" mrs r0, msp \n" /* load stack pointer into R0 */
|
||||
"_GetPC: \n" /* find out where the hard fault happened */
|
||||
" ldr r1,[r0,#20] \n" /* load program counter into R1. R1 contains address of the next instruction where the hard fault happened */
|
||||
" ldr r2, =HardFault_HandlerC \n"
|
||||
" bx r2 \n"
|
||||
" bx lr \n" /* decode more information. R0 contains pointer to stack frame */
|
||||
);
|
||||
}
|
||||
|
||||
// Vectors
|
||||
typedef void (*vector_entry)(void);
|
||||
const vector_entry vectors[] __attribute__ ((section(".vectors"),used)) =
|
||||
{
|
||||
/* Interrupt Vector Table Function Pointers */
|
||||
// Address Vector IRQ Source module Source description
|
||||
(vector_entry)__stack_process_end__, // ARM core Initial Supervisor SP
|
||||
reset_handler, // 0x0000_0004 1 - ARM core Initial Program Counter
|
||||
Default_Handler, // 0x0000_0008 2 - ARM core Non-maskable Interrupt (NMI)
|
||||
HardFault_Handler, // 0x0000_000C 3 - ARM core Hard Fault
|
||||
Default_Handler, // 0x0000_0010 4 -
|
||||
HardFault_Handler, // 0x0000_0014 5 - ARM core Bus Fault
|
||||
HardFault_Handler, // 0x0000_0018 6 - ARM core Usage Fault
|
||||
Default_Handler, // 0x0000_001C 7 -
|
||||
Default_Handler, // 0x0000_0020 8 -
|
||||
Default_Handler, // 0x0000_0024 9 -
|
||||
Default_Handler, // 0x0000_0028 10 -
|
||||
Default_Handler, // 0x0000_002C 11 - ARM core Supervisor call (SVCall)
|
||||
Default_Handler, // 0x0000_0030 12 - ARM core Debug Monitor
|
||||
Default_Handler, // 0x0000_0034 13 -
|
||||
Default_Handler, // 0x0000_0038 14 - ARM core Pendable request for system service (PendableSrvReq)
|
||||
Default_Handler, // 0x0000_003C 15 - ARM core System tick timer (SysTick)
|
||||
|
||||
/* remainder go below */
|
||||
};
|
||||
#endif /* CORTEX_M_SERIES */
|
||||
|
||||
|
||||
/* TIME CODE */
|
||||
/* TODO: Implement real RTC */
|
||||
static int gTimeMs;
|
||||
static int hw_get_time_sec(void)
|
||||
{
|
||||
return ++gTimeMs;
|
||||
}
|
||||
|
||||
unsigned long my_time(unsigned long* timer)
|
||||
{
|
||||
(void)timer;
|
||||
return hw_get_time_sec();
|
||||
}
|
||||
|
||||
unsigned int LowResTimer(void)
|
||||
{
|
||||
return hw_get_time_sec();
|
||||
}
|
||||
|
||||
double current_time(int reset)
|
||||
{
|
||||
double time;
|
||||
int timeMs = gTimeMs;
|
||||
(void)reset;
|
||||
time = (timeMs / 1000); // sec
|
||||
time += (double)(timeMs % 1000) / 1000; // ms
|
||||
return time;
|
||||
}
|
||||
|
||||
|
||||
/* RNG CODE */
|
||||
/* TODO: Implement real RNG */
|
||||
static int gCounter;
|
||||
int hw_rand(void)
|
||||
{
|
||||
return ++gCounter;
|
||||
}
|
||||
|
||||
unsigned int custom_rand_generate(void)
|
||||
{
|
||||
return hw_rand();
|
||||
}
|
||||
|
||||
int custom_rand_generate_block(unsigned char* output, unsigned int sz)
|
||||
{
|
||||
uint32_t i = 0;
|
||||
|
||||
while (i < sz)
|
||||
{
|
||||
/* If not aligned or there is odd/remainder */
|
||||
if( (i + sizeof(CUSTOM_RAND_TYPE)) > sz ||
|
||||
((uint32_t)&output[i] % sizeof(CUSTOM_RAND_TYPE)) != 0
|
||||
) {
|
||||
/* Single byte at a time */
|
||||
output[i++] = (unsigned char)custom_rand_generate();
|
||||
}
|
||||
else {
|
||||
/* Use native 8, 16, 32 or 64 copy instruction */
|
||||
*((CUSTOM_RAND_TYPE*)&output[i]) = custom_rand_generate();
|
||||
i += sizeof(CUSTOM_RAND_TYPE);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
47
IDE/GCC-ARM/Source/benchmark_main.c
Normal file
47
IDE/GCC-ARM/Source/benchmark_main.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/* benchmark_main.c
|
||||
*
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
#include <wolfcrypt/benchmark/benchmark.h>
|
||||
#include <stdio.h>
|
||||
|
||||
typedef struct func_args {
|
||||
int argc;
|
||||
char** argv;
|
||||
int return_code;
|
||||
} func_args;
|
||||
|
||||
static func_args args = { 0 } ;
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
wolfCrypt_Init();
|
||||
|
||||
printf("\nBenchmark Test\n");
|
||||
benchmark_test(&args);
|
||||
printf("Benchmark Test: Return code %d\n", args.return_code);
|
||||
|
||||
wolfCrypt_Cleanup();
|
||||
|
||||
return 0;
|
||||
}
|
||||
47
IDE/GCC-ARM/Source/test_main.c
Normal file
47
IDE/GCC-ARM/Source/test_main.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/* test_main.c
|
||||
*
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
#include <wolfcrypt/test/test.h>
|
||||
#include <stdio.h>
|
||||
|
||||
typedef struct func_args {
|
||||
int argc;
|
||||
char** argv;
|
||||
int return_code;
|
||||
} func_args;
|
||||
|
||||
static func_args args = { 0 } ;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
wolfCrypt_Init();
|
||||
|
||||
printf("\nCrypt Test\n");
|
||||
wolfcrypt_test(&args);
|
||||
printf("Crypt Test: Return code %d\n", args.return_code);
|
||||
|
||||
wolfCrypt_Cleanup();
|
||||
|
||||
return 0;
|
||||
}
|
||||
198
IDE/GCC-ARM/Source/tls_client.c
Normal file
198
IDE/GCC-ARM/Source/tls_client.c
Normal file
@@ -0,0 +1,198 @@
|
||||
/* tls_client.c
|
||||
*
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define MAXSZ 1024
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
/* TLS CLIENT */
|
||||
/*------------------------------------------------------------------------*/
|
||||
static int CbIORecv(WOLFSSL *ssl, char *buf, int sz, void *ctx)
|
||||
{
|
||||
int ret = WOLFSSL_CBIO_ERR_GENERAL;
|
||||
|
||||
(void)ssl;
|
||||
(void)ctx;
|
||||
|
||||
/* TODO: Exchange data over your own transport */
|
||||
#warning TODO: Implement your own recv data transport
|
||||
#if 0
|
||||
ret = usart_read_buffer_wait(&cdc_uart_module, buf, sz);
|
||||
if (ret == STATUS_ERR_TIMEOUT)
|
||||
return WOLFSSL_CBIO_ERR_WANT_READ;
|
||||
|
||||
return (ret == STATUS_OK) ? sz : WOLFSSL_CBIO_ERR_GENERAL;
|
||||
#else
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int CbIOSend(WOLFSSL *ssl, char *buf, int sz, void *ctx)
|
||||
{
|
||||
int ret = WOLFSSL_CBIO_ERR_GENERAL;
|
||||
|
||||
(void)ssl;
|
||||
(void)ctx;
|
||||
|
||||
/* TODO: Exchange data over your own transport */
|
||||
#warning TODO: Implement your own send data transport
|
||||
#if 0
|
||||
ret = usart_write_buffer_wait(&cdc_uart_module, buf, sz);
|
||||
if (ret == STATUS_ERR_TIMEOUT)
|
||||
return WOLFSSL_CBIO_ERR_WANT_WRITE;
|
||||
|
||||
return (ret == STATUS_OK) ? sz : WOLFSSL_CBIO_ERR_GENERAL;
|
||||
#else
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int tls_client(void)
|
||||
{
|
||||
char msg[] = "Hello WolfSSL!\r\n";
|
||||
char reply[MAXSZ];
|
||||
int ret, msgSz, error;
|
||||
WOLFSSL* ssl = NULL;
|
||||
WOLFSSL_CTX* ctx = NULL;
|
||||
|
||||
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method())) == NULL) {
|
||||
printf("CTXnew failed.\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
/* ECDHE-ECDSA */
|
||||
/*------------------------------------------------------------------------*/
|
||||
/*--------------------*/
|
||||
/* for peer auth use: */
|
||||
/*--------------------*/
|
||||
// wolfSSL_CTX_load_verify_buffer(ctx, rsa_key_der_1024,
|
||||
// sizeof_rsa_key_der_1024, SSL_FILETYPE_ASN1);
|
||||
// wolfSSL_CTX_load_verify_buffer(ctx, server_cert_der_1024,
|
||||
// sizeof_server_cert_der_1024, SSL_FILETYPE_ASN1);
|
||||
/*---------------------*/
|
||||
/* for no peer auth: */
|
||||
/*---------------------*/
|
||||
wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
|
||||
/*---------------------*/
|
||||
/* end peer auth option*/
|
||||
/*---------------------*/
|
||||
if ((ret = wolfSSL_CTX_set_cipher_list(ctx, "ECDHE-ECDSA-AES128-SHA256")) != SSL_SUCCESS) {
|
||||
wolfSSL_CTX_free(ctx);
|
||||
printf("CTXset_cipher_list failed, error: %d\n", ret);
|
||||
goto fail;
|
||||
}
|
||||
/*------------------------------------------------------------------------*/
|
||||
/* END CIPHER SUITE OPTIONS */
|
||||
/*------------------------------------------------------------------------*/
|
||||
wolfSSL_SetIORecv(ctx, CbIORecv);
|
||||
wolfSSL_SetIOSend(ctx, CbIOSend);
|
||||
|
||||
if ((ssl = wolfSSL_new(ctx)) == NULL) {
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
printf("wolfSSL_new failed %d\n", error);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* non blocking accept and connect */
|
||||
ret = SSL_FAILURE;
|
||||
|
||||
while (ret != SSL_SUCCESS) {
|
||||
/* client connect */
|
||||
ret = wolfSSL_connect(ssl);
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
if (ret != SSL_SUCCESS) {
|
||||
if (error != SSL_ERROR_WANT_READ && error != SSL_ERROR_WANT_WRITE) {
|
||||
/* Fail */
|
||||
printf("wolfSSL connect failed with return code %d\n", error);
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
/* Success */
|
||||
}
|
||||
|
||||
/* read and write */
|
||||
while (1) {
|
||||
/* client send/read */
|
||||
msgSz = sizeof(msg);
|
||||
ret = wolfSSL_write(ssl, msg, msgSz);
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
if (ret != msgSz) {
|
||||
if (error != SSL_ERROR_WANT_READ && error != SSL_ERROR_WANT_WRITE) {
|
||||
/* Write failed */
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
/* Write succeeded */
|
||||
break;
|
||||
}
|
||||
|
||||
while (1) {
|
||||
ret = wolfSSL_read(ssl, reply, sizeof(reply) - 1);
|
||||
error = wolfSSL_get_error(ssl, 0);
|
||||
if (ret < 0) {
|
||||
if (error != SSL_ERROR_WANT_READ && error != SSL_ERROR_WANT_WRITE) {
|
||||
/* Can put print here, the server enters a loop waiting to read
|
||||
* a confirmation message at this point */
|
||||
// printf("client read failed\n");
|
||||
goto fail;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
/* Can put print here, the server enters a loop waiting to read
|
||||
* a confirmation message at this point */
|
||||
reply[ret] = '\0';
|
||||
// printf("Client Received Reply: %s\n", reply);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
wolfSSL_shutdown(ssl);
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
wolfSSL_Init();
|
||||
|
||||
ret = tls_client();
|
||||
|
||||
wolfSSL_Cleanup();
|
||||
|
||||
return ret;
|
||||
}
|
||||
17
IDE/GCC-ARM/include.am
Normal file
17
IDE/GCC-ARM/include.am
Normal file
@@ -0,0 +1,17 @@
|
||||
# vim:ft=automake
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Header/user_settings.h
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Source/armtarget.c
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Source/benchmark_main.c
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Source/test_main.c
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Source/tls_client.c
|
||||
EXTRA_DIST+= IDE/GCC-ARM/linker.ld
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Makefile
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Makefile.bench
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Makefile.client
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Makefile.common
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Makefile.test
|
||||
EXTRA_DIST+= IDE/GCC-ARM/Makefile.static
|
||||
EXTRA_DIST+= IDE/GCC-ARM/README.md
|
||||
30
IDE/GCC-ARM/linker.ld
Normal file
30
IDE/GCC-ARM/linker.ld
Normal file
@@ -0,0 +1,30 @@
|
||||
MEMORY
|
||||
{
|
||||
FLASH (wx) : ORIGIN = 0x00000000, LENGTH = 256K
|
||||
RAM (wx) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
__vectors_start__ = .;
|
||||
.vectors : { *(.vectors) } > FLASH
|
||||
__vectors_end__ = __vectors_start__ + 0x400;
|
||||
.sys : { *(.sys*) } > FLASH
|
||||
.text : { *(.text*) } > FLASH
|
||||
.rodata : { *(.text*) } > FLASH
|
||||
|
||||
__data_load_start__ = .;
|
||||
__data_start__ = .;
|
||||
.data : { *(.data*) } > RAM
|
||||
__data_end__ = __data_start__ + SIZEOF(.data);
|
||||
|
||||
__bss_start__ = .;
|
||||
.bss : { *(.bss*) } > RAM
|
||||
__bss_end__ = __bss_start__ + SIZEOF(.bss);
|
||||
|
||||
__heap_start__ = .;
|
||||
.heap : { *(.heap*) } > RAM
|
||||
__heap_end__ = __heap_start__ + SIZEOF(.heap);
|
||||
|
||||
end = .;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/* benchmark-main.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* current-time.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -53,7 +53,7 @@ void InitTimer(void) {
|
||||
|
||||
static int initFlag = false ;
|
||||
double current_time(int reset)
|
||||
{
|
||||
{
|
||||
if(!initFlag)InitTimer() ;
|
||||
initFlag = true ;
|
||||
if(reset)ROM_TimerLoadSet(TIMER0_BASE, TIMER_A, -1);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* minimum-startup.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
||||
@@ -2056,7 +2056,7 @@
|
||||
<name>$PROJ_DIR$\..\..\..\..\src\internal.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\src\io.c</name>
|
||||
<name>$PROJ_DIR$\..\..\..\..\src\wolfio.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\..\..\src\keys.c</name>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* test-main.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
||||
0
IDE/INTIME-RTOS/README.md
Executable file → Normal file
0
IDE/INTIME-RTOS/README.md
Executable file → Normal file
0
IDE/INTIME-RTOS/libwolfssl.c
Executable file → Normal file
0
IDE/INTIME-RTOS/libwolfssl.c
Executable file → Normal file
@@ -17,7 +17,7 @@
|
||||
<ClCompile Include="libwolfssl.c" />
|
||||
<ClCompile Include="..\..\src\crl.c" />
|
||||
<ClCompile Include="..\..\src\internal.c" />
|
||||
<ClCompile Include="..\..\src\io.c" />
|
||||
<ClCompile Include="..\..\src\wolfio.c" />
|
||||
<ClCompile Include="..\..\src\keys.c" />
|
||||
<ClCompile Include="..\..\src\ocsp.c" />
|
||||
<ClCompile Include="..\..\src\sniffer.c" />
|
||||
|
||||
0
IDE/INTIME-RTOS/user_settings.h
Executable file → Normal file
0
IDE/INTIME-RTOS/user_settings.h
Executable file → Normal file
0
IDE/INTIME-RTOS/wolfExamples.c
Executable file → Normal file
0
IDE/INTIME-RTOS/wolfExamples.c
Executable file → Normal file
0
IDE/INTIME-RTOS/wolfExamples.h
Executable file → Normal file
0
IDE/INTIME-RTOS/wolfExamples.h
Executable file → Normal file
@@ -64,7 +64,7 @@ Wolfssl_C_Files :=$(WOLFSSL_ROOT)/wolfcrypt/src/aes.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/hmac.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/integer.c\
|
||||
$(WOLFSSL_ROOT)/src/internal.c\
|
||||
$(WOLFSSL_ROOT)/src/io.c\
|
||||
$(WOLFSSL_ROOT)/src/wolfio.c\
|
||||
$(WOLFSSL_ROOT)/src/keys.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/logging.c\
|
||||
$(WOLFSSL_ROOT)/wolfcrypt/src/md4.c\
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* lpc_18xx_port.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* lpc_18xx_startup.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* time.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -19,25 +19,25 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* initialize RTC
|
||||
* initialize RTC
|
||||
*----------------------------------------------------------------------------*/
|
||||
#include <stdio.h>
|
||||
#include "lpc43xx_rtc.h"
|
||||
#include "lpc43xx_cgu.h"
|
||||
|
||||
static void init_RTC()
|
||||
{
|
||||
static void init_RTC()
|
||||
{
|
||||
/* Enable GPIO register interface clock */
|
||||
LPC_CCU1->CLK_M4_GPIO_CFG |= 1;
|
||||
while (!(LPC_CCU1->CLK_M4_GPIO_STAT & 1)) ;
|
||||
|
||||
|
||||
/* RTC Block section ------------------------------------------------------ */
|
||||
/* Init RTC module */
|
||||
RTC_Init(LPC_RTC);
|
||||
@@ -53,13 +53,13 @@ static void init_RTC()
|
||||
|
||||
/* Enable rtc (starts increase the tick counter and second counter register) */
|
||||
RTC_Cmd(LPC_RTC, ENABLE);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* initialize TIM
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include "lpc43xx_timer.h"
|
||||
|
||||
static void init_TIM()
|
||||
@@ -75,9 +75,9 @@ static void init_TIM()
|
||||
TIM_Cmd(LPC_TIMER2,ENABLE);
|
||||
}
|
||||
|
||||
double current_time()
|
||||
double current_time()
|
||||
{
|
||||
return (double)LPC_TIMER2->TC/1000000.0;
|
||||
return (double)LPC_TIMER2->TC/1000000.0;
|
||||
}
|
||||
|
||||
|
||||
@@ -88,9 +88,9 @@ void init_time(void) {
|
||||
|
||||
#include <time.h>
|
||||
|
||||
struct tm *Cyassl_MDK_gmtime(const time_t *c)
|
||||
{
|
||||
static struct tm date ;
|
||||
struct tm *Cyassl_MDK_gmtime(const time_t *c)
|
||||
{
|
||||
static struct tm date ;
|
||||
|
||||
RTC_TIME_Type RTCFullTime;
|
||||
RTC_GetFullTime (LPC_RTC, &RTCFullTime);
|
||||
@@ -102,17 +102,17 @@ struct tm *Cyassl_MDK_gmtime(const time_t *c)
|
||||
date.tm_min = RTCFullTime.MIN ;
|
||||
date.tm_sec = RTCFullTime.SEC ;
|
||||
|
||||
#if defined(DEBUG_CYASSL)
|
||||
#if defined(DEBUG_CYASSL)
|
||||
{
|
||||
extern void CYASSL_MSG(char *msg) ;
|
||||
char msg[100] ;
|
||||
sprintf(msg, "Debug::Cyassl_KEIL_gmtime(DATE=/%4d/%02d/%02d TIME=%02d:%02d:%02d)\n",
|
||||
RTCFullTime.YEAR+2000, RTCFullTime.MONTH, RTCFullTime.DOM,
|
||||
RTCFullTime.HOUR, RTCFullTime.MIN, RTCFullTime.SEC) ;
|
||||
CYASSL_MSG(msg) ;
|
||||
RTCFullTime.HOUR, RTCFullTime.MIN, RTCFullTime.SEC) ;
|
||||
CYASSL_MSG(msg) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
return(&date) ;
|
||||
}
|
||||
|
||||
@@ -124,42 +124,42 @@ typedef struct func_args {
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void time_main(void *args)
|
||||
void time_main(void *args)
|
||||
{
|
||||
char * datetime ;
|
||||
int year ;
|
||||
RTC_TIME_Type RTCFullTime;
|
||||
|
||||
if( args == NULL || ((func_args *)args)->argc == 1) {
|
||||
if( args == NULL || ((func_args *)args)->argc == 1) {
|
||||
RTC_GetFullTime (LPC_RTC, &RTCFullTime);
|
||||
printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n",
|
||||
RTCFullTime.MONTH, RTCFullTime.DOM, RTCFullTime.YEAR+2000,
|
||||
RTCFullTime.HOUR, RTCFullTime.MIN, RTCFullTime.SEC) ;
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-' &&
|
||||
printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n",
|
||||
RTCFullTime.MONTH, RTCFullTime.DOM, RTCFullTime.YEAR+2000,
|
||||
RTCFullTime.HOUR, RTCFullTime.MIN, RTCFullTime.SEC) ;
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-' &&
|
||||
((func_args *)args)->argv[1][1] == 'd' ) {
|
||||
|
||||
datetime = ((func_args *)args)->argv[2];
|
||||
sscanf(datetime, "%d/%d/%d",
|
||||
sscanf(datetime, "%d/%d/%d",
|
||||
(int *)&RTCFullTime.MONTH, (int *)&RTCFullTime.DOM, &year) ;
|
||||
RTCFullTime.YEAR = year - 2000 ;
|
||||
RTCFullTime.YEAR = year - 2000 ;
|
||||
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_MONTH, RTCFullTime.MONTH);
|
||||
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_YEAR, RTCFullTime.YEAR);
|
||||
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_DAYOFMONTH, RTCFullTime.DOM);
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-' &&
|
||||
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_DAYOFMONTH, RTCFullTime.DOM);
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-' &&
|
||||
((func_args *)args)->argv[1][1] == 't' ) {
|
||||
RTC_GetFullTime (LPC_RTC, &RTCFullTime);
|
||||
datetime = ((func_args *)args)->argv[2];
|
||||
sscanf(datetime, "%d:%d:%d",
|
||||
(int *)&RTCFullTime.HOUR,
|
||||
(int *)&RTCFullTime.MIN,
|
||||
sscanf(datetime, "%d:%d:%d",
|
||||
(int *)&RTCFullTime.HOUR,
|
||||
(int *)&RTCFullTime.MIN,
|
||||
(int *)&RTCFullTime.SEC
|
||||
) ;
|
||||
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_SECOND, RTCFullTime.SEC);
|
||||
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_MINUTE, RTCFullTime.MIN);
|
||||
RTC_SetTime (LPC_RTC, RTC_TIMETYPE_HOUR, RTCFullTime.HOUR);
|
||||
} else printf("Invalid argument\n") ;
|
||||
} else printf("Invalid argument\n") ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* certs_test.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* config-BEREFOOT.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -72,7 +72,7 @@
|
||||
// <e>Crypt/Cipher Benchmark
|
||||
#define MDK_CONF_CTaoCryptBenchmark 1
|
||||
#if MDK_CONF_CTaoCryptBenchmark == 0
|
||||
#define NO_CRYPT_BENCHMARK
|
||||
#define NO_CRYPT_BENCHMARK
|
||||
#define BENCH_EMBEDDED
|
||||
#endif
|
||||
// </e>
|
||||
@@ -120,10 +120,10 @@
|
||||
#define WOLFSSL_SHA384
|
||||
#endif
|
||||
// </e>
|
||||
// <e>SHA-512
|
||||
// <e>SHA-512
|
||||
#define MDK_CONF_SHA512 0
|
||||
#if MDK_CONF_SHA512 == 1
|
||||
#define WOLFSSL_SHA512
|
||||
#define WOLFSSL_SHA512
|
||||
#endif
|
||||
// </e>
|
||||
// <e>RIPEMD
|
||||
@@ -151,7 +151,7 @@
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>AEAD
|
||||
// <e>AEAD
|
||||
#define MDK_CONF_AEAD 0
|
||||
#if MDK_CONF_AEAD == 1
|
||||
#define HAVE_AEAD
|
||||
@@ -178,7 +178,7 @@
|
||||
#endif
|
||||
// </e>
|
||||
// <e>DSA
|
||||
#define MDK_CONF_DSA 1
|
||||
#define MDK_CONF_DSA 1
|
||||
#if MDK_CONF_DSA == 0
|
||||
#define NO_DSA
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* config-FS.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -70,7 +70,7 @@
|
||||
// <e>Crypt/Cipher Benchmark
|
||||
#define MDK_CONF_CTaoCryptBenchmark 1
|
||||
#if MDK_CONF_CTaoCryptBenchmark == 0
|
||||
#define NO_CRYPT_BENCHMARK
|
||||
#define NO_CRYPT_BENCHMARK
|
||||
#endif
|
||||
// </e>
|
||||
// </h>
|
||||
@@ -97,7 +97,7 @@
|
||||
// <h>SSL (Included by default)
|
||||
// </h>
|
||||
|
||||
// <e>TLS
|
||||
// <e>TLS
|
||||
#define MDK_CONF_TLS 1
|
||||
#if MDK_CONF_TLS == 0
|
||||
#define NO_TLS
|
||||
@@ -157,10 +157,10 @@
|
||||
#define WOLFSSL_SHA384
|
||||
#endif
|
||||
// </e>
|
||||
// <e>SHA-512
|
||||
// <e>SHA-512
|
||||
#define MDK_CONF_SHA512 0
|
||||
#if MDK_CONF_SHA512 == 1
|
||||
#define WOLFSSL_SHA512
|
||||
#define WOLFSSL_SHA512
|
||||
#endif
|
||||
// </e>
|
||||
// <e>RIPEMD
|
||||
@@ -188,7 +188,7 @@
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>AEAD
|
||||
// <e>AEAD
|
||||
#define MDK_CONF_AEAD 0
|
||||
#if MDK_CONF_AEAD == 1
|
||||
#define HAVE_AEAD
|
||||
@@ -215,7 +215,7 @@
|
||||
#endif
|
||||
// </e>
|
||||
// <e>DSA
|
||||
#define MDK_CONF_DSA 1
|
||||
#define MDK_CONF_DSA 1
|
||||
#if MDK_CONF_DSA == 0
|
||||
#define NO_DSA
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* config-RTX-TCP-FS.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -66,7 +66,7 @@
|
||||
// <e>Crypt/Cipher Benchmark
|
||||
#define MDK_CONF_CTaoCryptBenchmark 1
|
||||
#if MDK_CONF_CTaoCryptBenchmark == 0
|
||||
#define NO_CRYPT_BENCHMARK
|
||||
#define NO_CRYPT_BENCHMARK
|
||||
#define BENCH_EMBEDDED
|
||||
#endif
|
||||
// </e>
|
||||
@@ -120,7 +120,7 @@
|
||||
// <h>SSL (Included by default)
|
||||
// </h>
|
||||
|
||||
// <e>TLS
|
||||
// <e>TLS
|
||||
#define MDK_CONF_TLS 1
|
||||
#if MDK_CONF_TLS == 0
|
||||
#define NO_TLS
|
||||
@@ -179,10 +179,10 @@
|
||||
#define WOLFSSL_SHA384
|
||||
#endif
|
||||
// </e>
|
||||
// <e>SHA-512
|
||||
// <e>SHA-512
|
||||
#define MDK_CONF_SHA512 0
|
||||
#if MDK_CONF_SHA512 == 1
|
||||
#define WOLFSSL_SHA512
|
||||
#define WOLFSSL_SHA512
|
||||
#endif
|
||||
// </e>
|
||||
// <e>RIPEMD
|
||||
@@ -210,7 +210,7 @@
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>AEAD
|
||||
// <e>AEAD
|
||||
#define MDK_CONF_AEAD 0
|
||||
#if MDK_CONF_AEAD == 1
|
||||
#define HAVE_AEAD
|
||||
@@ -237,7 +237,7 @@
|
||||
#endif
|
||||
// </e>
|
||||
// <e>DSA
|
||||
#define MDK_CONF_DSA 1
|
||||
#define MDK_CONF_DSA 1
|
||||
#if MDK_CONF_DSA == 0
|
||||
#define NO_DSA
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* config.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* main.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -19,7 +19,7 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@@ -35,7 +35,7 @@
|
||||
* Initialize a Flash Memory Card
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
static void init_card (void)
|
||||
static void init_card (void)
|
||||
{
|
||||
U32 retv;
|
||||
|
||||
@@ -55,14 +55,14 @@ static void init_card (void)
|
||||
* TCP/IP tasks
|
||||
*----------------------------------------------------------------------------*/
|
||||
#ifdef WOLFSSL_KEIL_TCP_NET
|
||||
__task void tcp_tick (void)
|
||||
__task void tcp_tick (void)
|
||||
{
|
||||
|
||||
|
||||
WOLFSSL_MSG("Time tick started.") ;
|
||||
#if defined (HAVE_KEIL_RTX)
|
||||
os_itv_set (10);
|
||||
#endif
|
||||
|
||||
|
||||
while (1) {
|
||||
#if defined (HAVE_KEIL_RTX)
|
||||
os_itv_wait ();
|
||||
@@ -99,11 +99,11 @@ extern void benchmark_test(void) ;
|
||||
extern void SER_Init(void) ;
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* mian entry
|
||||
* mian entry
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
/*** This is the parent task entry ***/
|
||||
void main_task (void)
|
||||
void main_task (void)
|
||||
{
|
||||
#ifdef WOLFSSL_KEIL_TCP_NET
|
||||
init_TcpNet ();
|
||||
@@ -111,8 +111,8 @@ void main_task (void)
|
||||
os_tsk_create (tcp_tick, 2);
|
||||
os_tsk_create (tcp_poll, 1);
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_MDK_SHELL
|
||||
|
||||
#ifdef WOLFSSL_MDK_SHELL
|
||||
#ifdef HAVE_KEIL_RTX
|
||||
os_tsk_create_user(shell_main, 1, Shell_stack, SHELL_STACKSIZE) ;
|
||||
#else
|
||||
@@ -124,8 +124,8 @@ void main_task (void)
|
||||
/*** USER APPLICATION HERE ***/
|
||||
/************************************/
|
||||
printf("USER LOGIC STARTED\n") ;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_KEIL_RTX
|
||||
WOLFSSL_MSG("Terminating tcp_main\n") ;
|
||||
@@ -148,7 +148,7 @@ extern void SystemInit(void);
|
||||
|
||||
int main() {
|
||||
|
||||
SystemInit();
|
||||
SystemInit();
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
init_card () ; /* initializing SD card */
|
||||
#endif
|
||||
@@ -157,7 +157,7 @@ int main() {
|
||||
printf("Turning ON Debug message\n") ;
|
||||
wolfSSL_Debugging_ON() ;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_KEIL_RTX
|
||||
os_sys_init (main_task) ;
|
||||
#else
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*shell.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -19,9 +19,9 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*** tiny Shell for wolfSSL apps ***/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@@ -185,7 +185,7 @@ extern void dh_test(void *arg) ;
|
||||
#ifndef NO_DSA
|
||||
extern void dsa_test(void *arg) ;
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef NO_PWDBASED
|
||||
extern void pwdbased_test(void *arg) ;
|
||||
#endif
|
||||
@@ -276,8 +276,8 @@ static struct {
|
||||
#ifndef NO_DES3
|
||||
"des", des_test,
|
||||
"des3", des3_test,
|
||||
#endif
|
||||
#ifndef NO_AES
|
||||
#endif
|
||||
#ifndef NO_AES
|
||||
"aes", aes_test,
|
||||
#ifdef HAVE_AESGCM
|
||||
"aesgcm", aesgcm_test,
|
||||
@@ -299,10 +299,10 @@ static struct {
|
||||
#endif
|
||||
#ifndef NO_DSA
|
||||
"dsa", dsa_test,
|
||||
#endif
|
||||
#endif
|
||||
#ifndef NO_PWDBASED
|
||||
"pwdbased", pwdbased_test,
|
||||
#endif
|
||||
#endif
|
||||
#ifdef OPENSSL_EXTRA
|
||||
"openssl", openssl_test,
|
||||
#endif
|
||||
@@ -320,22 +320,22 @@ enum jobtype { FORGROUND, BACKGROUND } ;
|
||||
#define IF_DELIMITER(ch) ((ch) == ' ' || (ch) == '\n')
|
||||
|
||||
/******* Get Command Line *****************************/
|
||||
static int getline(char * line, int sz, func_args *args, int*bf_flg)
|
||||
static int getline(char * line, int sz, func_args *args, int*bf_flg)
|
||||
{
|
||||
char * ret ;
|
||||
int i ;
|
||||
|
||||
|
||||
#define MAXARGS 10
|
||||
#define MAXARGLEN 30
|
||||
static char *argv[MAXARGS] ;
|
||||
args->argv = argv ;
|
||||
|
||||
|
||||
putchar('>') ;
|
||||
fflush(stdout) ;
|
||||
ret = fgets(line, sz, stdin) ;
|
||||
#define SHELL_ERROR_FGETS -102
|
||||
if(ret != line) return(SHELL_ERROR_FGETS) ;
|
||||
|
||||
|
||||
if(line[strlen(line)-2] == '&') {
|
||||
(*bf_flg) = BACKGROUND ;
|
||||
line[strlen(line)-2] = '\n' ;
|
||||
@@ -363,22 +363,22 @@ static int BackGround = 0 ; /* 1: background job is running */
|
||||
#define IP_SIZE 16
|
||||
|
||||
#ifdef WOLFSSL_KEIL_NET
|
||||
static void ipaddr_comm(void *args)
|
||||
static void ipaddr_comm(void *args)
|
||||
{
|
||||
if(((func_args *)args)->argc == 1) {
|
||||
printf("IP addr: %s, port %d\n", wolfSSLIP, wolfSSLPort) ;
|
||||
} else {
|
||||
if(BackGround != 0) {
|
||||
printf("Cannot change IP addr while background server is running\n") ;
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-'&&
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-'&&
|
||||
((func_args *)args)->argv[1][1] == 'a' ) {
|
||||
/* strcpy(wolfSSLIP, ((func_args *)args)->argv[2]) ; */
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-' &&
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-' &&
|
||||
((func_args *)args)->argv[1][1] == 'p' ) {
|
||||
/* yasslPort = atoi(((func_args *)args)->argv[2]) ; */
|
||||
} else printf("Invalid argument\n") ;
|
||||
} else printf("Invalid argument\n") ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ static void ipaddr_comm(void *args)
|
||||
#if defined(HAVE_KEIL_RTX)
|
||||
static int stack_ck = 0 ;
|
||||
|
||||
static void stack_comm(void *args)
|
||||
static void stack_comm(void *args)
|
||||
{
|
||||
if(stack_ck) {
|
||||
printf("Stack Check: Off\n") ;
|
||||
@@ -399,7 +399,7 @@ static void stack_comm(void *args)
|
||||
stack_ck = 1 ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#define FILL_PATTERN 0xa596695a
|
||||
void stack_fill(char * stack, int size)
|
||||
{
|
||||
@@ -410,13 +410,13 @@ void stack_fill(char * stack, int size)
|
||||
((int *)stack)[i] = FILL_PATTERN ;
|
||||
}
|
||||
|
||||
void stack_check(char * stack, int size)
|
||||
void stack_check(char * stack, int size)
|
||||
{
|
||||
int i ;
|
||||
|
||||
|
||||
if(stack_ck == 0)return ;
|
||||
if(stack_ck == 1) {
|
||||
stack_ck ++ ; return ;
|
||||
stack_ck ++ ; return ;
|
||||
}
|
||||
for(i=1; i<size/4 ; i++) {
|
||||
if(((int *)stack)[i] != FILL_PATTERN) break ;
|
||||
@@ -432,7 +432,7 @@ void stack_check(char * stack, int size)
|
||||
|
||||
static int for_iteration = 1 ;
|
||||
|
||||
static void for_command(void *args)
|
||||
static void for_command(void *args)
|
||||
{
|
||||
if( args == NULL || ((func_args *)args)->argc == 1) {
|
||||
printf("For %d times\n", for_iteration) ;
|
||||
@@ -446,7 +446,7 @@ static void for_command(void *args)
|
||||
|
||||
static int wolfsslDebug = 1 ;
|
||||
|
||||
static void dbg_comm(void *args)
|
||||
static void dbg_comm(void *args)
|
||||
{
|
||||
if(wolfsslDebug == 1) {
|
||||
wolfsslDebug = 0 ;
|
||||
@@ -460,9 +460,9 @@ static void dbg_comm(void *args)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void help_comm(void *args)
|
||||
static void help_comm(void *args)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -484,12 +484,12 @@ static wolfSSL_Mutex command_mutex ;
|
||||
#endif
|
||||
|
||||
/*********** Invoke Forground Command *********************/
|
||||
static void command_invoke(void *args)
|
||||
static void command_invoke(void *args)
|
||||
{
|
||||
void (*func)(void * ) ;
|
||||
int i,iteration ;
|
||||
|
||||
func = (void(*)(void *))((func_args *)args)->argv[0] ;
|
||||
func = (void(*)(void *))((func_args *)args)->argv[0] ;
|
||||
#ifdef HAVE_KEIL_RTX
|
||||
wc_LockMutex((wolfSSL_Mutex *)&command_mutex) ;
|
||||
#endif
|
||||
@@ -499,14 +499,14 @@ static void command_invoke(void *args)
|
||||
#if defined(HAVE_KEIL_RTX)
|
||||
stack_fill(command_stack, COMMAND_STACK_SIZE) ;
|
||||
#endif
|
||||
|
||||
|
||||
func(args) ; /* invoke command */
|
||||
|
||||
|
||||
#if defined(HAVE_KEIL_RTX)
|
||||
stack_check(command_stack, COMMAND_STACK_SIZE) ;
|
||||
#endif
|
||||
}
|
||||
if(iteration > 1)
|
||||
if(iteration > 1)
|
||||
for_iteration = 1 ;
|
||||
#ifdef HAVE_KEIL_RTX
|
||||
wc_UnLockMutex((wolfSSL_Mutex *)&command_mutex) ;
|
||||
@@ -517,12 +517,12 @@ static void command_invoke(void *args)
|
||||
#if (!defined(NO_SIMPLE_SERVER) && !defined(NO_ECHOSERVER)) && \
|
||||
defined(HAVE_KEIL_RTX)
|
||||
/******* Invoke Background Job *******************************/
|
||||
static void bg_job_invoke(void *args)
|
||||
static void bg_job_invoke(void *args)
|
||||
{
|
||||
void (*func)(void * ) ;
|
||||
BackGround = 1 ;
|
||||
BackGround = 1 ;
|
||||
stack_fill(bg_job_stack, BG_JOB_STACK_SIZE) ;
|
||||
func = (void(*)(void *))((func_args *)args)->argv[0] ;
|
||||
func = (void(*)(void *))((func_args *)args)->argv[0] ;
|
||||
func(args) ; /* invoke command */
|
||||
stack_check(bg_job_stack, BG_JOB_STACK_SIZE) ;
|
||||
#ifdef WOLFSSL_KEIL_NET
|
||||
@@ -539,14 +539,14 @@ static char line[LINESIZE] ;
|
||||
|
||||
/********* SHEULL MAIN LOOP ***********************************/
|
||||
void shell_main(void) {
|
||||
int i ;
|
||||
int i ;
|
||||
func_args args ;
|
||||
int bf_flg ;
|
||||
|
||||
i = BackGround ;
|
||||
|
||||
i = BackGround ;
|
||||
/* Dummy for avoiding warning: BackGround is defined but not used. */
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(HAVE_KEIL_RTX)
|
||||
wc_InitMutex(&command_mutex) ;
|
||||
#endif
|
||||
@@ -574,9 +574,9 @@ void shell_main(void) {
|
||||
if(BackGround != 0) {
|
||||
printf("Multiple background servers not supported.\n") ;
|
||||
} else {
|
||||
printf("\"%s\" is running with the background mode.\n",
|
||||
printf("\"%s\" is running with the background mode.\n",
|
||||
commandTable[i].command) ;
|
||||
os_tsk_create_user_ex( (void(*)(void *))&bg_job_invoke,
|
||||
os_tsk_create_user_ex( (void(*)(void *))&bg_job_invoke,
|
||||
6, bg_job_stack, BG_JOB_STACK_SIZE, &args) ;
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* time-STM32F2.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -19,14 +19,14 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
#define DWT ((DWT_Type *) (0xE0001000UL) )
|
||||
#include <stdint.h>
|
||||
#define DWT ((DWT_Type *) (0xE0001000UL) )
|
||||
typedef struct
|
||||
{
|
||||
uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */
|
||||
@@ -35,7 +35,7 @@ typedef struct
|
||||
|
||||
extern uint32_t SystemCoreClock ;
|
||||
|
||||
double current_time(int reset)
|
||||
double current_time(int reset)
|
||||
{
|
||||
if(reset) DWT->CYCCNT = 0 ;
|
||||
return ((double)DWT->CYCCNT/SystemCoreClock) ;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* time-dummy.c.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -19,16 +19,16 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "time.h"
|
||||
|
||||
struct tm *wolfssl_MDK_gmtime(const time_t *c)
|
||||
{
|
||||
static struct tm date ;
|
||||
struct tm *wolfssl_MDK_gmtime(const time_t *c)
|
||||
{
|
||||
static struct tm date ;
|
||||
return(&date) ;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* wolfssl_KEIL_RL.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -35,8 +35,8 @@
|
||||
|
||||
#if defined(WOLFSSL_MDK5)
|
||||
#include "cmsis_os.h"
|
||||
#include "rl_fs.h"
|
||||
#include "rl_net.h"
|
||||
#include "rl_fs.h"
|
||||
#include "rl_net.h"
|
||||
#else
|
||||
#include "rtl.h"
|
||||
#endif
|
||||
@@ -58,7 +58,7 @@
|
||||
/** TCPnet BSD socket does not have following functions. **/
|
||||
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
char *inet_ntoa(struct in_addr in)
|
||||
char *inet_ntoa(struct in_addr in)
|
||||
{
|
||||
#define NAMESIZE 16
|
||||
static char name[NAMESIZE] ;
|
||||
@@ -76,11 +76,11 @@ unsigned long inet_addr(const char *cp)
|
||||
|
||||
|
||||
/*** tcp_connect is actually associated with following syassl_tcp_connect. ***/
|
||||
int wolfssl_connect(int sd, const struct sockaddr* sa, int sz)
|
||||
int wolfssl_connect(int sd, const struct sockaddr* sa, int sz)
|
||||
{
|
||||
int ret = 0 ;
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
|
||||
SOCKADDR_IN addr ;
|
||||
|
||||
addr = *(SOCKADDR_IN *)sa ;
|
||||
@@ -91,19 +91,19 @@ int wolfssl_connect(int sd, const struct sockaddr* sa, int sz)
|
||||
os_dly_wait(50);
|
||||
} while(ret == SCK_EWOULDBLOCK) ;
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
{
|
||||
{
|
||||
char msg[50] ;
|
||||
sprintf(msg, "BSD Connect return code: %d\n", ret) ;
|
||||
WOLFSSL_MSG(msg) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* WOLFSSL_KEIL_TCP_NET */
|
||||
return(ret ) ;
|
||||
}
|
||||
|
||||
|
||||
int wolfssl_accept(int sd, struct sockaddr *addr, int *addrlen)
|
||||
int wolfssl_accept(int sd, struct sockaddr *addr, int *addrlen)
|
||||
{
|
||||
int ret = 0 ;
|
||||
|
||||
@@ -113,24 +113,24 @@ int wolfssl_accept(int sd, struct sockaddr *addr, int *addrlen)
|
||||
ret = accept(sd, addr, addrlen) ;
|
||||
if(ret != SCK_EWOULDBLOCK) break ;
|
||||
os_dly_wait(1);
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
{
|
||||
char msg[50] ;
|
||||
sprintf(msg, "BSD Accept return code: %d\n", ret) ;
|
||||
WOLFSSL_MSG(msg) ;
|
||||
WOLFSSL_MSG(msg) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* WOLFSSL_KEIL_TCP_NET */
|
||||
return(ret ) ;
|
||||
|
||||
}
|
||||
|
||||
int wolfssl_recv(int sd, void *buf, size_t len, int flags)
|
||||
|
||||
int wolfssl_recv(int sd, void *buf, size_t len, int flags)
|
||||
{
|
||||
int ret = 0;
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
while(1) {
|
||||
#undef recv /* Go to KEIL TCPnet recv */
|
||||
ret = recv(sd, buf, len, flags) ;
|
||||
@@ -138,10 +138,10 @@ int wolfssl_recv(int sd, void *buf, size_t len, int flags)
|
||||
os_dly_wait(1);
|
||||
}
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
{
|
||||
{
|
||||
char msg[50] ;
|
||||
sprintf(msg, "BSD Recv return code: %d\n", ret) ;
|
||||
WOLFSSL_MSG(msg) ;
|
||||
WOLFSSL_MSG(msg) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -149,22 +149,22 @@ int wolfssl_recv(int sd, void *buf, size_t len, int flags)
|
||||
return(ret ) ;
|
||||
}
|
||||
|
||||
int wolfssl_send(int sd, const void *buf, size_t len, int flags)
|
||||
int wolfssl_send(int sd, const void *buf, size_t len, int flags)
|
||||
{
|
||||
int ret = 0 ;
|
||||
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
while(1) {
|
||||
#undef send /* Go to KEIL TCPnet send */
|
||||
ret = send(sd, buf, len, flags) ;
|
||||
if(ret != SCK_EWOULDBLOCK) break ;
|
||||
os_dly_wait(1);
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
{
|
||||
char msg[50] ;
|
||||
sprintf(msg, "BSD Send return code: %d\n", ret) ;
|
||||
WOLFSSL_MSG(msg) ;
|
||||
WOLFSSL_MSG(msg) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -175,49 +175,49 @@ int wolfssl_send(int sd, const void *buf, size_t len, int flags)
|
||||
|
||||
#endif /* WOLFSSL_KEIL_TCP_NET */
|
||||
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
void wolfssl_sleep(int t)
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
void wolfssl_sleep(int t)
|
||||
{
|
||||
#if defined(HAVE_KEIL_RTX)
|
||||
os_dly_wait(t/1000+1) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
int wolfssl_tcp_select(int sd, int timeout)
|
||||
int wolfssl_tcp_select(int sd, int timeout)
|
||||
{
|
||||
|
||||
|
||||
return 0 ;
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
FILE * wolfSSL_fopen(const char *name, const char *openmode)
|
||||
FILE * wolfSSL_fopen(const char *name, const char *openmode)
|
||||
{
|
||||
int i ; FILE * ret ;
|
||||
#define PATHSIZE 100
|
||||
char path[PATHSIZE] ; char *p ;
|
||||
|
||||
|
||||
if(strlen(name) > PATHSIZE)return(NULL) ;
|
||||
|
||||
|
||||
for(i = 0; i<= strlen(name); i++) {
|
||||
if(name[i] == '/')path[i] = '\\' ;
|
||||
else path[i] = name[i] ;
|
||||
}
|
||||
}
|
||||
if(path[0] == '.' && path[1] == '\\') p = path + 2 ;
|
||||
else p = path ;
|
||||
|
||||
ret = fopen (p, openmode) ;
|
||||
|
||||
|
||||
return(ret) ;
|
||||
}
|
||||
|
||||
#define getkey getchar
|
||||
#define sendchar putchar
|
||||
|
||||
char * wolfssl_fgets ( char * str, int num, FILE * f )
|
||||
char * wolfssl_fgets ( char * str, int num, FILE * f )
|
||||
{
|
||||
int i ;
|
||||
|
||||
|
||||
for(i = 0 ; i< num ; i++) {
|
||||
while((str[i] = getkey()) == 0) {
|
||||
#if defined (HAVE_KEIL_RTX) && !defined(WOLFSSL_CMSIS_RTOS)
|
||||
@@ -228,15 +228,15 @@ char * wolfssl_fgets ( char * str, int num, FILE * f )
|
||||
}
|
||||
if(str[i] == '\n' || str[i] == '\012' || str[i] == '\015') {
|
||||
sendchar('\n') ;
|
||||
str[i++] = '\n' ;
|
||||
str[i] = '\0' ;
|
||||
str[i++] = '\n' ;
|
||||
str[i] = '\0' ;
|
||||
break ;
|
||||
} else if(str[i] == '\010') { /* BS */
|
||||
if(i) { /* erace one char */
|
||||
sendchar('\010') ; sendchar(' ') ; sendchar('\010') ;
|
||||
sendchar('\010') ; sendchar(' ') ; sendchar('\010') ;
|
||||
i = (i>0 ? (i-2) : -1 ) ;
|
||||
continue ;
|
||||
}
|
||||
}
|
||||
} else if(str[i] == '\033' || str[i] == '\004' ) { /* ESC or ^D */
|
||||
str[i] = '\0' ;
|
||||
return(0) ;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* wolfssl_KEIL_RL.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -31,7 +31,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
/* Go to STDIN */
|
||||
#define fgets(buff, sz, fd) wolfssl_fgets(buff, sz, fd)
|
||||
#define fgets(buff, sz, fd) wolfssl_fgets(buff, sz, fd)
|
||||
extern char * wolfssl_fgets ( char * str, int num, FILE * f ) ;
|
||||
|
||||
#define SOCKET_T int
|
||||
@@ -53,19 +53,19 @@ struct timeval {
|
||||
long tv_usec; /* microseconds */
|
||||
};
|
||||
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
|
||||
#if defined(WOLFSSL_MDK5)
|
||||
#define SCK_EWOULDBLOCK BSD_ERROR_WOULDBLOCK
|
||||
#define SCK_ETIMEOUT BSD_ERROR_TIMEOUT
|
||||
#include "rl_net.h"
|
||||
#include "rl_net.h"
|
||||
#endif
|
||||
|
||||
|
||||
typedef int socklen_t ;
|
||||
|
||||
/* for avoiding conflict with KEIL-TCPnet BSD socket */
|
||||
/* Bodies are in wolfssl_KEIL_RL.c */
|
||||
#define connect(a,b,c) wolfssl_connect(a, (struct sockaddr* )(b), c)
|
||||
#define connect(a,b,c) wolfssl_connect(a, (struct sockaddr* )(b), c)
|
||||
#define accept wolfssl_accept
|
||||
#define recv wolfssl_recv
|
||||
#define send wolfssl_send
|
||||
@@ -73,7 +73,7 @@ typedef int socklen_t ;
|
||||
|
||||
/* for avoiding conflicting with KEIL-TCPnet TCP socket */
|
||||
/* Bodies are in test.h */
|
||||
#define tcp_connect wolfssl_tcp_connect
|
||||
#define tcp_connect wolfssl_tcp_connect
|
||||
#define tcp_socket wolfssl_tcp_soket
|
||||
#define tcp_listen wolfssl_tcp_listen
|
||||
#define tcp_select wolfssl_tcp_select
|
||||
@@ -89,7 +89,7 @@ extern int wolfssl_tcp_select(int sd, int timeout) ;
|
||||
/* TCPnet BSD socket does not have following functions. */
|
||||
extern char *inet_ntoa(struct in_addr in);
|
||||
extern unsigned long inet_addr(const char *cp);
|
||||
extern int setsockopt(int sockfd, int level, int optname,
|
||||
extern int setsockopt(int sockfd, int level, int optname,
|
||||
const void *optval, socklen_t optlen);
|
||||
extern int select(int nfds, fd_set *readfds, fd_set *writefds,
|
||||
fd_set *exceptfds, const struct timeval *timeout);
|
||||
|
||||
@@ -1223,8 +1223,8 @@
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\src\io.c</PathWithFileName>
|
||||
<FilenameWithoutPath>io.c</FilenameWithoutPath>
|
||||
<PathWithFileName>..\..\..\src\wolfio.c</PathWithFileName>
|
||||
<FilenameWithoutPath>wolfio.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
|
||||
@@ -657,9 +657,9 @@
|
||||
<FilePath>..\..\..\src\internal.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>io.c</FileName>
|
||||
<FileName>wolfio.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\io.c</FilePath>
|
||||
<FilePath>..\..\..\src\wolfio.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>keys.c</FileName>
|
||||
@@ -1366,9 +1366,9 @@
|
||||
<FilePath>..\..\..\src\internal.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>io.c</FileName>
|
||||
<FileName>wolfio.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\io.c</FilePath>
|
||||
<FilePath>..\..\..\src\wolfio.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>keys.c</FileName>
|
||||
@@ -2075,9 +2075,9 @@
|
||||
<FilePath>..\..\..\src\internal.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>io.c</FileName>
|
||||
<FileName>wolfio.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\io.c</FilePath>
|
||||
<FilePath>..\..\..\src\wolfio.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>keys.c</FileName>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* main.c
|
||||
/* time-STM32F2xx.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -19,16 +19,16 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "time.h"
|
||||
|
||||
#define PERIPH_BASE ((uint32_t)0x40000000)
|
||||
#define PERIPH_BASE ((uint32_t)0x40000000)
|
||||
/*-----------------------------------------------------------------------------
|
||||
* initialize RTC
|
||||
* initialize RTC
|
||||
*----------------------------------------------------------------------------*/
|
||||
#include "stm32f2xx.h"
|
||||
|
||||
@@ -46,15 +46,15 @@
|
||||
#define CR_OFFSET (PWR_OFFSET + 0x00)
|
||||
#define DBP_BitNumber 0x08
|
||||
#define CR_DBP_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (DBP_BitNumber * 4))
|
||||
#define RTC_INIT_MASK ((uint32_t)0xFFFFFFFF)
|
||||
#define RTC_INIT_MASK ((uint32_t)0xFFFFFFFF)
|
||||
#define INITMODE_TIMEOUT ((uint32_t) 0x00010000)
|
||||
|
||||
static void init_RTC()
|
||||
static void init_RTC()
|
||||
{
|
||||
__IO uint32_t initcounter = 0x00 ;
|
||||
uint32_t initstatus = 0x00; /* Enable the PWR clock : RCC_APB1Periph_PWR */
|
||||
uint32_t initstatus = 0x00; /* Enable the PWR clock : RCC_APB1Periph_PWR */
|
||||
((uint32_t *)RCC)[0x10] |= ((uint32_t)0x10000000) ;
|
||||
|
||||
|
||||
/* Allow access to RTC */
|
||||
*(__IO uint32_t *) CR_DBP_BB = ENABLE ;
|
||||
/* RCC_LSEConfig(RCC_LSE_ON) */
|
||||
@@ -62,7 +62,7 @@ static void init_RTC()
|
||||
/* Reset LSEBYP bit */
|
||||
*(__IO uint8_t *) (RCC_BASE + 0x70) = ((uint8_t)0x00);
|
||||
*(__IO uint8_t *) (RCC_BASE + 0x70) = ((uint8_t)0x01);
|
||||
/* Wait till LSE is ready */
|
||||
/* Wait till LSE is ready */
|
||||
while((RCC->BDCR << 0x2) == 0x0) { }
|
||||
/* Select the RTC clock source: RCC_RTCCLKSource_LSE */
|
||||
((RCC_TypeDef *)RCC)->BDCR |= (uint32_t)0x00000100;
|
||||
@@ -70,13 +70,13 @@ static void init_RTC()
|
||||
/* Enable the RTC Clock */
|
||||
*(__IO uint32_t *) (PERIPH_BB_BASE + (((RCC_BASE - PERIPH_BASE)+ 0x70) * 32) + (0x0F* 4)) = (uint32_t)ENABLE;
|
||||
|
||||
*(__IO uint32_t *) CR_DBP_BB = (uint32_t)ENABLE;
|
||||
*(__IO uint32_t *) CR_DBP_BB = (uint32_t)ENABLE;
|
||||
RTC->ISR = (uint32_t) RTC_INIT_MASK;
|
||||
do {
|
||||
initstatus = RTC->ISR & RTC_ISR_INITF;
|
||||
initcounter++;
|
||||
initcounter++;
|
||||
} while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00));
|
||||
|
||||
|
||||
/* Disable the write protection for RTC registers */
|
||||
RTC->WPR = 0xCA;
|
||||
RTC->WPR = 0x53;
|
||||
@@ -86,14 +86,14 @@ static void init_RTC()
|
||||
RTC->CR |= ((uint32_t)0x00000000) ; /* RTC_HourFormat_24 */
|
||||
|
||||
/* Configure the RTC PRER */
|
||||
RTC->PRER = 0x7f ;
|
||||
RTC->PRER = 0x7f ;
|
||||
RTC->PRER |= (uint32_t)(0xff << 16);
|
||||
|
||||
/* Exit Initialization mode */
|
||||
RTC->ISR &= (uint32_t)~RTC_ISR_INIT;
|
||||
RTC->ISR &= (uint32_t)~RTC_ISR_INIT;
|
||||
|
||||
/* Enable the write protection for RTC registers */
|
||||
RTC->WPR = 0xFF;
|
||||
RTC->WPR = 0xFF;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
@@ -108,16 +108,16 @@ static void init_TIM()
|
||||
((uint32_t *)RCC)[0x10] |= RCC_APB1Periph_TIM2 ;
|
||||
|
||||
tmpcr1 = TIM2->CR1 ;
|
||||
tmpcr1 &= (uint16_t) (~(((uint16_t)0x0010) | ((uint16_t)0x0060) ));
|
||||
tmpcr1 &= (uint16_t) (~(((uint16_t)0x0010) | ((uint16_t)0x0060) ));
|
||||
/* CR1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS) */
|
||||
tmpcr1 |= (uint16_t)0x0000 ; /* CR1 |= TIM_CounterMode_Up */
|
||||
TIM2->CR1= tmpcr1 ;
|
||||
|
||||
TIM2->ARR = 0xffffffff ; /* ARR= TIM_Period */
|
||||
TIM2->PSC = 60 ; /* PSC = TIM_Prescaler */
|
||||
TIM2->EGR = ((uint16_t)0x0001) ; /* EGR = TIM_PSCReloadMode_Immediate */
|
||||
TIM2->EGR = ((uint16_t)0x0001) ; /* EGR = TIM_PSCReloadMode_Immediate */
|
||||
|
||||
*(uint16_t *)(PERIPH_BASE+0x0) |=((uint16_t)0x0001) ;
|
||||
*(uint16_t *)(PERIPH_BASE+0x0) |=((uint16_t)0x0001) ;
|
||||
/* TIM_Cmd(TIM2, ENABLE) ; */
|
||||
}
|
||||
|
||||
@@ -129,10 +129,10 @@ void init_time(void) {
|
||||
static void GetTime(uint8_t *h, uint8_t *m, uint8_t *s)
|
||||
{
|
||||
uint32_t tmpreg = 0;
|
||||
tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK);
|
||||
tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK);
|
||||
*h = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_TR_HT | RTC_TR_HU)) >> 16));
|
||||
*m = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8));
|
||||
*s = (uint8_t)Bcd2ToByte((tmpreg & (RTC_TR_ST | RTC_TR_SU)));
|
||||
*s = (uint8_t)Bcd2ToByte((tmpreg & (RTC_TR_ST | RTC_TR_SU)));
|
||||
}
|
||||
|
||||
static uint32_t ByteToBcd2(uint8_t Value)
|
||||
@@ -151,29 +151,29 @@ static void SetTime(uint8_t h, uint8_t m, uint8_t s)
|
||||
uint32_t synchrostatus = 0x00;
|
||||
__IO uint32_t initcounter = 0;
|
||||
uint32_t initstatus = 0x00;
|
||||
uint32_t tmpreg ;
|
||||
uint32_t tmpreg ;
|
||||
|
||||
tmpreg = ((ByteToBcd2(h) << 16) | (ByteToBcd2(m) << 8) | ByteToBcd2(s)) ;
|
||||
/* Disable the write protection for RTC registers */
|
||||
RTC->WPR = 0xCA;
|
||||
RTC->WPR = 0x53;
|
||||
RTC->ISR &= (uint32_t)~RTC_ISR_INIT;
|
||||
RTC->ISR &= (uint32_t)~RTC_ISR_INIT;
|
||||
|
||||
RTC->ISR = (uint32_t)RTC_INIT_MASK;
|
||||
|
||||
/* Wait till RTC is in INIT state and if Time out is reached exit */
|
||||
do {
|
||||
initstatus = RTC->ISR & RTC_ISR_INITF;
|
||||
initcounter++;
|
||||
initcounter++;
|
||||
} while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00));
|
||||
|
||||
|
||||
RTC->TR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK);
|
||||
|
||||
|
||||
RTC->ISR &= (uint32_t)RTC_RSF_MASK;
|
||||
/* Wait the registers to be synchronised */
|
||||
do {
|
||||
synchrostatus = RTC->ISR & RTC_ISR_RSF;
|
||||
synchrocounter++;
|
||||
synchrocounter++;
|
||||
} while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00));
|
||||
|
||||
RTC->WPR = 0xFF;
|
||||
@@ -182,7 +182,7 @@ static void SetTime(uint8_t h, uint8_t m, uint8_t s)
|
||||
static void GetDate(uint8_t *y, uint8_t *m, uint8_t *d)
|
||||
{
|
||||
uint32_t tmpreg = 0;
|
||||
tmpreg = (uint32_t)(RTC->DR & RTC_TR_RESERVED_MASK);
|
||||
tmpreg = (uint32_t)(RTC->DR & RTC_TR_RESERVED_MASK);
|
||||
*y = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_DR_YT|RTC_DR_YU)) >>16));
|
||||
*m = (uint8_t)Bcd2ToByte((uint8_t)((tmpreg & (RTC_DR_MT|RTC_DR_MU)) >> 8));
|
||||
*d = (uint8_t)Bcd2ToByte((uint8_t)(tmpreg & (RTC_DR_DT |RTC_DR_DU)));
|
||||
@@ -194,20 +194,20 @@ static void SetDate(uint8_t y, uint8_t m, uint8_t d)
|
||||
uint32_t synchrostatus = 0x00;
|
||||
__IO uint32_t initcounter = 0;
|
||||
uint32_t initstatus = 0x00;
|
||||
uint32_t tmpreg = 0 ;
|
||||
|
||||
uint32_t tmpreg = 0 ;
|
||||
|
||||
tmpreg = ((ByteToBcd2(y) << 16) | (ByteToBcd2(m) << 8) | ByteToBcd2(d)) ;
|
||||
/* Disable the write protection for RTC registers */
|
||||
RTC->WPR = 0xCA;
|
||||
RTC->WPR = 0x53;
|
||||
RTC->ISR &= (uint32_t)~RTC_ISR_INIT;
|
||||
RTC->ISR &= (uint32_t)~RTC_ISR_INIT;
|
||||
|
||||
RTC->ISR = (uint32_t)RTC_INIT_MASK;
|
||||
|
||||
/* Wait till RTC is in INIT state and if Time out is reached exit */
|
||||
do {
|
||||
initstatus = RTC->ISR & RTC_ISR_INITF;
|
||||
initcounter++;
|
||||
initcounter++;
|
||||
} while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00));
|
||||
|
||||
RTC->DR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK);
|
||||
@@ -216,7 +216,7 @@ static void SetDate(uint8_t y, uint8_t m, uint8_t d)
|
||||
/* Wait the registers to be synchronised */
|
||||
do {
|
||||
synchrostatus = RTC->ISR & RTC_ISR_RSF;
|
||||
synchrocounter++;
|
||||
synchrocounter++;
|
||||
} while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00));
|
||||
|
||||
RTC->WPR = 0xFF;
|
||||
@@ -226,11 +226,11 @@ static void SetDate(uint8_t y, uint8_t m, uint8_t d)
|
||||
#include <stdio.h>
|
||||
void CYASSL_MSG(const char *msg) ;
|
||||
|
||||
struct tm *Cyassl_MDK_gmtime(const time_t *c)
|
||||
{
|
||||
struct tm *Cyassl_MDK_gmtime(const time_t *c)
|
||||
{
|
||||
uint8_t h, m, s ;
|
||||
uint8_t y, mo, d ;
|
||||
static struct tm date ;
|
||||
static struct tm date ;
|
||||
|
||||
GetTime(&h, &m, &s) ;
|
||||
GetDate(&y, &mo, &d) ;
|
||||
@@ -242,20 +242,20 @@ struct tm *Cyassl_MDK_gmtime(const time_t *c)
|
||||
date.tm_min = m ;
|
||||
date.tm_sec = s ;
|
||||
|
||||
#if defined(DEBUG_CYASSL)
|
||||
#if defined(DEBUG_CYASSL)
|
||||
{
|
||||
char msg[100] ;
|
||||
sprintf(msg,
|
||||
sprintf(msg,
|
||||
"Debug::Cyassl_KEIL_gmtime(DATE=/%2d/%02d/%04d TIME=%02d:%02d:%02d)\n",
|
||||
d, mo, y+2000, h, m, s) ;
|
||||
CYASSL_MSG(msg) ;
|
||||
d, mo, y+2000, h, m, s) ;
|
||||
CYASSL_MSG(msg) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
return(&date) ;
|
||||
}
|
||||
|
||||
double current_time()
|
||||
double current_time()
|
||||
{
|
||||
return ((double)TIM2->CNT/1000000.0) ;
|
||||
}
|
||||
@@ -266,35 +266,35 @@ typedef struct func_args {
|
||||
int return_code;
|
||||
} func_args;
|
||||
|
||||
void time_main(void *args)
|
||||
void time_main(void *args)
|
||||
{
|
||||
char * datetime ;
|
||||
uint8_t h, m, s ;
|
||||
uint8_t y, mo, d ;
|
||||
|
||||
|
||||
if( args == NULL || ((func_args *)args)->argc == 1) {
|
||||
GetTime(&h, &m, &s) ;
|
||||
GetDate(&y, &mo, &d) ;
|
||||
printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n",
|
||||
mo, d, y+2000, h, m, s) ;
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-' &&
|
||||
printf("Date: %d/%d/%d, Time: %02d:%02d:%02d\n",
|
||||
mo, d, y+2000, h, m, s) ;
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-' &&
|
||||
((func_args *)args)->argv[1][1] == 'd' ) {
|
||||
datetime = ((func_args *)args)->argv[2];
|
||||
sscanf(datetime, "%d/%d/%d", (int *)&mo, (int *)&d, (int *) &y) ;
|
||||
SetDate(y-2000, mo, d) ;
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-' &&
|
||||
SetDate(y-2000, mo, d) ;
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-' &&
|
||||
((func_args *)args)->argv[1][1] == 't' ) {
|
||||
datetime = ((func_args *)args)->argv[2];
|
||||
sscanf(datetime, "%d:%d:%d",
|
||||
sscanf(datetime, "%d:%d:%d",
|
||||
(int *)&h, (int *)&m, (int *)&s) ;
|
||||
SetTime(h, m, s) ;
|
||||
} else printf("Invalid argument\n") ;
|
||||
} else printf("Invalid argument\n") ;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
time()
|
||||
time()
|
||||
********************************************************************/
|
||||
time_t time(time_t * t) { return 0 ; }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* config-Crypt.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -72,10 +72,10 @@
|
||||
#define WOLFSSL_SHA384
|
||||
#endif
|
||||
// </e>
|
||||
// <e>SHA-512
|
||||
// <e>SHA-512
|
||||
#define MDK_CONF_SHA512 1
|
||||
#if MDK_CONF_SHA512 == 1
|
||||
#define WOLFSSL_SHA512
|
||||
#define WOLFSSL_SHA512
|
||||
#endif
|
||||
// </e>
|
||||
// <e>RIPEMD
|
||||
@@ -180,14 +180,14 @@
|
||||
#endif
|
||||
// </e>
|
||||
// <e>DSA
|
||||
#define MDK_CONF_DSA 1
|
||||
#define MDK_CONF_DSA 1
|
||||
#if MDK_CONF_DSA == 0
|
||||
#define NO_DSA
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
// <e>SRP
|
||||
#define MDK_CONF_SRP 1
|
||||
#define MDK_CONF_SRP 1
|
||||
#if MDK_CONF_SRP == 1
|
||||
#define HAVE_SRP
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* config.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* wolfssl_KEIL_ARM.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
/* Go to STDIN */
|
||||
#define fgets(buff, sz, fd) wolfssl_fgets(buff, sz, fd)
|
||||
#define fgets(buff, sz, fd) wolfssl_fgets(buff, sz, fd)
|
||||
extern char * wolfssl_fgets ( char * str, int num, FILE * f ) ;
|
||||
|
||||
#define SOCKET_T int
|
||||
@@ -51,12 +51,12 @@ struct timeval {
|
||||
};
|
||||
|
||||
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
|
||||
#define SCK_EWOULDBLOCK BSD_ERROR_WOULDBLOCK
|
||||
#define SCK_ETIMEOUT BSD_ERROR_TIMEOUT
|
||||
#include "rl_net.h"
|
||||
|
||||
#include "rl_net.h"
|
||||
|
||||
typedef int socklen_t ;
|
||||
|
||||
/* for avoiding conflict with KEIL-TCPnet BSD socket */
|
||||
@@ -69,7 +69,7 @@ typedef int socklen_t ;
|
||||
|
||||
/* for avoiding conflicting with KEIL-TCPnet TCP socket */
|
||||
/* Bodies are in test.h */
|
||||
#define tcp_connect wolfssl_tcp_connect
|
||||
#define tcp_connect wolfssl_tcp_connect
|
||||
#define tcp_socket wolfssl_tcp_soket
|
||||
#define tcp_listen wolfssl_tcp_listen
|
||||
#define tcp_select(a,b) (0)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* main.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -18,7 +18,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@@ -64,10 +64,10 @@ static void init_filesystem (void) {
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* mian entry
|
||||
* mian entry
|
||||
*----------------------------------------------------------------------------*/
|
||||
void benchmark_test(void *arg) ;
|
||||
int main()
|
||||
int main()
|
||||
{
|
||||
void * arg = NULL ;
|
||||
|
||||
@@ -77,11 +77,11 @@ int main()
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
init_filesystem ();
|
||||
#endif
|
||||
osDelay(300) ;
|
||||
osDelay(300) ;
|
||||
|
||||
printf("=== Start: Crypt Benchmark ===\n") ;
|
||||
benchmark_test(arg) ;
|
||||
printf("=== End: Crypt Benchmark ===\n") ;
|
||||
printf("=== End: Crypt Benchmark ===\n") ;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* time-STM32F2.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -19,14 +19,14 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
#define DWT ((DWT_Type *) (0xE0001000UL) )
|
||||
#include <stdint.h>
|
||||
#define DWT ((DWT_Type *) (0xE0001000UL) )
|
||||
typedef struct
|
||||
{
|
||||
uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */
|
||||
@@ -35,7 +35,7 @@ typedef struct
|
||||
|
||||
extern uint32_t SystemCoreClock ;
|
||||
|
||||
double current_time(int reset)
|
||||
double current_time(int reset)
|
||||
{
|
||||
if(reset) DWT->CYCCNT = 0 ;
|
||||
return ((double)DWT->CYCCNT/SystemCoreClock) ;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* main.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -18,7 +18,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@@ -63,10 +63,10 @@ static void init_filesystem (void) {
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* mian entry
|
||||
* mian entry
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
int main()
|
||||
int main()
|
||||
{
|
||||
void * arg = NULL ;
|
||||
|
||||
@@ -76,10 +76,10 @@ int main()
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
init_filesystem ();
|
||||
#endif
|
||||
osDelay(1000) ;
|
||||
osDelay(1000) ;
|
||||
|
||||
printf("=== Start: Crypt test ===\n") ;
|
||||
wolfcrypt_test(arg) ;
|
||||
printf("=== End: Crypt test ===\n") ;
|
||||
|
||||
printf("=== End: Crypt test ===\n") ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* config-RTX-TCP-FS.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* main.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -18,7 +18,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "stm32f2xx_hal.h"
|
||||
#include "cmsis_os.h"
|
||||
#include "rl_net.h"
|
||||
#include "rl_net.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
@@ -72,13 +72,13 @@ typedef struct func_args {
|
||||
extern void echoclient_test(func_args * args) ;
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* mian entry
|
||||
* mian entry
|
||||
*----------------------------------------------------------------------------*/
|
||||
int myoptind = 0;
|
||||
char* myoptarg = NULL;
|
||||
|
||||
int main()
|
||||
{
|
||||
int main()
|
||||
{
|
||||
func_args args ;
|
||||
args.argc = 1 ;
|
||||
|
||||
@@ -87,7 +87,7 @@ int main()
|
||||
init_filesystem ();
|
||||
#endif
|
||||
netInitialize() ;
|
||||
osDelay(300) ;
|
||||
osDelay(300) ;
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
printf("Turning ON Debug message\n") ;
|
||||
wolfSSL_Debugging_ON() ;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* main.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -18,7 +18,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "stm32f2xx_hal.h"
|
||||
#include "cmsis_os.h"
|
||||
#include "rl_net.h"
|
||||
#include "rl_net.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
@@ -66,7 +66,7 @@ static void init_filesystem (void) {
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* mian entry
|
||||
* mian entry
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
typedef struct func_args {
|
||||
@@ -76,7 +76,7 @@ typedef struct func_args {
|
||||
|
||||
extern void echoserver_test(func_args * args) ;
|
||||
|
||||
int main()
|
||||
int main()
|
||||
{
|
||||
func_args args ;
|
||||
args.argc = 1 ;
|
||||
@@ -86,7 +86,7 @@ int main()
|
||||
init_filesystem ();
|
||||
#endif
|
||||
netInitialize() ;
|
||||
osDelay(300) ;
|
||||
osDelay(300) ;
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
printf("Turning ON Debug message\n") ;
|
||||
wolfSSL_Debugging_ON() ;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* config-RTX-TCP-FS.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* main.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -18,7 +18,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "stm32f2xx_hal.h"
|
||||
#include "cmsis_os.h"
|
||||
#include "rl_net.h"
|
||||
#include "rl_net.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
@@ -75,31 +75,31 @@ extern void client_test(func_args * args) ;
|
||||
int myoptind = 0;
|
||||
char* myoptarg = NULL;
|
||||
|
||||
int main()
|
||||
int main()
|
||||
{
|
||||
static char *argv[] =
|
||||
{ "client", "-h", WOLFSSL_CALLEE_IP, "-p", WOLFSSL_CALLEE_PORT,
|
||||
static char *argv[] =
|
||||
{ "client", "-h", WOLFSSL_CALLEE_IP, "-p", WOLFSSL_CALLEE_PORT,
|
||||
"-v", WOLFSSL_SSL_VER, WOLFSSL_HTTP_GET } ;
|
||||
static func_args args =
|
||||
{ 7 + WOLFSSL_HTTP_GET_COUNT, argv } ;
|
||||
|
||||
static func_args args =
|
||||
{ 7 + WOLFSSL_HTTP_GET_COUNT, argv } ;
|
||||
|
||||
SystemClock_Config ();
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
init_filesystem ();
|
||||
#endif
|
||||
netInitialize() ;
|
||||
osDelay(300) ;
|
||||
osDelay(300) ;
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
printf("Turning ON Debug message\n") ;
|
||||
wolfSSL_Debugging_ON() ;
|
||||
#endif
|
||||
|
||||
|
||||
if(args.argc == 7)
|
||||
printf("Simple SSL/TLS, ") ;
|
||||
else
|
||||
printf("HTTP GET, ") ;
|
||||
|
||||
printf("Callee IP: %s, Port: %s, Version:%s\n", argv[2], argv[4], argv[6]) ;
|
||||
printf("Callee IP: %s, Port: %s, Version:%s\n", argv[2], argv[4], argv[6]) ;
|
||||
|
||||
while(1) {
|
||||
client_test(&args) ;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* time-STM32F2.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -19,14 +19,14 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
#define DWT ((DWT_Type *) (0xE0001000UL) )
|
||||
#include <stdint.h>
|
||||
#define DWT ((DWT_Type *) (0xE0001000UL) )
|
||||
typedef struct
|
||||
{
|
||||
uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */
|
||||
@@ -35,7 +35,7 @@ typedef struct
|
||||
|
||||
extern uint32_t SystemCoreClock ;
|
||||
|
||||
double current_time(int reset)
|
||||
double current_time(int reset)
|
||||
{
|
||||
if(reset) DWT->CYCCNT = 0 ;
|
||||
return ((double)DWT->CYCCNT/SystemCoreClock) ;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SimpleServer.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* main.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -18,7 +18,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "stm32f2xx_hal.h"
|
||||
#include "cmsis_os.h"
|
||||
#include "rl_net.h"
|
||||
#include "rl_net.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
@@ -74,31 +74,31 @@ extern void server_test(func_args * args) ;
|
||||
#include "config-SimpleServer.h"
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* mian entry
|
||||
* mian entry
|
||||
*----------------------------------------------------------------------------*/
|
||||
int myoptind = 0;
|
||||
char* myoptarg = NULL;
|
||||
|
||||
int main()
|
||||
int main()
|
||||
{
|
||||
static char *argv[] = { "server", "-p", WOLFSSL_LISTEN_PORT, "-d"} ;
|
||||
static func_args args = { 4, argv } ;
|
||||
|
||||
static func_args args = { 4, argv } ;
|
||||
|
||||
SystemClock_Config ();
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
init_filesystem ();
|
||||
#endif
|
||||
netInitialize() ;
|
||||
osDelay(300) ;
|
||||
osDelay(300) ;
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
printf("Turning ON Debug message\n") ;
|
||||
wolfSSL_Debugging_ON() ;
|
||||
#endif
|
||||
|
||||
|
||||
printf("Simple Server: Started\n") ;
|
||||
while(1) {
|
||||
server_test(&args) ;
|
||||
printf("Enter any key to iterate.\n") ;
|
||||
getchar() ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* main.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -18,7 +18,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "wolfcrypt/src/misc.c"
|
||||
#include "stm32f2xx_hal.h"
|
||||
#include "cmsis_os.h"
|
||||
#include "rl_net.h"
|
||||
#include "rl_net.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
@@ -79,12 +79,12 @@ typedef struct func_args {
|
||||
extern void shell_main(func_args * args) ;
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* mian entry
|
||||
* mian entry
|
||||
*----------------------------------------------------------------------------*/
|
||||
int myoptind = 0;
|
||||
char* myoptarg = NULL;
|
||||
|
||||
int main()
|
||||
int main()
|
||||
{
|
||||
void *arg = NULL ;
|
||||
|
||||
@@ -92,15 +92,15 @@ int main()
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
init_filesystem ();
|
||||
#endif
|
||||
|
||||
|
||||
netInitialize() ;
|
||||
osDelay(300) ;
|
||||
|
||||
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
printf("Turning ON Debug message\n") ;
|
||||
wolfSSL_Debugging_ON() ;
|
||||
#endif
|
||||
|
||||
shell_main(arg) ;
|
||||
shell_main(arg) ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*shell.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -19,9 +19,9 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*** tiny Shell for wolfSSL apps ***/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <stdlib.h>
|
||||
#if defined(WOLFSSL_MDK5) || defined(WOLFSSL_KEIL_TCP_NET)
|
||||
#include "cmsis_os.h"
|
||||
#include "rl_fs.h"
|
||||
#include "rl_fs.h"
|
||||
#else
|
||||
#include <rtl.h>
|
||||
#endif
|
||||
@@ -192,7 +192,7 @@ extern void dh_test(void *arg) ;
|
||||
#ifndef NO_DSA
|
||||
extern void dsa_test(void *arg) ;
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef NO_PWDBASED
|
||||
extern void pwdbased_test(void *arg) ;
|
||||
#endif
|
||||
@@ -283,8 +283,8 @@ static struct {
|
||||
#ifndef NO_DES3
|
||||
"des", des_test,
|
||||
"des3", des3_test,
|
||||
#endif
|
||||
#ifndef NO_AES
|
||||
#endif
|
||||
#ifndef NO_AES
|
||||
"aes", aes_test,
|
||||
#ifdef HAVE_AESGCM
|
||||
"aesgcm", aesgcm_test,
|
||||
@@ -306,10 +306,10 @@ static struct {
|
||||
#endif
|
||||
#ifndef NO_DSA
|
||||
"dsa", dsa_test,
|
||||
#endif
|
||||
#endif
|
||||
#ifndef NO_PWDBASED
|
||||
"pwdbased", pwdbased_test,
|
||||
#endif
|
||||
#endif
|
||||
#ifdef OPENSSL_EXTRA
|
||||
"openssl", openssl_test,
|
||||
#endif
|
||||
@@ -328,29 +328,29 @@ enum jobtype { FORGROUND, BACKGROUND } ;
|
||||
|
||||
static int BackGround = 0 ; /* 1: background job is running */
|
||||
|
||||
char * wolfssl_fgets ( char * str, int num, FILE * f )
|
||||
char * wolfssl_fgets ( char * str, int num, FILE * f )
|
||||
{
|
||||
int i ;
|
||||
|
||||
|
||||
for(i = 0 ; i< num ; i++) {
|
||||
while((str[i] = getchar()) == 0) {
|
||||
#if defined (HAVE_KEIL_RTX) && !defined(WOLFSSL_CMSIS_RTOS)
|
||||
os_tsk_pass ();
|
||||
#else
|
||||
#else
|
||||
osThreadYield ();
|
||||
#endif
|
||||
}
|
||||
if(str[i] == '\n' || str[i] == '\012' || str[i] == '\015') {
|
||||
putchar('\n') ;
|
||||
str[i++] = '\n' ;
|
||||
str[i] = '\0' ;
|
||||
str[i++] = '\n' ;
|
||||
str[i] = '\0' ;
|
||||
break ;
|
||||
} else if(str[i] == '\010') { /* BS */
|
||||
if(i) { /* erace one char */
|
||||
putchar('\010') ; putchar(' ') ; putchar('\010') ;
|
||||
putchar('\010') ; putchar(' ') ; putchar('\010') ;
|
||||
i = (i>0 ? (i-2) : -1 ) ;
|
||||
continue ;
|
||||
}
|
||||
}
|
||||
} else if(str[i] == '\033' || str[i] == '\004' ) { /* ESC or ^D */
|
||||
str[i] = '\0' ;
|
||||
return(0) ;
|
||||
@@ -361,23 +361,23 @@ char * wolfssl_fgets ( char * str, int num, FILE * f )
|
||||
}
|
||||
|
||||
/******* Get Command Line *****************************/
|
||||
static int getline(char * line, int sz, func_args *args, int*bf_flg)
|
||||
static int getline(char * line, int sz, func_args *args, int*bf_flg)
|
||||
{
|
||||
char * ret ;
|
||||
int i ;
|
||||
|
||||
|
||||
#define MAXARGS 10
|
||||
#define MAXARGLEN 30
|
||||
static char *argv[MAXARGS] ;
|
||||
args->argv = argv ;
|
||||
|
||||
|
||||
putchar('>') ;
|
||||
fflush(stdout) ;
|
||||
ret = wolfssl_fgets(line, sz, stdin) ;
|
||||
|
||||
|
||||
#define SHELL_ERROR_FGETS -102
|
||||
if(ret != line) return(SHELL_ERROR_FGETS) ;
|
||||
|
||||
|
||||
if(line[strlen(line)-2] == '&') {
|
||||
(*bf_flg) = BACKGROUND ;
|
||||
line[strlen(line)-2] = '\n' ;
|
||||
@@ -404,22 +404,22 @@ static int getline(char * line, int sz, func_args *args, int*bf_flg)
|
||||
#define IP_SIZE 16
|
||||
|
||||
#ifdef WOLFSSL_KEIL_TCP_NET
|
||||
static void ipaddr_comm(void *args)
|
||||
static void ipaddr_comm(void *args)
|
||||
{
|
||||
if(((func_args *)args)->argc == 1) {
|
||||
printf("IP addr: %s, port %d\n", wolfSSLIP, wolfSSLPort) ;
|
||||
} else {
|
||||
if(BackGround != 0) {
|
||||
printf("Cannot change IP addr while background server is running\n") ;
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-'&&
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-'&&
|
||||
((func_args *)args)->argv[1][1] == 'a' ) {
|
||||
/* strcpy(yasslIP, ((func_args *)args)->argv[2]) ; */
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-' &&
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-' &&
|
||||
((func_args *)args)->argv[1][1] == 'p' ) {
|
||||
/* yasslPort = atoi(((func_args *)args)->argv[2]) ; */
|
||||
} else printf("Invalid argument\n") ;
|
||||
} else printf("Invalid argument\n") ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -430,7 +430,7 @@ static void ipaddr_comm(void *args)
|
||||
#if defined(HAVE_KEIL_RTX)
|
||||
static int stack_ck = 0 ;
|
||||
|
||||
void stack_comm(void *args)
|
||||
void stack_comm(void *args)
|
||||
{
|
||||
if(stack_ck) {
|
||||
printf("Stack Check: Off\n") ;
|
||||
@@ -440,7 +440,7 @@ void stack_comm(void *args)
|
||||
stack_ck = 1 ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#define FILL_PATTERN 0xa596695a
|
||||
void stack_fill(char * stack, int size)
|
||||
{
|
||||
@@ -451,13 +451,13 @@ void stack_fill(char * stack, int size)
|
||||
((int *)stack)[i] = FILL_PATTERN ;
|
||||
}
|
||||
|
||||
void stack_check(char * stack, int size)
|
||||
void stack_check(char * stack, int size)
|
||||
{
|
||||
int i ;
|
||||
|
||||
|
||||
if(stack_ck == 0)return ;
|
||||
if(stack_ck == 1) {
|
||||
stack_ck ++ ; return ;
|
||||
stack_ck ++ ; return ;
|
||||
}
|
||||
for(i=1; i<size/4 ; i++) {
|
||||
if(((int *)stack)[i] != FILL_PATTERN) break ;
|
||||
@@ -473,7 +473,7 @@ void stack_check(char * stack, int size)
|
||||
|
||||
static int for_iteration = 1 ;
|
||||
|
||||
static void for_command(void *args)
|
||||
static void for_command(void *args)
|
||||
{
|
||||
if( args == NULL || ((func_args *)args)->argc == 1) {
|
||||
printf("For %d times\n", for_iteration) ;
|
||||
@@ -487,7 +487,7 @@ static void for_command(void *args)
|
||||
|
||||
static int wolfsslDebug = 1 ;
|
||||
|
||||
static void dbg_comm(void *args)
|
||||
static void dbg_comm(void *args)
|
||||
{
|
||||
if(wolfsslDebug == 1) {
|
||||
wolfsslDebug = 0 ;
|
||||
@@ -501,10 +501,10 @@ static void dbg_comm(void *args)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void help_comm(void *args)
|
||||
static void help_comm(void *args)
|
||||
{
|
||||
static char *commands[] = {
|
||||
"test",
|
||||
"test",
|
||||
"benchmark",
|
||||
"echoserver& : simple echo server in background mode",
|
||||
"echoclient : simple echo client followed by any input string, or \"quit\", \"break\"",
|
||||
@@ -513,7 +513,7 @@ static void help_comm(void *args)
|
||||
"client -g -v [0123] -h xxx.xxx.xxx.xxx -p 443 : usage example",
|
||||
"server/client -h : help for server/client command",
|
||||
"help",
|
||||
""
|
||||
""
|
||||
} ;
|
||||
|
||||
int i ;
|
||||
@@ -555,12 +555,12 @@ void exit_command(void) {
|
||||
|
||||
|
||||
/*********** Invoke Forground Command *********************/
|
||||
static void command_invoke(void const *args)
|
||||
static void command_invoke(void const *args)
|
||||
{
|
||||
void (*func)(void const * ) ;
|
||||
int i,iteration ;
|
||||
|
||||
func = (void(*)(void const *))((func_args *)args)->argv[0] ;
|
||||
|
||||
func = (void(*)(void const *))((func_args *)args)->argv[0] ;
|
||||
#if defined(HAVE_KEIL_RTX)
|
||||
wc_LockMutex((wolfSSL_Mutex *)&command_mutex) ;
|
||||
#endif
|
||||
@@ -570,15 +570,15 @@ static void command_invoke(void const *args)
|
||||
#if defined(HAVE_KEIL_RTX) && !defined(WOLFSSL_CMSIS_RTOS)
|
||||
stack_fill(command_stack, COMMAND_STACK_SIZE) ;
|
||||
#endif
|
||||
|
||||
|
||||
func(args) ; /* invoke command */
|
||||
|
||||
|
||||
#if defined(HAVE_KEIL_RTX)&& !defined(WOLFSSL_CMSIS_RTOS)
|
||||
stack_check(command_stack, COMMAND_STACK_SIZE) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
if(iteration > 1)
|
||||
if(iteration > 1)
|
||||
for_iteration = 1 ;
|
||||
osDelay(20000) ;
|
||||
#ifdef HAVE_KEIL_RTX
|
||||
@@ -593,26 +593,26 @@ static void command_invoke(void const *args)
|
||||
|
||||
#if defined(HAVE_KEIL_RTX) || defined(WOLFSSL_CMSIS_RTOS)
|
||||
/******* Invoke Background Job *******************************/
|
||||
static void bg_job_invoke(void const *args)
|
||||
static void bg_job_invoke(void const *args)
|
||||
{
|
||||
void (*func)(void const * ) ;
|
||||
BackGround = 1 ;
|
||||
BackGround = 1 ;
|
||||
#if defined(HAVE_KEIL_RTX)&& !defined(WOLFSSL_CMSIS_RTOS)
|
||||
stack_fill(bg_job_stack, BG_JOB_STACK_SIZE) ;
|
||||
#endif
|
||||
|
||||
func = (void(*)(void const *))((func_args *)args)->argv[0] ;
|
||||
func = (void(*)(void const *))((func_args *)args)->argv[0] ;
|
||||
func(args) ; /* invoke command */
|
||||
#if defined(HAVE_KEIL_RTX) && !defined(WOLFSSL_CMSIS_RTOS)
|
||||
stack_check(bg_job_stack, BG_JOB_STACK_SIZE) ;
|
||||
#endif
|
||||
|
||||
|
||||
osDelay(20000) ;
|
||||
BackGround = 0 ;
|
||||
|
||||
#ifdef WOLFSSL_CMSIS_RTOS
|
||||
osThreadTerminate(osThreadGetId()) ;
|
||||
#else
|
||||
#else
|
||||
os_tsk_delete_self() ; ;
|
||||
#endif
|
||||
}
|
||||
@@ -627,18 +627,18 @@ static char line[LINESIZE] ;
|
||||
#endif
|
||||
/********* SHEULL MAIN LOOP ***********************************/
|
||||
void shell_main(void *arg) {
|
||||
int i ;
|
||||
int i ;
|
||||
func_args args ;
|
||||
int bf_flg ;
|
||||
osThreadId cmd ;
|
||||
i = BackGround ;
|
||||
i = BackGround ;
|
||||
/* Dummy for avoiding warning: BackGround is defined but not used. */
|
||||
|
||||
#if defined(HAVE_KEIL_RTX)
|
||||
|
||||
#if defined(HAVE_KEIL_RTX)
|
||||
wc_InitMutex(&command_mutex) ;
|
||||
#endif
|
||||
help_comm(NULL) ;
|
||||
|
||||
|
||||
printf("Starting Shell\n") ;
|
||||
while(1) {
|
||||
if(getline(line, LINESIZE, &args, &bf_flg) > 0) {
|
||||
@@ -654,7 +654,7 @@ void shell_main(void *arg) {
|
||||
#else
|
||||
#if defined(WOLFSSL_CMSIS_RTOS)
|
||||
wc_UnLockMutex((wolfSSL_Mutex *)&command_mutex) ;
|
||||
cmd = osThreadCreate (osThread (command_invoke) , &args);
|
||||
cmd = osThreadCreate (osThread (command_invoke) , &args);
|
||||
if(cmd == NULL) {
|
||||
printf("Cannon create command thread\n") ;
|
||||
}
|
||||
@@ -673,13 +673,13 @@ void shell_main(void *arg) {
|
||||
if(BackGround != 0) {
|
||||
printf("Multiple background servers not supported.\n") ;
|
||||
} else {
|
||||
printf("\"%s\" is running with the background mode.\n",
|
||||
printf("\"%s\" is running with the background mode.\n",
|
||||
commandTable[i].command) ;
|
||||
#if defined(HAVE_KEIL_RTX) && !defined(WOLFSSL_CMSIS_RTOS)
|
||||
os_tsk_create_user_ex( (void(*)(void *))&bg_job_invoke,
|
||||
os_tsk_create_user_ex( (void(*)(void *))&bg_job_invoke,
|
||||
6, bg_job_stack, BG_JOB_STACK_SIZE, &args) ;
|
||||
#else
|
||||
osThreadCreate (osThread (bg_job_invoke), &args);
|
||||
osThreadCreate (osThread (bg_job_invoke), &args);
|
||||
osDelay (500) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* time-STM32F2.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -19,15 +19,15 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#define DWT ((DWT_Type *) (0xE0001000UL) )
|
||||
#include <stdint.h>
|
||||
#define DWT ((DWT_Type *) (0xE0001000UL) )
|
||||
typedef struct
|
||||
{
|
||||
uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */
|
||||
@@ -36,7 +36,7 @@ typedef struct
|
||||
|
||||
extern uint32_t SystemCoreClock ;
|
||||
|
||||
double current_time(int reset)
|
||||
double current_time(int reset)
|
||||
{
|
||||
if(reset) DWT->CYCCNT = 0 ;
|
||||
return ((double)DWT->CYCCNT/SystemCoreClock) ;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* ssl-dummy.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -27,8 +27,8 @@
|
||||
#include <cyassl/ssl.h>
|
||||
#include <cyassl/internal.h>
|
||||
|
||||
Signer* GetCA(void* vp, byte* hash)
|
||||
{
|
||||
Signer* GetCA(void* vp, byte* hash)
|
||||
{
|
||||
return NULL ;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ Signer* GetCAByName(void* vp, byte* hash)
|
||||
return NULL ;
|
||||
}
|
||||
|
||||
int CyaSSL_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz)
|
||||
int CyaSSL_PemCertToDer(const char* fileName, unsigned char* derBuf, int derSz)
|
||||
{
|
||||
return NULL ;
|
||||
}
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extra/wolfssl/wolfcrypt
|
||||
${CMAKE_SOURCE_DIR}/extra/wolfssl)
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/extra/wolfssl)
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
|
||||
ADD_DEFINITIONS(${SSL_DEFINES})
|
||||
SET(WOLFCRYPT_SOURCES src/aes.c src/arc4.c src/asn.c src/blake2b.c
|
||||
src/camellia.c src/chacha.c src/coding.c src/compress.c src/des3.c
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/extra/wolfssl
|
||||
${CMAKE_SOURCE_DIR}/extra/wolfssl/wolfssl
|
||||
${CMAKE_SOURCE_DIR}/extra/wolfssl/wolfssl/wolfcrypt)
|
||||
${CMAKE_SOURCE_DIR}/extra/wolfssl/wolfssl)
|
||||
|
||||
|
||||
ADD_DEFINITIONS(${SSL_DEFINES})
|
||||
|
||||
@@ -31,7 +31,7 @@ ADD_DEFINITIONS(-Dget_tty_password_ext=wolfssl_mysql_get_tty_password_ext)
|
||||
ADD_DEFINITIONS(-Dget_tty_password=wolfssl_mysql_get_tty_password)
|
||||
|
||||
SET(WOLFSSL_SOURCES src/crl.c src/internal.c src/keys.c src/sniffer.c
|
||||
src/tls.c src/io.c src/ocsp.c src/ssl.c
|
||||
src/tls.c src/wolfio.c src/ocsp.c src/ssl.c
|
||||
../../client/get_password.c )
|
||||
|
||||
ADD_CONVENIENCE_LIBRARY(wolfssl ${WOLFSSL_SOURCES})
|
||||
|
||||
@@ -81,9 +81,9 @@
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/internal.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Middlewares/Third_Party/wolfSSL/src/io.c</name>
|
||||
<name>Middlewares/Third_Party/wolfSSL/src/wolfio.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/io.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/wolfio.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Middlewares/Third_Party/wolfSSL/src/keys.c</name>
|
||||
@@ -211,9 +211,9 @@
|
||||
<locationURI>PARENT-2-PROJECT_LOC/wolfssl/internal.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Middlewares/Third_Party/wolfSSL/wolfssl/io.h</name>
|
||||
<name>Middlewares/Third_Party/wolfSSL/wolfssl/wolfio.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/wolfssl/io.h</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/wolfssl/wolfio.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Middlewares/Third_Party/wolfSSL/wolfssl/ocsp.h</name>
|
||||
|
||||
@@ -25,6 +25,11 @@ extern "C" {
|
||||
#undef WOLFSSL_STM32_CUBEMX
|
||||
#define WOLFSSL_STM32_CUBEMX
|
||||
|
||||
/* Optionally Disable Hardware Hashing Support */
|
||||
//#define NO_STM32_HASH
|
||||
//#define NO_STM32_RNG
|
||||
//#define NO_STM32_CRYPTO
|
||||
|
||||
#undef FREERTOS
|
||||
//#define FREERTOS
|
||||
|
||||
@@ -121,9 +126,9 @@ extern "C" {
|
||||
#undef RSA_LOW_MEM
|
||||
//#define RSA_LOW_MEM
|
||||
|
||||
/* Enables blinding mode, to prevent timing attacks */
|
||||
#undef WC_RSA_BLINDING
|
||||
#define WC_RSA_BLINDING
|
||||
/* Enables blinding mode, to prevent timing attacks */
|
||||
#undef WC_RSA_BLINDING
|
||||
#define WC_RSA_BLINDING
|
||||
|
||||
#else
|
||||
#define NO_RSA
|
||||
@@ -192,6 +197,9 @@ extern "C" {
|
||||
/* Sha256 */
|
||||
#undef NO_SHA256
|
||||
#if 1
|
||||
#if 1
|
||||
#define WOLFSSL_SHA224
|
||||
#endif
|
||||
#else
|
||||
#define NO_SHA256
|
||||
#endif
|
||||
@@ -214,7 +222,7 @@ extern "C" {
|
||||
/* MD5 */
|
||||
#undef NO_MD5
|
||||
#if 1
|
||||
/* enabled */
|
||||
/* enabled */
|
||||
#else
|
||||
#define NO_MD5
|
||||
#endif
|
||||
@@ -282,23 +290,23 @@ extern "C" {
|
||||
#define NO_OLD_RNGNAME
|
||||
|
||||
/* Choose RNG method */
|
||||
#if 0
|
||||
#if 1
|
||||
/* Use built-in P-RNG (SHA256 based) with HW RNG */
|
||||
/* P-RNG + HW RNG (P-RNG is ~8K) */
|
||||
#undef HAVE_HASHDRBG
|
||||
#define HAVE_HASHDRBG
|
||||
|
||||
extern unsigned int custom_rand_generate(void);
|
||||
#undef CUSTOM_RAND_GENERATE
|
||||
#define CUSTOM_RAND_GENERATE custom_rand_generate
|
||||
#if 0
|
||||
extern unsigned int custom_rand_generate(void);
|
||||
#undef CUSTOM_RAND_GENERATE
|
||||
#define CUSTOM_RAND_GENERATE custom_rand_generate
|
||||
#endif
|
||||
#else
|
||||
/* Bypass P-RNG and use only HW RNG */
|
||||
extern int custom_rand_generate_block(unsigned char* output, unsigned int sz);
|
||||
#undef CUSTOM_RAND_GENERATE_BLOCK
|
||||
#define CUSTOM_RAND_GENERATE_BLOCK custom_rand_generate_block
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* arm_startup.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -65,7 +65,7 @@ void reset_handler(void)
|
||||
memcpy32(__data_load_start__, __data_start__, __data_end__);
|
||||
meminit32(__bss_start__, __bss_end__);
|
||||
memcpy32(__fast_load_start__, __fast_start__, __fast_end__);
|
||||
|
||||
|
||||
// Init heap
|
||||
__heap_start__[0] = 0;
|
||||
__heap_start__[1] = ((uint32_t)__heap_end__ - (uint32_t)__heap_start__);
|
||||
@@ -120,8 +120,8 @@ void HardFault_HandlerC( uint32_t *hardfault_args )
|
||||
|
||||
// Configurable Fault Status Register
|
||||
// Consists of MMSR, BFSR and UFSR
|
||||
_CFSR = (*((volatile uint32_t *)(0xE000ED28)));
|
||||
|
||||
_CFSR = (*((volatile uint32_t *)(0xE000ED28)));
|
||||
|
||||
// Hard Fault Status Register
|
||||
_HFSR = (*((volatile uint32_t *)(0xE000ED2C)));
|
||||
|
||||
@@ -158,7 +158,7 @@ void HardFault_HandlerC( uint32_t *hardfault_args )
|
||||
__asm("BKPT #0\n");
|
||||
}
|
||||
|
||||
__attribute__( ( naked ) )
|
||||
__attribute__( ( naked ) )
|
||||
void HardFault_Handler(void)
|
||||
{
|
||||
__asm volatile
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* benchmark_main.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -38,7 +38,7 @@ static func_args args = { 0 } ;
|
||||
|
||||
extern double current_time(int reset);
|
||||
|
||||
void main(void)
|
||||
void main(void)
|
||||
{
|
||||
int test_num = 0;
|
||||
|
||||
@@ -47,12 +47,12 @@ void main(void)
|
||||
printf("\nBenchmark Test %d:\n", test_num);
|
||||
benchmark_test(&args);
|
||||
printf("Benchmark Test %d: Return code %d\n", test_num, args.return_code);
|
||||
|
||||
|
||||
test_num++;
|
||||
} while(args.return_code == 0);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
SAMPLE OUTPUT: Freescale K64 running at 96MHz with no MMCAU:
|
||||
Benchmark Test 0:
|
||||
AES 25 kB took 0.073 seconds, 0.334 MB/s
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* kinetis_hw.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -100,9 +100,9 @@ static void hw_mcg_init(void)
|
||||
BOARD_BootClockHSRUN();
|
||||
#else
|
||||
/* Adjust clock dividers (core/system=div/1, bus=div/2, flex bus=div/2, flash=div/4) */
|
||||
SIM->CLKDIV1 = SIM_CLKDIV1_OUTDIV1(SYS_CLK_DIV-1) | SIM_CLKDIV1_OUTDIV2(BUS_CLK_DIV-1) |
|
||||
SIM->CLKDIV1 = SIM_CLKDIV1_OUTDIV1(SYS_CLK_DIV-1) | SIM_CLKDIV1_OUTDIV2(BUS_CLK_DIV-1) |
|
||||
SIM_CLKDIV1_OUTDIV3(BUS_CLK_DIV-1) | SIM_CLKDIV1_OUTDIV4(FLASH_CLK_DIV-1);
|
||||
|
||||
|
||||
/* Configure FEI internal clock speed */
|
||||
MCG->C4 = (SYS_CLK_DMX | SYS_CLK_DRS);
|
||||
while((MCG->C4 & (MCG_C4_DRST_DRS_MASK | MCG_C4_DMX32_MASK)) != (SYS_CLK_DMX | SYS_CLK_DRS));
|
||||
@@ -146,7 +146,7 @@ static void hw_uart_init(void)
|
||||
/* Enable UART core clock */
|
||||
/* Note: Remember to update me if UART_PORT changes */
|
||||
SIM->SCGC1 |= SIM_SCGC1_UART4_MASK;
|
||||
|
||||
|
||||
/* Configure UART TX pin */
|
||||
UART_TX_PORT->PCR[UART_TX_PIN] = PORT_PCR_MUX(UART_TX_MUX);
|
||||
|
||||
@@ -155,17 +155,17 @@ static void hw_uart_init(void)
|
||||
|
||||
/* Configure the UART for 8-bit mode, no parity */
|
||||
UART_PORT->C1 = 0;
|
||||
|
||||
|
||||
/* Calculate baud settings */
|
||||
sbr = (uint16_t)((BUS_CLK_KHZ * 1000)/(UART_BAUD * 16));
|
||||
temp = UART_PORT->BDH & ~(UART_BDH_SBR(0x1F));
|
||||
UART_PORT->BDH = temp | UART_BDH_SBR(((sbr & 0x1F00) >> 8));
|
||||
UART_PORT->BDL = (uint8_t)(sbr & UART_BDL_SBR_MASK);
|
||||
|
||||
|
||||
/* Determine if a fractional divider is needed to get closer to the baud rate */
|
||||
brfa = (((BUS_CLK_KHZ * 32000)/(UART_BAUD * 16)) - (sbr * 32));
|
||||
temp = UART_PORT->C4 & ~(UART_C4_BRFA(0x1F));
|
||||
UART_PORT->C4 = temp | UART_C4_BRFA(brfa);
|
||||
UART_PORT->C4 = temp | UART_C4_BRFA(brfa);
|
||||
|
||||
/* Enable receiver and transmitter */
|
||||
UART_PORT->C2 |= (UART_C2_TE_MASK | UART_C2_RE_MASK);
|
||||
@@ -314,7 +314,7 @@ const struct flash_conf flash_conf __attribute__ ((section (".flashconf"),used))
|
||||
{
|
||||
.backdoor_key = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },
|
||||
.fprot = { 0xFF, 0xFF, 0xFF, 0xFF },
|
||||
.fsec = NV_FSEC_SEC(FSEC_UNSECURE) | NV_FSEC_FSLACC(FSEC_FSLACC_GRANTED) |
|
||||
.fsec = NV_FSEC_SEC(FSEC_UNSECURE) | NV_FSEC_FSLACC(FSEC_FSLACC_GRANTED) |
|
||||
NV_FSEC_MEEN(FSEC_MASS_ERASE_ENABLE) | NV_FSEC_KEYEN(FSEC_KEY_DISABLED),
|
||||
.fopt = 0xFF,
|
||||
.feprot = 0xFF,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* retarget.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* test_main.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
* Copyright (C) 2006-2017 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
@@ -38,7 +38,7 @@ typedef struct func_args {
|
||||
static func_args args = { 0 } ;
|
||||
|
||||
|
||||
void main(void)
|
||||
void main(void)
|
||||
{
|
||||
int test_num = 0;
|
||||
|
||||
@@ -47,13 +47,13 @@ void main(void)
|
||||
printf("\nCrypt Test %d:\n", test_num);
|
||||
wolfcrypt_test(&args);
|
||||
printf("Crypt Test %d: Return code %d\n", test_num, args.return_code);
|
||||
|
||||
|
||||
test_num++;
|
||||
} while(args.return_code == 0);
|
||||
}
|
||||
|
||||
|
||||
/* SAMPLE OUTPUT:
|
||||
/* SAMPLE OUTPUT:
|
||||
Crypt Test 0:
|
||||
SHA test passed!
|
||||
SHA-256 test passed!
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
<file file_name="../../src/crl.c" />
|
||||
<file file_name="../../src/include.am" />
|
||||
<file file_name="../../src/internal.c" />
|
||||
<file file_name="../../src/io.c" />
|
||||
<file file_name="../../src/wolfio.c" />
|
||||
<file file_name="../../src/keys.c" />
|
||||
<file file_name="../../src/libwolfssl.la" />
|
||||
<file file_name="../../src/ocsp.c" />
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
<file file_name="../../src/crl.c" />
|
||||
<file file_name="../../src/include.am" />
|
||||
<file file_name="../../src/internal.c" />
|
||||
<file file_name="../../src/io.c" />
|
||||
<file file_name="../../src/wolfio.c" />
|
||||
<file file_name="../../src/keys.c" />
|
||||
<file file_name="../../src/libwolfssl.la" />
|
||||
<file file_name="../../src/ocsp.c" />
|
||||
|
||||
11
IDE/VS-ARM/README.md
Normal file
11
IDE/VS-ARM/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
VisualStudio for ARM build
|
||||
==========================
|
||||
|
||||
VS2017 now offers solution options for Android and iOS applications. It includes
|
||||
the GCC cross-compiler suite and property sheets for configuring a project
|
||||
for those platforms and libraries for cross-platform mobile application
|
||||
development.
|
||||
|
||||
The provided solution file will build wolfSSL for linking into an ARM based
|
||||
application, *libwolfssl.a*. The *user_settings.h* file enables some of the
|
||||
hardened settings and disables most uncommon ciphers.
|
||||
8
IDE/VS-ARM/include.am
Normal file
8
IDE/VS-ARM/include.am
Normal file
@@ -0,0 +1,8 @@
|
||||
# vim:ft=automake
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
EXTRA_DIST+= IDE/VS-ARM/README.md
|
||||
EXTRA_DIST+= IDE/VS-ARM/wolfssl.sln
|
||||
EXTRA_DIST+= IDE/VS-ARM/wolfssl.vcxproj
|
||||
EXTRA_DIST+= IDE/VS-ARM/user_settings.h
|
||||
24
IDE/VS-ARM/user_settings.h
Normal file
24
IDE/VS-ARM/user_settings.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef _VSARM_USER_SETTINGS_H_
|
||||
#define _VSARM_USER_SETTINGS_H_
|
||||
|
||||
/* Enables blinding mode, to prevent timing attacks */
|
||||
#define WC_RSA_BLINDING
|
||||
|
||||
#define WOLFSSL_SHA512
|
||||
#define NO_PSK
|
||||
#define HAVE_EXTENDED_MASTER
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_AESGCM
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
#define NO_HC128
|
||||
#define NO_RC4
|
||||
#define NO_RABBIT
|
||||
#define NO_DSA
|
||||
#define NO_MD4
|
||||
#define HAVE_ECC
|
||||
#define HAVE_HASHDRBG
|
||||
|
||||
|
||||
#endif /* _VSARM_USER_SETTINGS_H_ */
|
||||
43
IDE/VS-ARM/wolfssl.sln
Normal file
43
IDE/VS-ARM/wolfssl.sln
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26730.16
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wolfssl", "wolfssl.vcxproj", "{39E7CF74-B491-4CC4-B600-95664A25CC80}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|ARM = Release|ARM
|
||||
Release|ARM64 = Release|ARM64
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{39E7CF74-B491-4CC4-B600-95664A25CC80}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{39E7CF74-B491-4CC4-B600-95664A25CC80}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{39E7CF74-B491-4CC4-B600-95664A25CC80}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{39E7CF74-B491-4CC4-B600-95664A25CC80}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{39E7CF74-B491-4CC4-B600-95664A25CC80}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{39E7CF74-B491-4CC4-B600-95664A25CC80}.Debug|x64.Build.0 = Debug|x64
|
||||
{39E7CF74-B491-4CC4-B600-95664A25CC80}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{39E7CF74-B491-4CC4-B600-95664A25CC80}.Debug|x86.Build.0 = Debug|x86
|
||||
{39E7CF74-B491-4CC4-B600-95664A25CC80}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{39E7CF74-B491-4CC4-B600-95664A25CC80}.Release|ARM.Build.0 = Release|ARM
|
||||
{39E7CF74-B491-4CC4-B600-95664A25CC80}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{39E7CF74-B491-4CC4-B600-95664A25CC80}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{39E7CF74-B491-4CC4-B600-95664A25CC80}.Release|x64.ActiveCfg = Release|x64
|
||||
{39E7CF74-B491-4CC4-B600-95664A25CC80}.Release|x64.Build.0 = Release|x64
|
||||
{39E7CF74-B491-4CC4-B600-95664A25CC80}.Release|x86.ActiveCfg = Release|x86
|
||||
{39E7CF74-B491-4CC4-B600-95664A25CC80}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {E00DBEEF-9E96-4FEF-A0B9-F64C2CB1B4E0}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
227
IDE/VS-ARM/wolfssl.vcxproj
Normal file
227
IDE/VS-ARM/wolfssl.vcxproj
Normal file
@@ -0,0 +1,227 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|ARM">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|ARM64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|ARM64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x86">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x86">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x86</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\crl.c" />
|
||||
<ClCompile Include="..\..\src\internal.c" />
|
||||
<ClCompile Include="..\..\src\wolfio.c" />
|
||||
<ClCompile Include="..\..\src\keys.c" />
|
||||
<ClCompile Include="..\..\src\ocsp.c" />
|
||||
<ClCompile Include="..\..\src\ssl.c" />
|
||||
<ClCompile Include="..\..\src\tls.c" />
|
||||
<ClCompile Include="..\..\src\tls13.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\aes.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\arc4.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\asn.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\blake2b.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\camellia.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\chacha.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\chacha20_poly1305.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\cmac.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\coding.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\curve25519.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\des3.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\dh.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\dsa.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\ecc.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\ed25519.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\error.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\fe_operations.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\ge_low_mem.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\ge_operations.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\hash.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\hc128.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\hmac.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\idea.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\integer.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\logging.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\md2.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\md4.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\md5.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\memory.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\pkcs12.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\pkcs7.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\poly1305.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\pwdbased.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\rabbit.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\random.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\ripemd.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\rsa.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\sha.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\sha256.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\sha3.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\sha512.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\signature.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\srp.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\tfm.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\wc_encrypt.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\wc_port.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\wolfevent.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\wolfmath.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="user_settings.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{39e7cf74-b491-4cc4-b600-95664a25cc80}</ProjectGuid>
|
||||
<Keyword>Android</Keyword>
|
||||
<RootNamespace>wolfssl</RootNamespace>
|
||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
||||
<ApplicationType>Android</ApplicationType>
|
||||
<ApplicationTypeRevision>3.0</ApplicationTypeRevision>
|
||||
<ProjectName>wolfssl</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>Clang_3_8</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>Clang_3_8</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>Clang_3_8</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>Clang_3_8</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>Clang_3_8</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>Clang_3_8</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>Clang_3_8</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>Clang_3_8</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Label="Shared" />
|
||||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>.\;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DEBUG_WOLFSSL;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>.\;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>.\;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DEBUG_WOLFSSL;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>.\;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>.\;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DEBUG_WOLFSSL;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>.\;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>.\;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>DEBUG_WOLFSSL;WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<AdditionalIncludeDirectories>.\;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WOLFSSL_LIB;WOLFSSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets" />
|
||||
</Project>
|
||||
@@ -141,7 +141,7 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@@ -162,6 +162,7 @@
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -200,7 +201,7 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalDependencies>ws2_32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">
|
||||
@@ -239,7 +240,7 @@
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">
|
||||
@@ -273,4 +274,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -37,12 +37,12 @@ Global
|
||||
{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Debug|x64.Build.0 = Debug|x64
|
||||
{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Debug|Win32.Build.0 = Debug|Win32
|
||||
{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32
|
||||
{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Debug|Win32.Build.0 = DLL Debug|Win32
|
||||
{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Debug|x64.ActiveCfg = DLL Debug|x64
|
||||
{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Debug|x64.Build.0 = DLL Debug|x64
|
||||
{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Release|Win32.ActiveCfg = Release|Win32
|
||||
{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Release|Win32.Build.0 = Release|Win32
|
||||
{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Release|Win32.ActiveCfg = DLL Release|Win32
|
||||
{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Release|Win32.Build.0 = DLL Release|Win32
|
||||
{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Release|x64.ActiveCfg = DLL Release|x64
|
||||
{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.DLL Release|x64.Build.0 = DLL Release|x64
|
||||
{D04BDF66-664A-4D59-BEAC-8AB2D5809C21}.Release|Win32.ActiveCfg = Release|Win32
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -142,6 +143,9 @@
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<BaseAddress>0x5A000000</BaseAddress>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>false</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@@ -170,7 +174,8 @@
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>false</DataExecutionPrevention>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@@ -199,6 +204,8 @@
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<BaseAddress>0x5A000000</BaseAddress>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -227,7 +234,7 @@
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<RandomizedBaseAddress>true</RandomizedBaseAddress>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
@@ -283,7 +290,7 @@
|
||||
<ClCompile Include="..\..\wolfcrypt\src\hmac.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\integer.c" />
|
||||
<ClCompile Include="..\..\src\internal.c" />
|
||||
<ClCompile Include="..\..\src\io.c" />
|
||||
<ClCompile Include="..\..\src\wolfio.c" />
|
||||
<ClCompile Include="..\..\src\keys.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\logging.c" />
|
||||
<ClCompile Include="..\..\wolfcrypt\src\md5.c" />
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
/* Configuration */
|
||||
#define IPHONE /* Needed for Xcode */
|
||||
#define IPHONE /* Needed for Xcode */
|
||||
#define HAVE_HASHDRBG
|
||||
#define HAVE_AESGCM
|
||||
#define WOLFSSL_SHA512
|
||||
#define WOLFSSL_SHA384
|
||||
|
||||
#ifdef HAVE_FIPS
|
||||
#define NO_MD4
|
||||
#define NO_HC128
|
||||
#define NO_RABBIT
|
||||
#define NO_DSA
|
||||
#define NO_PWDBASED
|
||||
#define NO_MD4
|
||||
#define NO_HC128
|
||||
#define NO_RABBIT
|
||||
#define NO_DSA
|
||||
#define NO_PWDBASED
|
||||
#else
|
||||
#define USE_FAST_MATH
|
||||
#define WC_RSA_BLINDING
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define HAVE_ECC
|
||||
#define ECC_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/* Begin PBXBuildFile section */
|
||||
521646091A89928E0062516A /* crl.c in Sources */ = {isa = PBXBuildFile; fileRef = 521646011A89928E0062516A /* crl.c */; };
|
||||
5216460A1A89928E0062516A /* internal.c in Sources */ = {isa = PBXBuildFile; fileRef = 521646021A89928E0062516A /* internal.c */; };
|
||||
5216460B1A89928E0062516A /* io.c in Sources */ = {isa = PBXBuildFile; fileRef = 521646031A89928E0062516A /* io.c */; };
|
||||
5216460B1A89928E0062516A /* wolfio.c in Sources */ = {isa = PBXBuildFile; fileRef = 521646031A89928E0062516A /* wolfio.c */; };
|
||||
5216460C1A89928E0062516A /* keys.c in Sources */ = {isa = PBXBuildFile; fileRef = 521646041A89928E0062516A /* keys.c */; };
|
||||
5216460D1A89928E0062516A /* ocsp.c in Sources */ = {isa = PBXBuildFile; fileRef = 521646051A89928E0062516A /* ocsp.c */; };
|
||||
5216460E1A89928E0062516A /* sniffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 521646061A89928E0062516A /* sniffer.c */; };
|
||||
@@ -220,7 +220,7 @@
|
||||
A4A54E271BC5C3E0002866CD /* arc4.c in Sources */ = {isa = PBXBuildFile; fileRef = 521646121A8992CC0062516A /* arc4.c */; };
|
||||
A4A54E281BC5C3E0002866CD /* integer.c in Sources */ = {isa = PBXBuildFile; fileRef = 5216461F1A8992CC0062516A /* integer.c */; };
|
||||
A4A54E291BC5C3E0002866CD /* internal.c in Sources */ = {isa = PBXBuildFile; fileRef = 521646021A89928E0062516A /* internal.c */; };
|
||||
A4A54E2A1BC5C3E0002866CD /* io.c in Sources */ = {isa = PBXBuildFile; fileRef = 521646031A89928E0062516A /* io.c */; };
|
||||
A4A54E2A1BC5C3E0002866CD /* wolfio.c in Sources */ = {isa = PBXBuildFile; fileRef = 521646031A89928E0062516A /* wolfio.c */; };
|
||||
A4A54E2B1BC5C3E0002866CD /* tfm.c in Sources */ = {isa = PBXBuildFile; fileRef = 521646301A8992CC0062516A /* tfm.c */; };
|
||||
A4A54E2C1BC5C3E0002866CD /* crl.c in Sources */ = {isa = PBXBuildFile; fileRef = 521646011A89928E0062516A /* crl.c */; };
|
||||
A4A54E2D1BC5C3E0002866CD /* keys.c in Sources */ = {isa = PBXBuildFile; fileRef = 521646041A89928E0062516A /* keys.c */; };
|
||||
@@ -625,7 +625,7 @@
|
||||
/* Begin PBXFileReference section */
|
||||
521646011A89928E0062516A /* crl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = crl.c; path = ../../src/crl.c; sourceTree = "<group>"; };
|
||||
521646021A89928E0062516A /* internal.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = internal.c; path = ../../src/internal.c; sourceTree = "<group>"; };
|
||||
521646031A89928E0062516A /* io.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = io.c; path = ../../src/io.c; sourceTree = "<group>"; };
|
||||
521646031A89928E0062516A /* wolfio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolfio.c; path = ../../src/wolfio.c; sourceTree = "<group>"; };
|
||||
521646041A89928E0062516A /* keys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = keys.c; path = ../../src/keys.c; sourceTree = "<group>"; };
|
||||
521646051A89928E0062516A /* ocsp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ocsp.c; path = ../../src/ocsp.c; sourceTree = "<group>"; };
|
||||
521646061A89928E0062516A /* sniffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sniffer.c; path = ../../src/sniffer.c; sourceTree = "<group>"; };
|
||||
@@ -1012,7 +1012,7 @@
|
||||
children = (
|
||||
521646011A89928E0062516A /* crl.c */,
|
||||
521646021A89928E0062516A /* internal.c */,
|
||||
521646031A89928E0062516A /* io.c */,
|
||||
521646031A89928E0062516A /* wolfio.c */,
|
||||
521646041A89928E0062516A /* keys.c */,
|
||||
521646051A89928E0062516A /* ocsp.c */,
|
||||
521646061A89928E0062516A /* sniffer.c */,
|
||||
@@ -1185,7 +1185,7 @@
|
||||
521646331A8992CC0062516A /* arc4.c in Sources */,
|
||||
521646401A8992CC0062516A /* integer.c in Sources */,
|
||||
5216460A1A89928E0062516A /* internal.c in Sources */,
|
||||
5216460B1A89928E0062516A /* io.c in Sources */,
|
||||
5216460B1A89928E0062516A /* wolfio.c in Sources */,
|
||||
521646511A8992CC0062516A /* tfm.c in Sources */,
|
||||
521646091A89928E0062516A /* crl.c in Sources */,
|
||||
5216460C1A89928E0062516A /* keys.c in Sources */,
|
||||
@@ -1247,7 +1247,7 @@
|
||||
A4A54E271BC5C3E0002866CD /* arc4.c in Sources */,
|
||||
A4A54E281BC5C3E0002866CD /* integer.c in Sources */,
|
||||
A4A54E291BC5C3E0002866CD /* internal.c in Sources */,
|
||||
A4A54E2A1BC5C3E0002866CD /* io.c in Sources */,
|
||||
A4A54E2A1BC5C3E0002866CD /* wolfio.c in Sources */,
|
||||
A4A54E2B1BC5C3E0002866CD /* tfm.c in Sources */,
|
||||
A4A54E2C1BC5C3E0002866CD /* crl.c in Sources */,
|
||||
A4A54E2D1BC5C3E0002866CD /* keys.c in Sources */,
|
||||
|
||||
@@ -1371,7 +1371,7 @@
|
||||
52B1344516F3C9E800C07B32 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0460;
|
||||
LastUpgradeCheck = 0820;
|
||||
ORGANIZATIONNAME = "wolfSSL Inc";
|
||||
TargetAttributes = {
|
||||
30B0604A1C6DDAEA00D46008 = {
|
||||
@@ -1623,23 +1623,33 @@
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
|
||||
@@ -1654,16 +1664,25 @@
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
|
||||
SDKROOT = iphoneos;
|
||||
|
||||
@@ -11,5 +11,7 @@ include IDE/ROWLEY-CROSSWORKS-ARM/include.am
|
||||
include IDE/ARDUINO/include.am
|
||||
include IDE/INTIME-RTOS/include.am
|
||||
include IDE/OPENSTM32/include.am
|
||||
include IDE/VS-ARM/include.am
|
||||
include IDE/GCC-ARM/include.am
|
||||
|
||||
EXTRA_DIST+= IDE/IAR-EWARM IDE/MDK-ARM IDE/MDK5-ARM IDE/MYSQL IDE/LPCXPRESSO IDE/HEXIWEAR
|
||||
|
||||
7
INSTALL
7
INSTALL
@@ -49,7 +49,12 @@
|
||||
library for compatibility with the Arduino IDE. There is a README.md in
|
||||
IDE/ARDUINO for detailed instructions.
|
||||
|
||||
10. Porting to a new platform
|
||||
10. Building for Android with Visual Studio 2017
|
||||
|
||||
Please see the README in IDE/VS-ARM.
|
||||
Use the Visual Studio solution IDE/VS-ARM/wolfssl.sln.
|
||||
|
||||
11. Porting to a new platform
|
||||
|
||||
Please see section 2.4 in the manual:
|
||||
http://www.wolfssl.com/yaSSL/Docs-cyassl-manual-2-building-cyassl.html
|
||||
|
||||
54
README
54
README
@@ -34,6 +34,60 @@ before calling wolfSSL_new(); Though it's not recommended.
|
||||
|
||||
*** end Notes ***
|
||||
|
||||
|
||||
********* wolfSSL (Formerly CyaSSL) Release 3.12.2 (10/23/2017)
|
||||
|
||||
Release 3.12.2 of wolfSSL has bug fixes and new features including:
|
||||
|
||||
This release includes many performance improvements with Intel ASM (AVX/AVX2) and AES-NI. New single precision math option to speedup RSA, DH and ECC. Embedded hardware support has been expanded for STM32, PIC32MZ and ATECC508A. AES now supports XTS mode for disk encryption. Certificate improvements for setting serial number, key usage and extended key usage. Refactor of SSL_ and hash types to allow openssl coexistence. Improvements for TLS 1.3. Fixes for OCSP stapling to allow disable and WOLFSSL specific user context for callbacks. Fixes for openssl and MySQL compatibility. Updated Micrium port. Fixes for asynchronous modes.
|
||||
|
||||
- Added TLS extension for Supported Point Formats (ec_point_formats)
|
||||
- Fix to not send OCSP stapling extensions in client_hello when not enabled
|
||||
- Added new API's for disabling OCSP stapling
|
||||
- Add check for SIZEOF_LONG with sun and LP64
|
||||
- Fixes for various TLS 1.3 disable options (RSA, ECC and ED/Curve 25519).
|
||||
- Fix to disallow upgrading to TLS v1.3
|
||||
- Fixes for wolfSSL_EVP_CipherFinal() when message size is a round multiple of a block size.
|
||||
- Add HMAC benchmark and expanded AES key size benchmarks
|
||||
- Added simple GCC ARM Makefile example
|
||||
- Add tests for 3072-bit RSA and DH.
|
||||
- Fixed DRAFT_18 define and fixed downgrading with TLS v1.3
|
||||
- Fixes to allow custom serial number during certificate generation
|
||||
- Add method to get WOLFSSL_CTX certificate manager
|
||||
- Improvement to `wolfSSL_SetOCSP_Cb` to allow context per WOLFSSL object
|
||||
- Alternate certificate chain support `WOLFSSL_ALT_CERT_CHAINS`. Enables checking cert against multiple CA's.
|
||||
- Added new `--disable-oldnames` option to allow for using openssl along-side wolfssl headers (without OPENSSL_EXTRA).
|
||||
- Refactor SSL_ and hashing types to use wolf specific prefix (WOLFSSL and WC_) to allow openssl coexistence.
|
||||
- Fixes for HAVE_INTEL_MULX
|
||||
- Cleanup include paths for MySQL cmake build
|
||||
- Added configure option for building library for wolfSSH (--enable-wolfssh)
|
||||
- Openssl compatibility layer improvements
|
||||
- Expanded API unit tests
|
||||
- Fixes for STM32 crypto hardware acceleration
|
||||
- Added AES XTS mode (--enable-xts)
|
||||
- Added ASN Extended Key Usage Support (see wc_SetExtKeyUsage).
|
||||
- Math updates and added TFM_MIPS speedup.
|
||||
- Fix for creation of the KeyUsage BitString
|
||||
- Fix for 8k keys with MySQL compatibility
|
||||
- Fixes for ATECC508A.
|
||||
- Fixes for PIC32MZ hashing.
|
||||
- Fixes and improvements to asynchronous modes for Intel QuickAssist and Cavium Nitrox V.
|
||||
- Update HASH_DRBG Reseed mechanism and add test case
|
||||
- Rename the file io.h/io.c to wolfio.h/wolfio.c
|
||||
- Cleanup the wolfIO_Send function.
|
||||
- OpenSSL Compatibility Additions and Fixes
|
||||
- Improvements to Visual Studio DLL project/solution.
|
||||
- Added function to generate public ECC key from private key
|
||||
- Added async blocking support for sniffer tool.
|
||||
- Added wolfCrypt hash tests for empty string and large data.
|
||||
- Added ability to use of wolf implementation of `strtok` using `USE_WOLF_STRTOK`.
|
||||
- Updated Micrium uC/OS-III Port
|
||||
- Updated root certs for OCSP scripts
|
||||
- New Single Precision math option for RSA, DH and ECC (off by default). See `--enable-sp`.
|
||||
- Speedups for AES GCM with AESNI (--enable-aesni)
|
||||
- Speedups for SHA2, ChaCha20/Poly1035 using AVX/AVX2
|
||||
|
||||
|
||||
********* wolfSSL (Formerly CyaSSL) Release 3.12.0 (8/04/2017)
|
||||
|
||||
Release 3.12.0 of wolfSSL has bug fixes and new features including:
|
||||
|
||||
53
README.md
53
README.md
@@ -38,6 +38,59 @@ wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
|
||||
before calling wolfSSL_new(); Though it's not recommended.
|
||||
```
|
||||
|
||||
# wolfSSL (Formerly CyaSSL) Release 3.12.2 (10/23/2017)
|
||||
|
||||
## Release 3.12.2 of wolfSSL has bug fixes and new features including:
|
||||
|
||||
This release includes many performance improvements with Intel ASM (AVX/AVX2) and AES-NI. New single precision math option to speedup RSA, DH and ECC. Embedded hardware support has been expanded for STM32, PIC32MZ and ATECC508A. AES now supports XTS mode for disk encryption. Certificate improvements for setting serial number, key usage and extended key usage. Refactor of SSL_ and hash types to allow openssl coexistence. Improvements for TLS 1.3. Fixes for OCSP stapling to allow disable and WOLFSSL specific user context for callbacks. Fixes for openssl and MySQL compatibility. Updated Micrium port. Fixes for asynchronous modes.
|
||||
|
||||
* Added TLS extension for Supported Point Formats (ec_point_formats)
|
||||
* Fix to not send OCSP stapling extensions in client_hello when not enabled
|
||||
* Added new API's for disabling OCSP stapling
|
||||
* Add check for SIZEOF_LONG with sun and LP64
|
||||
* Fixes for various TLS 1.3 disable options (RSA, ECC and ED/Curve 25519).
|
||||
* Fix to disallow upgrading to TLS v1.3
|
||||
* Fixes for wolfSSL_EVP_CipherFinal() when message size is a round multiple of a block size.
|
||||
* Add HMAC benchmark and expanded AES key size benchmarks
|
||||
* Added simple GCC ARM Makefile example
|
||||
* Add tests for 3072-bit RSA and DH.
|
||||
* Fixed DRAFT_18 define and fixed downgrading with TLS v1.3
|
||||
* Fixes to allow custom serial number during certificate generation
|
||||
* Add method to get WOLFSSL_CTX certificate manager
|
||||
* Improvement to `wolfSSL_SetOCSP_Cb` to allow context per WOLFSSL object
|
||||
* Alternate certificate chain support `WOLFSSL_ALT_CERT_CHAINS`. Enables checking cert against multiple CA's.
|
||||
* Added new `--disable-oldnames` option to allow for using openssl along-side wolfssl headers (without OPENSSL_EXTRA).
|
||||
* Refactor SSL_ and hashing types to use wolf specific prefix (WOLFSSL and WC_) to allow openssl coexistence.
|
||||
* Fixes for HAVE_INTEL_MULX
|
||||
* Cleanup include paths for MySQL cmake build
|
||||
* Added configure option for building library for wolfSSH (--enable-wolfssh)
|
||||
* Openssl compatibility layer improvements
|
||||
* Expanded API unit tests
|
||||
* Fixes for STM32 crypto hardware acceleration
|
||||
* Added AES XTS mode (--enable-xts)
|
||||
* Added ASN Extended Key Usage Support (see wc_SetExtKeyUsage).
|
||||
* Math updates and added TFM_MIPS speedup.
|
||||
* Fix for creation of the KeyUsage BitString
|
||||
* Fix for 8k keys with MySQL compatibility
|
||||
* Fixes for ATECC508A.
|
||||
* Fixes for PIC32MZ hashing.
|
||||
* Fixes and improvements to asynchronous modes for Intel QuickAssist and Cavium Nitrox V.
|
||||
* Update HASH_DRBG Reseed mechanism and add test case
|
||||
* Rename the file io.h/io.c to wolfio.h/wolfio.c
|
||||
* Cleanup the wolfIO_Send function.
|
||||
* OpenSSL Compatibility Additions and Fixes
|
||||
* Improvements to Visual Studio DLL project/solution.
|
||||
* Added function to generate public ECC key from private key
|
||||
* Added async blocking support for sniffer tool.
|
||||
* Added wolfCrypt hash tests for empty string and large data.
|
||||
* Added ability to use of wolf implementation of `strtok` using `USE_WOLF_STRTOK`.
|
||||
* Updated Micrium uC/OS-III Port
|
||||
* Updated root certs for OCSP scripts
|
||||
* New Single Precision math option for RSA, DH and ECC (off by default). See `--enable-sp`.
|
||||
* Speedups for AES GCM with AESNI (--enable-aesni)
|
||||
* Speedups for SHA2, ChaCha20/Poly1035 using AVX/AVX2
|
||||
|
||||
|
||||
# wolfSSL (Formerly CyaSSL) Release 3.12.0 (8/04/2017)
|
||||
|
||||
## Release 3.12.0 of wolfSSL has bug fixes and new features including:
|
||||
|
||||
BIN
certs/ca-ecc-cert.der
Executable file
BIN
certs/ca-ecc-cert.der
Executable file
Binary file not shown.
53
certs/ca-ecc-cert.pem
Executable file
53
certs/ca-ecc-cert.pem
Executable file
@@ -0,0 +1,53 @@
|
||||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number:
|
||||
97:b4:bd:16:78:f8:47:f2
|
||||
Signature Algorithm: ecdsa-with-SHA256
|
||||
Issuer: C=US, ST=Washington, L=Seattle, O=wolfSSL, OU=Development, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Validity
|
||||
Not Before: Oct 20 18:19:06 2017 GMT
|
||||
Not After : Oct 15 18:19:06 2037 GMT
|
||||
Subject: C=US, ST=Washington, L=Seattle, O=wolfSSL, OU=Development, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: id-ecPublicKey
|
||||
Public-Key: (256 bit)
|
||||
pub:
|
||||
04:02:d3:d9:6e:d6:01:8e:45:c8:b9:90:31:e5:c0:
|
||||
4c:e3:9e:ad:29:38:98:ba:10:d6:e9:09:2a:80:a9:
|
||||
2e:17:2a:b9:8a:bf:33:83:46:e3:95:0b:e4:77:40:
|
||||
b5:3b:43:45:33:0f:61:53:7c:37:44:c1:cb:fc:80:
|
||||
ca:e8:43:ea:a7
|
||||
ASN1 OID: prime256v1
|
||||
NIST CURVE: P-256
|
||||
X509v3 extensions:
|
||||
X509v3 Subject Key Identifier:
|
||||
56:8E:9A:C3:F0:42:DE:18:B9:45:55:6E:F9:93:CF:EA:C3:F3:A5:21
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:56:8E:9A:C3:F0:42:DE:18:B9:45:55:6E:F9:93:CF:EA:C3:F3:A5:21
|
||||
|
||||
X509v3 Basic Constraints: critical
|
||||
CA:TRUE
|
||||
X509v3 Key Usage: critical
|
||||
Digital Signature, Certificate Sign, CRL Sign
|
||||
Signature Algorithm: ecdsa-with-SHA256
|
||||
30:45:02:20:32:26:81:e4:15:ec:e3:aa:d3:e5:b8:2a:ca:a3:
|
||||
06:a7:04:97:d8:43:7f:d4:94:47:f8:18:0d:93:52:23:8b:08:
|
||||
02:21:00:e1:9e:34:d0:92:ee:56:0d:23:38:4a:20:bc:cf:11:
|
||||
c3:33:77:96:81:56:2b:ca:c4:d5:c6:65:5d:36:73:2f:ba
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICijCCAjCgAwIBAgIJAJe0vRZ4+EfyMAoGCCqGSM49BAMCMIGXMQswCQYDVQQG
|
||||
EwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEQMA4G
|
||||
A1UECgwHd29sZlNTTDEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxGDAWBgNVBAMMD3d3
|
||||
dy53b2xmc3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTAe
|
||||
Fw0xNzEwMjAxODE5MDZaFw0zNzEwMTUxODE5MDZaMIGXMQswCQYDVQQGEwJVUzET
|
||||
MBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEQMA4GA1UECgwH
|
||||
d29sZlNTTDEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxGDAWBgNVBAMMD3d3dy53b2xm
|
||||
c3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTBZMBMGByqG
|
||||
SM49AgEGCCqGSM49AwEHA0IABALT2W7WAY5FyLmQMeXATOOerSk4mLoQ1ukJKoCp
|
||||
LhcquYq/M4NG45UL5HdAtTtDRTMPYVN8N0TBy/yAyuhD6qejYzBhMB0GA1UdDgQW
|
||||
BBRWjprD8ELeGLlFVW75k8/qw/OlITAfBgNVHSMEGDAWgBRWjprD8ELeGLlFVW75
|
||||
k8/qw/OlITAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAKBggqhkjO
|
||||
PQQDAgNIADBFAiAyJoHkFezjqtPluCrKowanBJfYQ3/UlEf4GA2TUiOLCAIhAOGe
|
||||
NNCS7lYNIzhKILzPEcMzd5aBVivKxNXGZV02cy+6
|
||||
-----END CERTIFICATE-----
|
||||
BIN
certs/ca-ecc-key.der
Executable file
BIN
certs/ca-ecc-key.der
Executable file
Binary file not shown.
5
certs/ca-ecc-key.pem
Executable file
5
certs/ca-ecc-key.pem
Executable file
@@ -0,0 +1,5 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgAuEzmHeXrEpZbSib
|
||||
bqCTmwdxi01gY4WZ5rsWcOkK9oChRANCAAQC09lu1gGORci5kDHlwEzjnq0pOJi6
|
||||
ENbpCSqAqS4XKrmKvzODRuOVC+R3QLU7Q0UzD2FTfDdEwcv8gMroQ+qn
|
||||
-----END PRIVATE KEY-----
|
||||
BIN
certs/ca-ecc384-cert.der
Executable file
BIN
certs/ca-ecc384-cert.der
Executable file
Binary file not shown.
58
certs/ca-ecc384-cert.pem
Executable file
58
certs/ca-ecc384-cert.pem
Executable file
@@ -0,0 +1,58 @@
|
||||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number:
|
||||
f5:e1:8f:f1:4b:a6:83:8e
|
||||
Signature Algorithm: ecdsa-with-SHA384
|
||||
Issuer: C=US, ST=Washington, L=Seattle, O=wolfSSL, OU=Development, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Validity
|
||||
Not Before: Oct 20 18:19:06 2017 GMT
|
||||
Not After : Oct 15 18:19:06 2037 GMT
|
||||
Subject: C=US, ST=Washington, L=Seattle, O=wolfSSL, OU=Development, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: id-ecPublicKey
|
||||
Public-Key: (384 bit)
|
||||
pub:
|
||||
04:ee:82:d4:39:9a:b1:27:82:f4:d7:ea:c6:bc:03:
|
||||
1d:4d:83:61:f4:03:ae:7e:bd:d8:5a:a5:b9:f0:8e:
|
||||
a2:a5:da:ce:87:3b:5a:ab:44:16:9c:f5:9f:62:dd:
|
||||
f6:20:cd:9c:76:3c:40:b1:3f:97:17:df:59:f6:cd:
|
||||
de:cd:46:35:c0:ed:5e:2e:48:b6:66:91:71:74:b7:
|
||||
0c:3f:b9:9a:b7:83:bd:93:3f:5f:50:2d:70:3f:de:
|
||||
35:25:e1:90:3b:86:e0
|
||||
ASN1 OID: secp384r1
|
||||
NIST CURVE: P-384
|
||||
X509v3 extensions:
|
||||
X509v3 Subject Key Identifier:
|
||||
AB:E0:C3:26:4C:18:D4:72:BB:D2:84:8C:9C:0A:05:92:80:12:53:52
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:AB:E0:C3:26:4C:18:D4:72:BB:D2:84:8C:9C:0A:05:92:80:12:53:52
|
||||
|
||||
X509v3 Basic Constraints: critical
|
||||
CA:TRUE
|
||||
X509v3 Key Usage: critical
|
||||
Digital Signature, Certificate Sign, CRL Sign
|
||||
Signature Algorithm: ecdsa-with-SHA384
|
||||
30:65:02:30:17:dd:b9:a5:e0:ec:8a:03:8b:66:45:69:ad:5e:
|
||||
ad:32:bc:45:4c:89:85:3f:a1:dd:a4:74:4b:5d:08:65:1b:d8:
|
||||
07:00:49:5d:ef:10:fc:eb:8f:64:a8:62:99:88:20:59:02:31:
|
||||
00:94:40:64:29:86:d0:00:76:1c:98:23:9c:b7:9b:be:78:73:
|
||||
3a:88:be:52:00:3f:e3:81:36:d9:14:22:3d:9e:a2:8a:4a:56:
|
||||
9c:c4:3f:5f:88:2e:b1:a7:6c:4d:0e:cc:92
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICxzCCAk2gAwIBAgIJAPXhj/FLpoOOMAoGCCqGSM49BAMDMIGXMQswCQYDVQQG
|
||||
EwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEQMA4G
|
||||
A1UECgwHd29sZlNTTDEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxGDAWBgNVBAMMD3d3
|
||||
dy53b2xmc3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTAe
|
||||
Fw0xNzEwMjAxODE5MDZaFw0zNzEwMTUxODE5MDZaMIGXMQswCQYDVQQGEwJVUzET
|
||||
MBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEQMA4GA1UECgwH
|
||||
d29sZlNTTDEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxGDAWBgNVBAMMD3d3dy53b2xm
|
||||
c3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTB2MBAGByqG
|
||||
SM49AgEGBSuBBAAiA2IABO6C1DmasSeC9NfqxrwDHU2DYfQDrn692FqlufCOoqXa
|
||||
zoc7WqtEFpz1n2Ld9iDNnHY8QLE/lxffWfbN3s1GNcDtXi5ItmaRcXS3DD+5mreD
|
||||
vZM/X1AtcD/eNSXhkDuG4KNjMGEwHQYDVR0OBBYEFKvgwyZMGNRyu9KEjJwKBZKA
|
||||
ElNSMB8GA1UdIwQYMBaAFKvgwyZMGNRyu9KEjJwKBZKAElNSMA8GA1UdEwEB/wQF
|
||||
MAMBAf8wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMDA2gAMGUCMBfduaXg7IoD
|
||||
i2ZFaa1erTK8RUyJhT+h3aR0S10IZRvYBwBJXe8Q/OuPZKhimYggWQIxAJRAZCmG
|
||||
0AB2HJgjnLebvnhzOoi+UgA/44E22RQiPZ6iikpWnMQ/X4gusadsTQ7Mkg==
|
||||
-----END CERTIFICATE-----
|
||||
BIN
certs/ca-ecc384-key.der
Executable file
BIN
certs/ca-ecc384-key.der
Executable file
Binary file not shown.
6
certs/ca-ecc384-key.pem
Executable file
6
certs/ca-ecc384-key.pem
Executable file
@@ -0,0 +1,6 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDB7FuPW0oGUbIrdqHju
|
||||
x36zxdHbLvPtDkiFsfLhejlWwPFiEg81tzm8nCXAduv+VXChZANiAATugtQ5mrEn
|
||||
gvTX6sa8Ax1Ng2H0A65+vdhapbnwjqKl2s6HO1qrRBac9Z9i3fYgzZx2PECxP5cX
|
||||
31n2zd7NRjXA7V4uSLZmkXF0tww/uZq3g72TP19QLXA/3jUl4ZA7huA=
|
||||
-----END PRIVATE KEY-----
|
||||
108
certs/client-cert-3072.pem
Normal file
108
certs/client-cert-3072.pem
Normal file
@@ -0,0 +1,108 @@
|
||||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number:
|
||||
c9:72:2a:eb:e8:4a:47:e7
|
||||
Signature Algorithm: sha256WithRSAEncryption
|
||||
Issuer: C = US, ST = Montana, L = Bozeman, O = wolfSSL_3072, OU = Programming-3072, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
|
||||
Validity
|
||||
Not Before: Aug 11 05:14:40 2017 GMT
|
||||
Not After : May 7 05:14:40 2020 GMT
|
||||
Subject: C = US, ST = Montana, L = Bozeman, O = wolfSSL_3072, OU = Programming-3072, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
Public-Key: (3072 bit)
|
||||
Modulus:
|
||||
00:c1:00:b0:1a:0a:ba:88:03:cc:92:d6:f7:2e:0d:
|
||||
ad:be:60:f4:a4:53:a3:dc:f9:b6:48:6c:21:33:cf:
|
||||
7c:a0:c5:35:37:1a:5f:7e:65:33:07:b4:9a:d1:2e:
|
||||
b2:ed:35:a1:c8:67:b3:db:39:05:8d:aa:81:74:00:
|
||||
85:22:72:f8:7d:39:47:53:00:56:71:cf:82:d7:fc:
|
||||
a2:7d:a0:6e:10:a2:96:db:cc:8e:e4:2d:9d:9d:5b:
|
||||
4a:43:5e:cb:3d:48:72:af:f4:6a:da:34:2f:ed:99:
|
||||
c1:1b:fb:4c:56:8a:a0:66:8c:fb:5d:10:d5:5b:0f:
|
||||
96:04:d9:c5:b1:55:f5:88:76:db:d3:da:a1:dc:e9:
|
||||
ee:d1:67:dd:bf:54:50:07:ef:2f:79:fb:4e:59:2a:
|
||||
bf:92:0d:80:6f:7b:ec:79:65:9a:c3:08:c0:4f:c6:
|
||||
6b:33:bf:9d:4d:af:f9:83:af:25:42:4c:93:f1:9f:
|
||||
d6:33:7d:d4:85:2a:77:44:1d:1f:ca:d3:22:ab:69:
|
||||
50:35:d8:47:3e:f7:9c:a8:e3:f9:84:60:9e:36:10:
|
||||
02:5c:9c:1f:33:1c:e6:bb:d0:5f:28:63:27:4c:b5:
|
||||
1c:71:b3:f4:7a:33:aa:45:70:a9:54:88:70:07:0e:
|
||||
45:4f:b1:7f:2a:fd:bf:31:da:97:96:c8:55:49:f2:
|
||||
c3:b6:e6:08:78:ca:40:8b:2e:5d:8e:4e:6c:65:6b:
|
||||
57:f4:1d:ee:41:b6:ed:24:0d:38:f2:40:bd:7d:59:
|
||||
6b:c5:d6:67:e2:12:9b:10:05:fe:eb:40:1d:c5:73:
|
||||
75:ac:e9:9c:07:63:72:e4:c5:04:fe:c9:17:13:bf:
|
||||
04:02:0e:44:e9:9d:59:6e:7e:63:38:e6:db:31:21:
|
||||
28:5e:82:20:36:ad:26:fe:ba:6d:af:57:2e:32:aa:
|
||||
a6:2c:54:b4:25:50:11:ac:25:8b:84:1b:7b:5d:ae:
|
||||
df:e1:c4:32:3a:b4:60:6c:16:ef:9c:2c:a8:67:d0:
|
||||
53:f5:c8:97:9a:9e:81:25:e6:c7
|
||||
Exponent: 65537 (0x10001)
|
||||
X509v3 extensions:
|
||||
X509v3 Subject Key Identifier:
|
||||
FA:B8:8A:0E:1D:E7:2B:22:BA:2D:F4:54:DD:7E:D4:63:8A:AB:E7:95
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:FA:B8:8A:0E:1D:E7:2B:22:BA:2D:F4:54:DD:7E:D4:63:8A:AB:E7:95
|
||||
DirName:/C=US/ST=Montana/L=Bozeman/O=wolfSSL_3072/OU=Programming-3072/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
serial:C9:72:2A:EB:E8:4A:47:E7
|
||||
|
||||
X509v3 Basic Constraints:
|
||||
CA:TRUE
|
||||
Signature Algorithm: sha256WithRSAEncryption
|
||||
b3:20:83:3d:56:e2:b9:a6:8f:a9:46:fe:ad:9f:c7:d5:e2:dc:
|
||||
db:78:1e:4c:ca:d5:bd:38:5d:20:bc:18:f9:a0:33:7e:09:df:
|
||||
89:61:15:85:6d:80:78:3d:b4:6b:30:e6:f3:8a:8f:b2:5d:a0:
|
||||
6b:41:51:24:1c:4c:5e:db:0d:af:6d:56:12:1b:91:01:ed:0e:
|
||||
1c:1a:15:95:8f:99:1f:7f:e7:65:e7:0a:fe:24:0c:e0:a1:1f:
|
||||
16:7f:55:2e:48:98:97:3f:98:a7:90:1f:20:ec:b6:16:fa:2a:
|
||||
d2:91:3a:5f:83:df:cd:a3:51:37:19:69:c3:be:c9:35:bb:32:
|
||||
47:e9:e5:30:1f:cd:27:ac:4d:05:31:d9:06:33:5c:6e:f5:bb:
|
||||
22:b6:7c:68:3d:82:f2:c0:2e:00:34:d9:ed:ba:fc:f5:39:04:
|
||||
53:32:b7:bb:ff:c6:a1:bc:50:8e:d5:43:b6:48:07:8b:3d:47:
|
||||
4a:f7:22:f1:c3:4d:3d:db:d4:ca:e6:77:4d:94:7c:79:36:df:
|
||||
81:de:a7:fc:24:0e:7c:ec:72:2e:4d:b2:dc:7c:93:98:29:62:
|
||||
8b:67:0a:dd:c5:2f:ea:e1:b0:1d:d2:9d:91:74:30:3f:14:10:
|
||||
03:95:36:1b:02:2a:84:22:51:fa:26:fb:a4:a7:a7:d0:3f:12:
|
||||
0d:bc:14:c8:cd:60:a1:53:44:e3:5b:7a:63:ee:3e:50:f8:4a:
|
||||
ea:0a:2e:c2:9d:69:0c:4b:c6:ea:cd:b2:0d:d0:de:13:09:c9:
|
||||
f9:d5:7c:e4:f4:b1:55:8f:59:9e:86:b9:51:77:ad:35:06:35:
|
||||
fa:2c:76:06:41:b9:21:13:dd:94:02:34:66:e0:21:86:8e:08:
|
||||
9d:06:71:f2:bc:c3:34:10:ff:3d:d4:0c:70:8a:3c:bb:8a:ea:
|
||||
af:a1:b3:63:78:95:e4:c8:54:3c:87:c5:b4:97:7a:19:a3:59:
|
||||
75:ac:d6:5b:48:47:55:e8:24:20:fa:e8:2b:66:5d:6a:17:47:
|
||||
ce:38:93:a7:d1:ed
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFyjCCBDKgAwIBAgIJAMlyKuvoSkfnMA0GCSqGSIb3DQEBCwUAMIGeMQswCQYD
|
||||
VQQGEwJVUzEQMA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjEVMBMG
|
||||
A1UECgwMd29sZlNTTF8zMDcyMRkwFwYDVQQLDBBQcm9ncmFtbWluZy0zMDcyMRgw
|
||||
FgYDVQQDDA93d3cud29sZnNzbC5jb20xHzAdBgkqhkiG9w0BCQEWEGluZm9Ad29s
|
||||
ZnNzbC5jb20wHhcNMTcwODExMDUxNDQwWhcNMjAwNTA3MDUxNDQwWjCBnjELMAkG
|
||||
A1UEBhMCVVMxEDAOBgNVBAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xFTAT
|
||||
BgNVBAoMDHdvbGZTU0xfMzA3MjEZMBcGA1UECwwQUHJvZ3JhbW1pbmctMzA3MjEY
|
||||
MBYGA1UEAwwPd3d3LndvbGZzc2wuY29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdv
|
||||
bGZzc2wuY29tMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAwQCwGgq6
|
||||
iAPMktb3Lg2tvmD0pFOj3Pm2SGwhM898oMU1NxpffmUzB7Sa0S6y7TWhyGez2zkF
|
||||
jaqBdACFInL4fTlHUwBWcc+C1/yifaBuEKKW28yO5C2dnVtKQ17LPUhyr/Rq2jQv
|
||||
7ZnBG/tMVoqgZoz7XRDVWw+WBNnFsVX1iHbb09qh3Onu0Wfdv1RQB+8veftOWSq/
|
||||
kg2Ab3vseWWawwjAT8ZrM7+dTa/5g68lQkyT8Z/WM33UhSp3RB0fytMiq2lQNdhH
|
||||
PvecqOP5hGCeNhACXJwfMxzmu9BfKGMnTLUccbP0ejOqRXCpVIhwBw5FT7F/Kv2/
|
||||
MdqXlshVSfLDtuYIeMpAiy5djk5sZWtX9B3uQbbtJA048kC9fVlrxdZn4hKbEAX+
|
||||
60AdxXN1rOmcB2Ny5MUE/skXE78EAg5E6Z1Zbn5jOObbMSEoXoIgNq0m/rptr1cu
|
||||
MqqmLFS0JVARrCWLhBt7Xa7f4cQyOrRgbBbvnCyoZ9BT9ciXmp6BJebHAgMBAAGj
|
||||
ggEHMIIBAzAdBgNVHQ4EFgQU+riKDh3nKyK6LfRU3X7UY4qr55UwgdMGA1UdIwSB
|
||||
yzCByIAU+riKDh3nKyK6LfRU3X7UY4qr55WhgaSkgaEwgZ4xCzAJBgNVBAYTAlVT
|
||||
MRAwDgYDVQQIDAdNb250YW5hMRAwDgYDVQQHDAdCb3plbWFuMRUwEwYDVQQKDAx3
|
||||
b2xmU1NMXzMwNzIxGTAXBgNVBAsMEFByb2dyYW1taW5nLTMwNzIxGDAWBgNVBAMM
|
||||
D3d3dy53b2xmc3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNv
|
||||
bYIJAMlyKuvoSkfnMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggGBALMg
|
||||
gz1W4rmmj6lG/q2fx9Xi3Nt4HkzK1b04XSC8GPmgM34J34lhFYVtgHg9tGsw5vOK
|
||||
j7JdoGtBUSQcTF7bDa9tVhIbkQHtDhwaFZWPmR9/52XnCv4kDOChHxZ/VS5ImJc/
|
||||
mKeQHyDsthb6KtKROl+D382jUTcZacO+yTW7Mkfp5TAfzSesTQUx2QYzXG71uyK2
|
||||
fGg9gvLALgA02e26/PU5BFMyt7v/xqG8UI7VQ7ZIB4s9R0r3IvHDTT3b1Mrmd02U
|
||||
fHk234Hep/wkDnzsci5Nstx8k5gpYotnCt3FL+rhsB3SnZF0MD8UEAOVNhsCKoQi
|
||||
Ufom+6Snp9A/Eg28FMjNYKFTRONbemPuPlD4SuoKLsKdaQxLxurNsg3Q3hMJyfnV
|
||||
fOT0sVWPWZ6GuVF3rTUGNfosdgZBuSET3ZQCNGbgIYaOCJ0GcfK8wzQQ/z3UDHCK
|
||||
PLuK6q+hs2N4leTIVDyHxbSXehmjWXWs1ltIR1XoJCD66CtmXWoXR844k6fR7Q==
|
||||
-----END CERTIFICATE-----
|
||||
40
certs/client-key-3072.pem
Normal file
40
certs/client-key-3072.pem
Normal file
@@ -0,0 +1,40 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIG/wIBADANBgkqhkiG9w0BAQEFAASCBukwggblAgEAAoIBgQDBALAaCrqIA8yS
|
||||
1vcuDa2+YPSkU6Pc+bZIbCEzz3ygxTU3Gl9+ZTMHtJrRLrLtNaHIZ7PbOQWNqoF0
|
||||
AIUicvh9OUdTAFZxz4LX/KJ9oG4QopbbzI7kLZ2dW0pDXss9SHKv9GraNC/tmcEb
|
||||
+0xWiqBmjPtdENVbD5YE2cWxVfWIdtvT2qHc6e7RZ92/VFAH7y95+05ZKr+SDYBv
|
||||
e+x5ZZrDCMBPxmszv51Nr/mDryVCTJPxn9YzfdSFKndEHR/K0yKraVA12Ec+95yo
|
||||
4/mEYJ42EAJcnB8zHOa70F8oYydMtRxxs/R6M6pFcKlUiHAHDkVPsX8q/b8x2peW
|
||||
yFVJ8sO25gh4ykCLLl2OTmxla1f0He5Btu0kDTjyQL19WWvF1mfiEpsQBf7rQB3F
|
||||
c3Ws6ZwHY3LkxQT+yRcTvwQCDkTpnVlufmM45tsxIShegiA2rSb+um2vVy4yqqYs
|
||||
VLQlUBGsJYuEG3tdrt/hxDI6tGBsFu+cLKhn0FP1yJeanoEl5scCAwEAAQKCAYA4
|
||||
2WMFyLM47SWM+xTD0/OhaB2naZuSs1sl6fO9txgWowARwwrtyBFH68LOatr5VBrb
|
||||
VPB9WkZwfBC1gpG0m/jlqcGAiVDtJRp9VETojCDfdYTKKW7Nd0I93234eiuTWYuu
|
||||
mGgA7e5QJkHjZBoQQ7ULf+tqdlLiB61AsISyv4cbMyd9N6EF2UInHFkMymDodWOe
|
||||
oo9pZFYZRzDVpcL53xu+5wz+couRKpfDElqEl0p6ROQu/82wTRgUQXXv8kQzEg1Z
|
||||
Ccm9D66IPLHviG19utUSNll2Fq3i7V88It+NFzBp4yzNvoXOiUFWwDoqHUve2ifV
|
||||
UDKITEE8Zh3Cm/UGdbNk+lkMOu5tmE0l1tOe2F+9RAjB1SnN8qxMqgMnmftEKYja
|
||||
3Do9feU0H2ZmKfK6dfECB7NsuVg9mI66Dew0rjQJ0oRG1+qqvPgHROcVnMBMmeU1
|
||||
bsF2yV2RWCc/4RFuAEi0VM2SgYOst5Voa+Os15rFxZ3APC+FqDmzYyyKVfXpgMEC
|
||||
gcEA7NuwxVGiseKGVZXG1/JJm86hCNkyAFMx1soGQDXyCZfTKFTwuJr+rImkOLnj
|
||||
J8i5cGa8v8E8obH/bMeM6hI8qsJ5jr1yHluZBGOy+VNmeV1pCLpCeXF/enn9gTq4
|
||||
m+X6SCxCn/SQdnr1Z5HT9yTcsWSzKk+T7uVKCZomfmBJyK3hhYsUsCaE0eQjgGfm
|
||||
yY/HKFVni/wmYLxnDwrMNtIK6aBA3cRrUr8MG8DZDVdourXMUo+G61kEaAV2Wu2R
|
||||
QrEzAoHBANCZrjOcPOZ5ojRmvqIiwX39U5Ucu9gkYvi63fJgzUcZKoH67D4pK1T7
|
||||
lvQ93hVnno0tKW16+lUS7EkQs4xmSPK07jQn0xYOkTcBnu4b/lkSIaFouecFd+ls
|
||||
XKlMz9VR91s89Hnuz0qXL7gpO2D9/bfonAXTsQyyTgNK3opwA4J0AKT+9PUTehGe
|
||||
pT7OtupGMh7osuNzX7v/9L5VBz24ZOiI35yypOnK/DHJDKzXnXGBxHhEwmdAQe0T
|
||||
BKMQ8nDcHQKBwQDCdCpQFJFpUPvQT8KLj1J3I9B5Hzc5pROJrxoqpR8sWQT2W6W1
|
||||
KSpkJCw6lgGzq8rySKY1F0Pby/JTMBC0Kny8BCUf1tBVtAWP4PoSTzIV+WY90Ay6
|
||||
/z8VIgnJipf9BXXQwuV/xJzFaHUIrmRCxnSY/n9JAUQGISADehaYMhzhMD+yD1jQ
|
||||
tQ7d8lpjFOoYGH380wDLoBsx1/sUEl1NtGtZGkOmzZb+u/II5u5LUbOddZtlPIgb
|
||||
t10yuSlNxTQ4eJkCgcEAgxbg23wm5Wuw3J9o03lmAWgOe5mIDqenLso4KlZdCn4t
|
||||
MWvfxJyYp5pH3gt3IhpxECU+cJek84ulw7DkNKoe06+SNmKEi8rxxRCWsOoUqCL1
|
||||
0Xp/wUe1eJJplNc5kMQm30ZqGKpTyHtEOMZok2ZqaIWcbyj+jY0L65PEUFleSz/d
|
||||
G9NBWzY3MxVwoQzE9GrSmov/x2I82mdahbXnjAjyGRPS+qVlb6rpW9wNxBzny2oS
|
||||
bsY/KSW/iF24P0WqJfSdAoHBAMrAqYYkbFVboqKXci8ngzrBIPTweUaQetseywd3
|
||||
EsBoCuIub/zOHrXPyEHpQpsWBoyCs7/wFy+e2E8qWJ9GBqVaUdpO1PQbgDBTg3C4
|
||||
lx91pXJ9wHFFMX7evHYLFLLce6ofhrRDch97aFvdDP0dB7fh32FRUyJzPQwVXOcL
|
||||
OEyaN2q+5mTLVIohiiryb6SmsD2qbAzym32/826Fku2zwX8j2xdCP/AkdnIPz/L0
|
||||
H3pgMZYSzYmd0dbSva225DqVew==
|
||||
-----END PRIVATE KEY-----
|
||||
30
certs/crl/caEcc384Crl.pem
Executable file
30
certs/crl/caEcc384Crl.pem
Executable file
@@ -0,0 +1,30 @@
|
||||
Certificate Revocation List (CRL):
|
||||
Version 2 (0x1)
|
||||
Signature Algorithm: ecdsa-with-SHA256
|
||||
Issuer: /C=US/ST=Washington/L=Seattle/O=wolfSSL/OU=Development/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Last Update: Oct 20 18:19:08 2017 GMT
|
||||
Next Update: Jul 16 18:19:08 2020 GMT
|
||||
CRL extensions:
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:AB:E0:C3:26:4C:18:D4:72:BB:D2:84:8C:9C:0A:05:92:80:12:53:52
|
||||
|
||||
X509v3 CRL Number:
|
||||
8193
|
||||
No Revoked Certificates.
|
||||
Signature Algorithm: ecdsa-with-SHA256
|
||||
30:65:02:31:00:ad:70:4b:08:03:b6:ab:d4:9e:8d:dd:2a:05:
|
||||
ec:07:6b:86:61:08:69:08:1e:01:02:42:22:5f:a9:6d:4f:de:
|
||||
20:6b:aa:a0:8f:e4:0a:8e:40:7c:cf:84:fb:10:50:01:90:02:
|
||||
30:50:35:d3:6c:44:bd:ad:56:9d:3e:47:09:ac:b8:0d:db:5c:
|
||||
54:f2:1c:25:fb:d2:cb:63:2b:9e:17:a3:1e:0b:ba:15:a8:65:
|
||||
7e:5b:94:c0:11:f4:e2:c9:f1:25:ba:08:26
|
||||
-----BEGIN X509 CRL-----
|
||||
MIIBcjCB+QIBATAKBggqhkjOPQQDAjCBlzELMAkGA1UEBhMCVVMxEzARBgNVBAgM
|
||||
Cldhc2hpbmd0b24xEDAOBgNVBAcMB1NlYXR0bGUxEDAOBgNVBAoMB3dvbGZTU0wx
|
||||
FDASBgNVBAsMC0RldmVsb3BtZW50MRgwFgYDVQQDDA93d3cud29sZnNzbC5jb20x
|
||||
HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTE3MTAyMDE4MTkwOFoX
|
||||
DTIwMDcxNjE4MTkwOFqgMDAuMB8GA1UdIwQYMBaAFKvgwyZMGNRyu9KEjJwKBZKA
|
||||
ElNSMAsGA1UdFAQEAgIgATAKBggqhkjOPQQDAgNoADBlAjEArXBLCAO2q9Sejd0q
|
||||
BewHa4ZhCGkIHgECQiJfqW1P3iBrqqCP5AqOQHzPhPsQUAGQAjBQNdNsRL2tVp0+
|
||||
RwmsuA3bXFTyHCX70stjK54Xox4LuhWoZX5blMAR9OLJ8SW6CCY=
|
||||
-----END X509 CRL-----
|
||||
28
certs/crl/caEccCrl.pem
Executable file
28
certs/crl/caEccCrl.pem
Executable file
@@ -0,0 +1,28 @@
|
||||
Certificate Revocation List (CRL):
|
||||
Version 2 (0x1)
|
||||
Signature Algorithm: ecdsa-with-SHA256
|
||||
Issuer: /C=US/ST=Washington/L=Seattle/O=wolfSSL/OU=Development/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Last Update: Oct 20 18:19:08 2017 GMT
|
||||
Next Update: Jul 16 18:19:08 2020 GMT
|
||||
CRL extensions:
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:56:8E:9A:C3:F0:42:DE:18:B9:45:55:6E:F9:93:CF:EA:C3:F3:A5:21
|
||||
|
||||
X509v3 CRL Number:
|
||||
8192
|
||||
No Revoked Certificates.
|
||||
Signature Algorithm: ecdsa-with-SHA256
|
||||
30:45:02:20:51:84:45:49:4b:69:3a:e0:84:d2:9c:e4:62:c9:
|
||||
4c:30:83:ba:3e:5a:f6:ea:2c:54:50:17:26:4d:fc:82:5f:d2:
|
||||
02:21:00:e5:6b:a6:1c:e3:83:07:cd:59:04:66:00:a0:76:77:
|
||||
11:d8:82:76:fd:a9:2d:cc:3a:db:3a:0f:b5:1a:a6:f3:a8
|
||||
-----BEGIN X509 CRL-----
|
||||
MIIBUjCB+QIBATAKBggqhkjOPQQDAjCBlzELMAkGA1UEBhMCVVMxEzARBgNVBAgM
|
||||
Cldhc2hpbmd0b24xEDAOBgNVBAcMB1NlYXR0bGUxEDAOBgNVBAoMB3dvbGZTU0wx
|
||||
FDASBgNVBAsMC0RldmVsb3BtZW50MRgwFgYDVQQDDA93d3cud29sZnNzbC5jb20x
|
||||
HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTE3MTAyMDE4MTkwOFoX
|
||||
DTIwMDcxNjE4MTkwOFqgMDAuMB8GA1UdIwQYMBaAFFaOmsPwQt4YuUVVbvmTz+rD
|
||||
86UhMAsGA1UdFAQEAgIgADAKBggqhkjOPQQDAgNIADBFAiBRhEVJS2k64ITSnORi
|
||||
yUwwg7o+WvbqLFRQFyZN/IJf0gIhAOVrphzjgwfNWQRmAKB2dxHYgnb9qS3MOts6
|
||||
D7UapvOo
|
||||
-----END X509 CRL-----
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user