Compare commits

...

487 Commits

Author SHA1 Message Date
David Garske
249306f08c Merge pull request #1978 from ejohnstown/dot-release
touch version for interstitial release
2018-12-13 10:27:41 -08:00
toddouska
3e326aba15 Merge pull request #1973 from SparkiDev/tls13_max_ticket_nonce_sz
Increase maximum ticket nonce size to 8
2018-12-12 15:00:57 -08:00
toddouska
70cb4dcdb1 Merge pull request #1972 from SparkiDev/tls13_alpn
ALPN is returned in ServerHello even in TLS 1.3
2018-12-12 14:59:59 -08:00
toddouska
fb68b3a450 Merge pull request #1970 from cconlon/yoctoinstall
Add Yocto Project / OpenEmbedded build instructions to INSTALL file
2018-12-12 14:53:44 -08:00
toddouska
122114b840 Merge pull request #1969 from dgarske/atecc508a_fixes
Fixes for ATECC508A/ATECC608A and latest CryptoAuthLib
2018-12-12 14:53:12 -08:00
toddouska
2ef8be2718 Merge pull request #1968 from dgarske/fixes_stm32cube_aes
Fixes for STM32 AES GCM crypto hardware acceleration
2018-12-12 14:52:35 -08:00
toddouska
bdf447cec9 Merge pull request #1966 from cconlon/wctestbench
add define to use test/benchmark.h without path prefix
2018-12-12 14:50:32 -08:00
toddouska
3f7ced3ed5 Merge pull request #1960 from SparkiDev/sp_rsavfy
Allow a very small build based on SHA-256 and RSA verify
2018-12-12 14:49:42 -08:00
David Garske
8772b5dc51 Merge pull request #1976 from embhorn/test_fix
Fix failing nightly tests
2018-12-12 12:07:01 -08:00
John Safranek
eef48cd8a2 touch version for interstitial release 2018-12-12 11:49:32 -08:00
Eric Blankenhorn
cbc8f4ce38 Fix failing nightly tests 2018-12-12 09:48:34 -06:00
Sean Parkinson
d8adca91b3 Increase maximum ticket nonce size to 8
There is a TLS 1.3 server implementation that uses 8 bytes.
2018-12-12 09:56:05 +10:00
David Garske
c7b0aac47a Merge pull request #1964 from embhorn/codecov
Code coverage tests and fixes
2018-12-11 15:08:56 -08:00
Eric Blankenhorn
195b995bc4 Fixes from review 2018-12-11 12:19:45 -06:00
Eric Blankenhorn
dc104985c3 Fixes from review 2018-12-11 11:41:39 -06:00
Eric Blankenhorn
59bfead3c8 Fixes from review 2018-12-11 11:30:13 -06:00
Eric Blankenhorn
1c0fa6fb58 Code coverage tests and fixes - default config 2018-12-11 08:56:21 -06:00
Sean Parkinson
c844b1c253 ALPN is returned in ServerHello when downgrading from TLS 1.3
TLS 1.3 Specification has extension returned in EncryptedExtensions.
2018-12-11 19:01:49 +10:00
Chris Conlon
a484749f4c Merge pull request #1965 from ejohnstown/vx-mg-updates
VxWorks/Mongoose Updates
2018-12-10 15:56:33 -08:00
Chris Conlon
06d6b06928 add Yocto Project / OpenEmbedded build instructions to INSTALL file 2018-12-10 16:48:14 -07:00
David Garske
a936c609f3 Fixes for ATECC508A/608A CryptoAuthLib demo. 2018-12-10 11:40:37 -08:00
David Garske
7e0e512a5c Minor build fixes for CryptoAuthLib with ATECC508A or ATECC608A. 2018-12-10 11:40:37 -08:00
David Garske
6552455968 Minor improvements to the STM32 CubeMX AES-GCM logic. 2018-12-10 11:40:06 -08:00
John Safranek
c7ffdc8b0b VxWorks Update
1. Replace the WOLFSSL_PTHREADS option for VxWorks builds, but comment it out.
2. Added a comment about using the pthreads wrappers for mutexes in VxWorks.
2018-12-10 11:28:32 -08:00
John Safranek
dc82beea4e Mongoose Update
1. Add a couple more OpenSSL compatibility layer functions to the the HAVE_WEBSERVER option.
2018-12-10 11:28:32 -08:00
John Safranek
bc4150af2c Mongoose Update
1. HAVE_WEBSERVER option turns on a couple more functions that MG is
using for client side authentication.
2. If using webserver, those functions return and error.
2018-12-10 11:28:32 -08:00
John Safranek
70d345eda0 VxWorks Update
1. Remove pthreads enable from VxWorks build.
2. Add mutex wrappers for native VxWorks mutex semaphores.
2018-12-10 11:28:32 -08:00
Sean Parkinson
2208514c98 Merge pull request #1962 from dgarske/fix_fe25519_noavx2
Fix for Intel Speedups with no AVX2 (part 2)
2018-12-10 17:17:42 +10:00
Sean Parkinson
fb41510f12 Fixup for compiling verify only inline for PPC using GCC 2018-12-10 11:52:10 +10:00
Sean Parkinson
c122f6082f Allow a very small build based on SHA-256 and RSA verify 2018-12-10 08:48:01 +10:00
David Garske
e4f60dc894 Merge pull request #1967 from kojo1/ShadowGlobal
Shadowed global: min in misc.c
2018-12-08 09:20:56 -08:00
David Garske
0a725f4d56 Fixes for AES with STM32 crypto hardware:
* Fixes to ensure the "const" input buffer is not modified for AES GCM calls with STM32 hardware crypto.
* Improvements to allow AES GCM hardware acceleration for inputs that are not a multiple of AES block size.
* Switched the wolfCrypt test for STM32_CRYPTO to use the standard AES GCM tests with 12-byte IV and less than 16-byte auth data.
* Fixes for building with the standard peripheral library.
* Fixes for building with `NO_AES_DECRYPT`.
`./configure --enable-debug --disable-shared --enable-cryptonly CFLAGS="-DNO_AES_DECRYPT"`
2018-12-07 17:23:38 -08:00
Takashi Kojo
8f3b05dd33 Shadowed global: min in misc.c 2018-12-08 09:40:31 +09:00
David Garske
43bc0233cb Merge pull request #1963 from SparkiDev/ct_signed
GCC ARM compiler requires explicit signed declaration
2018-12-07 16:32:09 -08:00
Chris Conlon
d662291b3d add define to use test/benchmark.h without path prefix 2018-12-07 10:27:51 -07:00
Sean Parkinson
fe8080ce4a GCC ARM compiler requires explicit signed declaration 2018-12-07 15:01:18 +10:00
Sean Parkinson
0259178033 Merge pull request #1961 from kaleb-himes/ZD4553-MAINTENANCE
Test adjustments for testing with nginx in FIPS mode
2018-12-07 09:29:47 +10:00
David Garske
14c43959f0 Fixes for Curve25519 FE math build error with Intel Speedups enabled and no AVX2. These changes should have been part of PR #1958 and were missed. 2018-12-06 12:40:06 -08:00
kaleb-himes
7048efb5fa Test adjustments for testing with nginx in FIPS mode 2018-12-06 13:02:58 -07:00
toddouska
6dfc723961 Merge pull request #1959 from SparkiDev/tls13_ems_down
Send EMS extension in ClientHello when downgradable from TLSv1.3
2018-12-06 07:42:55 -08:00
David Garske
d6ebd2d832 Merge pull request #1950 from SparkiDev/rsa_unpad
Make RsaUnPad constant time when Block Type 2 message
2018-12-06 06:08:15 -08:00
Sean Parkinson
f468e7f0b6 Merge pull request #1958 from dgarske/fix_fe25519_noavx2
Fix for Intel Speedups with no AVX2
2018-12-06 10:44:12 +10:00
Sean Parkinson
1d5b99eecc Send EMS extension in ClientHello when downgradable from TLSv1.3 2018-12-06 09:41:22 +10:00
Sean Parkinson
8aa54e5453 Merge pull request #1956 from cconlon/selftestfix
CAVP selftest fix for wc_RsaPSS_CheckPadding_ex() in test.c
2018-12-06 09:12:59 +10:00
Sean Parkinson
ab03f9291b Make RsaUnPad constant time when Block Type 2 message 2018-12-06 08:36:49 +10:00
David Garske
8355dd29cb Fix for Curve25519 FE math build error with Intel Speedups enabled and no AVX2. Fixes to allow forcing NO_AVX2_SUPPORT. Reproducible with ./configure --enable-curve25519 --enable-ed25519 --enable-intelasm CFLAGS="-DNO_AVX2_SUPPORT". 2018-12-05 13:04:30 -08:00
toddouska
74eadf556e Merge pull request #1946 from ejohnstown/dh-speedup
DHE Speed Up
2018-12-05 12:22:21 -08:00
toddouska
dfcfbc885d Merge pull request #1955 from JacobBarthelmeh/Testing
add mynewt_port.c to make dist
2018-12-05 10:39:02 -08:00
toddouska
ac0f71f4c4 Merge pull request #1954 from JacobBarthelmeh/DH
remove restriction on max key size with wolfSSL_DH_generate_key
2018-12-05 10:38:31 -08:00
toddouska
cc93c43a52 Merge pull request #1953 from dgarske/qat2
Fixes for building with the latest QuickAssist v1.7 driver
2018-12-05 10:37:45 -08:00
toddouska
68e1091627 Merge pull request #1952 from cconlon/cmstestfix
Fix for PKCS7 unit test with AES disabled
2018-12-05 10:36:52 -08:00
Chris Conlon
ecdb27289c Merge pull request #1951 from ejohnstown/ios-bench-touchup
Touch Up iOS Project
2018-12-05 08:08:39 -08:00
Jacob Barthelmeh
f4831b9fbb add mynewt_port.c to make dist 2018-12-04 16:45:30 -07:00
John Safranek
188a15428d Touch Up iOS Project
1. Remove the file async.c from the iOS Benchmark project.
2. Update the organization name in the Benchmark project to "wolfSSL Inc".
3. In the workspace project, change the path to the wolfSSL test to be a local relative path rather than an absolute path.
4. In the workspace project, remove the benchmark project and re-add it. It becomes a local relative reference with the correct name.
2018-12-04 15:29:41 -08:00
Jacob Barthelmeh
d90e66da80 remove restriction on max key size with wolfSSL_DH_generate_key 2018-12-04 16:20:31 -07:00
Chris Conlon
60a424d4e9 CAVP selftest fix for wc_RsaPSS_CheckPadding_ex() in test.c 2018-12-04 15:19:08 -08:00
David Garske
ec1bd3951e Fixes for building with the latest QuickAssist v1.7 driver:
* Updated `--with-intelqa=` to support detection of QAT driver version and use different .so libs.
* Added include and lib reference for new libusdm.
* Added `QAT_ENABLE_RNG` option.
* Fix for dynamic type spelling error (`DYNAMIC_TYPE_SYMETRIC_KEY` -> `DYNAMIC_TYPE_SYMMETRIC_KEY`).
* Fix benchmark output to use "took" not "tooks".
2018-12-04 12:54:11 -08:00
John Safranek
a47e08c49e DHE Speed Up
1. Add missing "-2" flags to the last line of most of the test conf files.
2018-12-04 12:04:12 -08:00
John Safranek
6254062438 Merge pull request #1948 from dgarske/fix_fips
Fix missing fips.h error
2018-12-04 11:32:37 -08:00
John Safranek
fa0b4cd2d5 DHE Speed Up
1. Modify all the test configuration files to disable the DHE prime test.
2. Add a test configuration that tests three cipher suites with the DHE prime test enabled.
2018-12-03 15:15:30 -08:00
John Safranek
a55f11cdd8 DHE Speed Up
1. Also apply the setting to the client side.
2. Updated the server and client command line options to use "-2" for disabling the DHE check.
2018-12-03 13:56:14 -08:00
Chris Conlon
4995051081 Merge pull request #1947 from miyazakh/fix_uninitialize_vars
Fixed uninitialized vars
2018-12-03 11:16:42 -08:00
Chris Conlon
9bda19fd25 fix for PKCS7 KEKRI array bounds check warning on gcc 8.2.0 2018-12-03 11:15:33 -08:00
Chris Conlon
28dc1cbb67 fix unit test for PKCS#7 with AES disabled 2018-12-03 12:00:04 -07:00
John Safranek
f74fb84337 Touch Up iOS Project
1. Fix iOS Benchmark reference to the async.c file.
2. Fix iOS Benchmark reference to the sp.c file. Changed to spr_c64.c.
3. Removed misc.c from iOS Benchmark as it is using inlined misc.h.
4. Added define of HAVE___UINT128_T to the user_settings.h so the
benchmark would build.
5. Wrapped the benchmark usage strings in NO_MAIN_DRIVER.
2018-12-03 10:38:56 -08:00
Hideki Miyazaki
ea769bcf38 Fixed uninitialized vars 2018-12-01 10:13:00 +09:00
David Garske
bdfa0e1745 Reapplying fix from PR #1423. Fixes issue #1415 (again). 2018-11-30 14:32:55 -08:00
John Safranek
564a1ee499 Make the skip DH test flag build-conditional. 2018-11-30 09:19:11 -08:00
Chris Conlon
34d8437a2e Merge pull request #1944 from ejohnstown/ios-touchup
Touch Up iOS Project for FIPS
2018-11-30 08:57:54 -08:00
John Safranek
ff1a1dc5d5 DHE Speed Up
When loading DH domain parameters into a CTX, test the prime
immediately. When loading them into a session, test the prime right
before using it during the handshake. Sessions that get their prime from
their context do not need to test their prime. Added a function to
disable testing the prime in a session. The goal is to speed up testing
as every single test case loads DH parameters whether they are used or
not.
2018-11-29 17:04:04 -08:00
Chris Conlon
2c48553a29 Merge pull request #1936 from kojo1/multi-byte
NO_MULTIBYTE option
2018-11-29 13:16:10 -08:00
Chris Conlon
bea93e9159 Merge pull request #1943 from abrahamsonn/doxygen-update
Doxygen update
2018-11-29 13:06:21 -08:00
John Safranek
af0bb278a1 Touch Up iOS Project
1. Updated a config item regarding the order of searching headers to the current recommendation from Apple.
2. Added the define flag CYASSL_USER_SETTINGS to the FIPS project so the user settings are loaded into the FIPS files.
2018-11-29 12:46:39 -08:00
abrahamsonn
48252524dc Merge branch 'master' of https://github.com/wolfssl/wolfssl into doxygen-update 2018-11-29 10:16:33 -07:00
abrahamsonn
1b5ac2ea8d Updated an API's documented return codes
Added ASN_BEFORE_DATE_E and ASN_AFTER_DATE_E to
wolfSSL_CTX_load_verify_locations
2018-11-29 10:03:38 -07:00
Takashi Kojo
bbea4aba59 IAR EWARM 2018-11-29 07:21:56 +09:00
Takashi Kojo
a203cd4901 NO_MULTIBYTE to NO_MULTIBYTE_PRINT 2018-11-29 07:04:01 +09:00
abrahamsonn
95c6c0df28 Updated doxygen with some more API
Added new DH API function signatures/some descriptions
2018-11-28 15:03:01 -07:00
Takashi Kojo
0e94ae529c Rollback stacing 2018-11-29 06:52:43 +09:00
abrahamsonn
a3d1ea20ff updated page list to include PKCS#11 page 2018-11-28 14:49:42 -07:00
toddouska
8c0a55d43b Merge pull request #1939 from cconlon/selftestfix
exclude wolfSSL_EC_POINT_point2hex() in CAVP selftest build
2018-11-28 13:13:25 -08:00
abrahamsonn
424196cb03 Doxygen format updates
Updated the doxygen page list to include PKCS#11, and create the PKCS#11 page
2018-11-28 13:45:19 -07:00
abrahamsonn
c4919d191b Added doxygen comment page
The new doxygen comment page (pkcs11.h) lets Doxygen know when running that
there are new API and that they will need a page created.
2018-11-28 13:36:00 -07:00
abrahamsonn
74b8c2795b Merge branch 'master' of https://github.com/wolfssl/wolfssl into doxygen-update 2018-11-28 11:35:17 -07:00
toddouska
70305758d4 Merge pull request #1942 from SparkiDev/asn_trad_fix
Return ToTraditional API to original signature
2018-11-28 08:08:26 -08:00
toddouska
33db5babc9 Merge pull request #1940 from SparkiDev/pkcs11_cast
Fix for clang - cast down
2018-11-28 08:06:28 -08:00
toddouska
2827ef6a57 Merge pull request #1938 from SparkiDev/tls13_ext
Check for TLS 1.3 version in the method for extenstions.
2018-11-28 08:05:42 -08:00
toddouska
814e45a12b Merge pull request #1925 from kaleb-himes/ZD4486-XCODE
i386 arch lacks registers to support some tfm assembly without correct CFLAGS
2018-11-28 08:04:09 -08:00
Sean Parkinson
310ffd0045 Check for TLS 1.3 version in the method for extenstions.
During parsing of ClientHello, ServerHello and HelloRetryRequest, the
SSL object version may not be set to the negotiated version.
2018-11-28 14:59:43 +10:00
Sean Parkinson
918c769284 Return ToTraditional API to original signature 2018-11-28 12:27:57 +10:00
Sean Parkinson
1a518c6c46 Fix for clang - cast down 2018-11-28 08:49:33 +10:00
kaleb-himes
6ed462f564 Provide example of appropriate CFLAGS for exposing registers on i386 required for inline assembly in tfm.c 2018-11-27 15:22:42 -07:00
David Garske
11810160b4 Merge pull request #1937 from tmael/portingMicriumIII
Micrium uC/OS-III port (updated readme & user_settings)
2018-11-27 11:08:53 -08:00
Chris Conlon
a5e3b18252 exclude wolfSSL_EC_POINT_point2hex() in CAVP selftest build 2018-11-27 09:12:55 -08:00
Tesfa Mael
216b2bf3fe rerun benchmark tests 2018-11-26 18:17:10 -08:00
Takashi Kojo
3cee583f8d NO_MULTIBYTE option in RTE/wolfssl/user_settings.h 2018-11-27 07:26:19 +09:00
toddouska
55bbffe3c6 Merge pull request #1932 from dgarske/maxfrag_reconf
Post-handshake max fragment size adjustment
2018-11-26 13:27:26 -08:00
toddouska
3afa9a3886 Merge pull request #1929 from ejohnstown/sniffer
Sniffer Updates
2018-11-26 13:24:31 -08:00
toddouska
4afa0f72fe Merge pull request #1926 from cconlon/cms2
CMS expansion, SignedData detached signature support
2018-11-26 13:22:26 -08:00
Takashi Kojo
c529e011a7 NO_MULTIBYTE for multibyte non-supported IDEs 2018-11-26 08:11:31 +09:00
Tesfa Mael
d51d8d86b5 update readme 2018-11-21 12:08:54 -08:00
John Safranek
96b4ddad82 Sniffer Update
1. Collect the SSL Info capture into its own function.
2. Add a Trace function for the SSL Info.
3. When copying the IANA name for the cipher suite, use a strncpy
instead of a memcpy and cap the copy at the length of the destination.
Force a null terminator at the end of the destination, just in case.
4. Modify the snifftest to collect the SSL Info.
2018-11-21 11:29:28 -08:00
David Garske
7a24d4e46f Adds new WOLFSSL_ALLOW_MAX_FRAGMENT_ADJUST macro around non-standard feature. This allows for adjustment of the maximum fragment size post handshake. 2018-11-21 10:30:24 -08:00
toddouska
4bf61a81e4 Merge pull request #1930 from tmael/portingMicriumIII
Micrium uC/OS-III port
2018-11-21 10:29:17 -08:00
toddouska
f87c327fae Merge pull request #1933 from SparkiDev/tls13_ems
No Extended Master Secret in ServerHello if protocol TLSv1.3
2018-11-21 10:25:59 -08:00
toddouska
f11809aa62 Merge pull request #1923 from JacobBarthelmeh/Testing
cast to resolve warning, check size of time_t, and check for null tes…
2018-11-21 10:17:23 -08:00
toddouska
73dbd15b2b Merge pull request #1896 from SparkiDev/openssl_extra2
More OpenSSL API support
2018-11-21 10:16:37 -08:00
Chris Conlon
09141d479e store CMS detached variable when using streaming API 2018-11-21 10:12:36 -08:00
Chris Conlon
1244212d41 Merge pull request #1921 from miyazakh/Espressif_port_Phase1
Porting wolfssl into ESP-IDF development framework
2018-11-21 08:16:56 -08:00
Tesfa Mael
101966329e add readme doc 2018-11-20 22:56:04 -08:00
Tesfa Mael
da71d7243e adding new files for make dist 2018-11-20 18:40:25 -08:00
Sean Parkinson
5156641f2b No Extended Master Secret in ServerHello if protocol TLSv1.3 2018-11-20 08:38:14 +10:00
Sean Parkinson
95bd340de5 Add support for more OpenSSL APIs
Add support for PEM_read and PEM_write
Add OpenSSL PKCS#7 signed data support
Add OpenSSL PKCS#8 Private key APIs
Add X509_REQ OpenSSL APIs
2018-11-20 07:54:24 +10:00
David Garske
e81436ffe9 Add support for altering the max-fragment size post-handshake using existing API wolfSSL_UseMaxFragment. 2018-11-19 13:26:48 -08:00
Tesfa Mael
b05782a5c9 use static const 2018-11-19 09:13:09 -08:00
Tesfa Mael
3a033cae8c Add standard GPLv2 header 2018-11-19 08:59:48 -08:00
Tesfa Mael
7ac8acff09 fix IAR EWARM Error[Pe028]: expression must have a constant value 2018-11-19 00:19:58 -08:00
Tesfa Mael
2ad6ce351b add micrium current_time and use correct serial function 2018-11-18 23:44:20 -08:00
Tesfa Mael
061757c909 remove WOLFSSL_TYPES, add defines in user settings 2018-11-18 23:44:20 -08:00
Tesfa Mael
11ccce809d fix formatting, converted tabs to spaces 2018-11-18 23:44:20 -08:00
Tesfa Mael
ac8c4adc06 port to uC/OS-III
remove uC/OS-III eclipse project files

Adding wolfSSL client example for uC/TCP-IP with WinPcap running on Win7

Cleaned up user_settings and client example code

wolfSSL server example for uCOS-III/TCP-IP

Fixed typo and formating

Removed comments from user settings

serial (UART) interface isn't available on all targets

Updated to use PEM certs

add XSNPRINTF snprintf

define tx msg and size for clarity
2018-11-18 23:44:20 -08:00
Hideki Miyazaki
bc09f4bd30 Porting wolfssl into ESP-IDF development framework 2018-11-17 09:36:09 +09:00
John Safranek
3599798aac Move a variable declaration to the start of a block instead of in the
middle.
2018-11-16 15:54:19 -08:00
John Safranek
6ee60bbb49 Sniffer Update
1. Adds a new function ssl_DecodePacketWithSessionInfo() that returns a
copy of the TLS session info (version and suite ID) for the packet that
is decoded.
2. Adds a new function DecodePacketInternal() that does the same work as
the old DecodePacket() with the additional Session Info behavior.
3. Both DecodePacket public functions call the internal version.
2018-11-16 15:00:06 -08:00
John Safranek
d2989d9f43 Sniffer Fix
Drop a handshake message if it is split across TLS records. The likely
messages dropped are certificate and certificate request, which are
ignored by the sniffer.
2018-11-16 15:00:06 -08:00
Chris Conlon
e756c5ffc9 use devId variable in test.c for PKCS7 examples 2018-11-16 15:54:32 -07:00
Chris Conlon
4295db218a add CMS SignedData support for detached signatures 2018-11-16 15:54:32 -07:00
Chris Conlon
7f76af0b36 Merge pull request #1927 from JacobBarthelmeh/AES
additional macro guards for disabling aescbc with opensslextra
2018-11-16 15:53:04 -07:00
Jacob Barthelmeh
ee30b2b476 better name for time_t size macro guard 2018-11-16 15:51:38 -07:00
Jacob Barthelmeh
ae1b1d777a compile out aescbc function declarations when off 2018-11-15 14:08:40 -07:00
Jacob Barthelmeh
c307fd7af4 additional macro guards for disabling aescbc with opensslextra 2018-11-15 13:40:04 -07:00
kaleb-himes
8399a7a517 i386 arch lacks registers to support some tfm assembly, detect and disable 2018-11-15 09:52:20 -07:00
JacobBarthelmeh
c592a1d6cb Merge pull request #1924 from dgarske/fix_fipscheck
Fix to resolve issue with fips_check.sh
2018-11-14 09:05:20 -07:00
David Garske
ed79aa1dc5 Fix to resolve issue with fips_check.sh after --depth=1 change in PR #1920. Fixes Jenkins report error: pathspec 'v3.6.0' did not match any file(s) known to git. 2018-11-13 06:30:05 -08:00
Jacob Barthelmeh
0f4a06594e cast to resolve warning, check size of time_t, and check for null test case 2018-11-12 16:02:33 -07:00
toddouska
8689cc6a04 Merge pull request #1922 from SparkiDev/tls_pad_fix
Fix for checking of TLS padding when padding byte value > msg len
2018-11-12 13:20:35 -08:00
toddouska
2503a4c0de Merge pull request #1920 from dgarske/check_speedup
Various script improvements for git clone calls
2018-11-12 13:17:14 -08:00
toddouska
0452594cf7 Merge pull request #1905 from SparkiDev/sp_thumb
Single Precision: ARM Thumb assembly implementation
2018-11-12 13:16:11 -08:00
toddouska
254b0f665b Merge pull request #1918 from dgarske/async_rel_v3.15.5
wolfSSL Async Release v3.15.5 Fixes
2018-11-12 11:22:55 -08:00
Sean Parkinson
61c7be669b Fix for checking of TLS padding when padding byte value > msg len 2018-11-12 17:37:34 +10:00
David Garske
533f4a5c77 Speedups for the git clone calls in check scripts to use --depth 1.
```
BEFORE CHANGE:

time ./fips-check.sh windows keep
Receiving objects: 100% (18408/18408), 12.61 MiB | 625.00 KiB/s, done.
Receiving objects: 100% (7045/7045), 110.48 MiB | 488.00 KiB/s, done.

real	5m4.604s
user	1m38.039s
sys	0m25.984s

AFTER CHANGE:
time ./fips-check.sh windows keep
Receiving objects: 100% (642/642), 1.02 MiB | 1.26 MiB/s, done.
Receiving objects: 100% (767/767), 24.15 MiB | 487.00 KiB/s, done.

real	1m43.194s
user	1m34.100s
sys	0m24.046s
```
2018-11-09 09:36:41 -08:00
David Garske
ba8d1962c7 Fix for test case wc_AesInit with bad argument. Adds bad arg check for API in FIPS mode. 2018-11-09 09:26:01 -08:00
David Garske
9f6167872f Fixes for additional use of unititlized variable with async for AES and DH. 2018-11-08 15:56:51 -08:00
David Garske
b3d5999be9 Fix for unused variables with --disable-rsa --enable-tls13 case in InitSuites. 2018-11-08 15:54:06 -08:00
David Garske
d5dddd2b29 Fix for unused useSupCurve in example client with --disable-ecc. 2018-11-08 15:43:18 -08:00
David Garske
e9a10e3614 Scan-build fix for possible case where r and s aren't initalized for wc_ecc_verify_hash. 2018-11-08 15:40:06 -08:00
David Garske
fcb40570e2 Fixes for warnings with possible use of uninitialized variable in async with DES3 and AES. 2018-11-08 15:39:52 -08:00
David Garske
da76fb6861 Fixes for warning about possible uninitialized use of asyncDev for wc_Gmac and wc_GmacVerify. 2018-11-08 13:43:13 -08:00
toddouska
39506e61d1 Merge pull request #1916 from JacobBarthelmeh/Release
Prepare for release v3.15.5
2018-11-08 12:59:05 -08:00
toddouska
4a88626500 Merge pull request #1917 from SparkiDev/sp_def
Fix define to use letter S instead of 5
2018-11-08 10:39:52 -08:00
Jacob Barthelmeh
078db9e445 fix for nightly cavp test 2018-11-08 09:25:10 -07:00
Jacob Barthelmeh
cd37e3967c prepare for release 3.15.5 2018-11-07 16:08:29 -07:00
Sean Parkinson
94c75aa3ed Fix define to use letter S instead of 5 2018-11-08 08:25:29 +10:00
Jacob Barthelmeh
2468a19c82 static analysis fix on non default build and g++ warning 2018-11-07 14:50:07 -07:00
David Garske
6e4ab91ccf Merge pull request #1915 from JacobBarthelmeh/Testing
fix side init for set connect/accept functions
2018-11-07 09:24:44 -08:00
JacobBarthelmeh
196791390b Merge pull request #1911 from kaleb-himes/CRYPT_LOGIC_UPDATES-R2
Fix pre-processor checks in wolfCrypt test for unique configuration
2018-11-07 10:22:03 -07:00
JacobBarthelmeh
5a53048e8f Merge pull request #1914 from kaleb-himes/FIX_x_OPT_SERVER
Fix -x option in server to continue in event of error (R)
2018-11-07 10:11:27 -07:00
toddouska
f7f6506a54 Merge pull request #1898 from cconlon/cmsupdates
wolfCrypt PKCS#7/CMS Expansion
2018-11-07 08:36:02 -08:00
toddouska
24e2a2b228 Merge pull request #1912 from dgarske/fix_BN_bn2hex
Fixes for compatibility function `BN_bn2hex`
2018-11-07 08:35:15 -08:00
Jacob Barthelmeh
100bf76748 sanity check on length befor checking ASN.1 tag 2018-11-06 18:35:13 -08:00
Jacob Barthelmeh
27db083733 make degenerate test structure dynamic to set the uninitialized dynamic flag 2018-11-06 18:35:13 -08:00
Jacob Barthelmeh
820ee0439a handle degenerate case after rebase 2018-11-06 18:35:13 -08:00
Chris Conlon
9fa4f754ab fix PKCS7/CMS conditional build errors 2018-11-06 18:35:13 -08:00
Jacob Barthelmeh
a2b2ce124e add a check to help out static analysis tool 2018-11-06 18:35:13 -08:00
Jacob Barthelmeh
afbf09b970 fix for building with clang 2018-11-06 18:35:13 -08:00
Chris Conlon
773a81ef6a CMS fixes for building with NO_ASN_TIME 2018-11-06 18:35:13 -08:00
Jacob Barthelmeh
448f91b56d fixes after more fuzz testing 2018-11-06 18:35:13 -08:00
Chris Conlon
cc32466603 build fix for test.c when disabling CMS EncryptedData content type 2018-11-06 18:35:13 -08:00
Chris Conlon
9bef9bad8e PKCS7/CMS build fixes when disabling individual AES sizes 2018-11-06 18:35:13 -08:00
Chris Conlon
4d9375b862 PKCS7/CMS build fixes when disabling AES 2018-11-06 18:35:13 -08:00
Chris Conlon
004b0d3793 PKCS7/CMS build fixes when disabling RSA, ECC, or AES-GCM/CCM 2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
867bcb4545 small stack memory management 2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
77a1dafed0 fix for fall through with gcc-7 2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
62a2847d75 make internal stream buffer dynamic
formating and build without stream api
2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
048a7f4c57 fix for memory leak after resetting stream state 2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
5a59fdd6fd scan-build warnings 2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
b3506c836c remove content type restriction and fix build with compkey 2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
98efc1e9de testing with verify signed stream function 2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
752259e343 first addition of decode enveloped stream 2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
5525f59852 first addition of verify sign stream data 2018-11-06 18:35:12 -08:00
Chris Conlon
47303ed445 fix decryption of EnvelopedData PWRI KEK size 2018-11-06 18:35:12 -08:00
Chris Conlon
b4d02d6d99 fix setting and checking CMS EnvelopedData version 2018-11-06 18:35:12 -08:00
JacobBarthelmeh
b0e4cb3572 valgrind testing 2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
5d8f59d83b initial AuthEnvelopedData stream and add debug messages 2018-11-06 18:35:12 -08:00
Chris Conlon
d69a3c1092 add single-shot API for generating CMS Signed Encrypted Compressed FirmwarePkgData 2018-11-06 18:35:12 -08:00
Chris Conlon
c9f75fe7b4 add test cases for CMS Signed-Encrypted and Signed-Compressed FirmwarePkgData to test.c 2018-11-06 18:35:12 -08:00
Chris Conlon
175e32b468 add single-shot API for generating CMS Signed Compressed FirmwarePkgData 2018-11-06 18:35:12 -08:00
Chris Conlon
ed7cd54a91 add single-shot API for generating CMS Signed Encrypted FirmwarePkgData 2018-11-06 18:35:12 -08:00
Chris Conlon
cc05c46318 add single-shot API for generating CMS Signed FirmwarePkgData 2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
2cc89936e3 add semicolon after FALL_THROUGH 2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
02df920269 use fall through and update api tests to use wc_PKCS7_New 2018-11-06 18:35:12 -08:00
Jacob Barthelmeh
83a150c4df stream of PKCS7 decode encrypted 2018-11-06 18:35:12 -08:00
Chris Conlon
40ef246b1f add CMS AuthEnvelopedData support for unauthAttrs 2018-11-06 18:35:12 -08:00
Chris Conlon
4315384051 update test.c error returns for PKCS7 2018-11-06 18:35:12 -08:00
Chris Conlon
06a6f8400b add CMS AuthEnvelopedData support for authAttrs 2018-11-06 18:35:12 -08:00
Chris Conlon
bc94cdc11b add CMS AuthEnvelopedData content type support 2018-11-06 18:35:12 -08:00
Chris Conlon
a4da14f4b0 allow CMS CompressedData to be disabled with NO_PKCS7_COMPRESSED_DATA 2018-11-06 18:35:12 -08:00
Chris Conlon
75349bbba5 add support for SubjectKeyIdentifier to KTRI CMS RecipientInfo types 2018-11-06 18:35:12 -08:00
Chris Conlon
794137c20c add CMS EnvelopedData OtherRecipientInfo support 2018-11-06 18:35:12 -08:00
Chris Conlon
85e0c203ea ignore pkcs7 test files 2018-11-06 18:35:12 -08:00
Chris Conlon
0b3930e24f save and set PKCS7 isDynamic flag in wc_PKCS7_Init 2018-11-06 18:35:12 -08:00
Chris Conlon
13b30a6a21 add CMS EnvelopedData PasswordRecipientInfo support 2018-11-06 18:35:12 -08:00
Chris Conlon
dbb5bb7570 add CMS EnvelopedData KEKRecipientInfo support 2018-11-06 18:35:12 -08:00
Chris Conlon
ec07fe492e misc CMS fixes from review and valgrind 2018-11-06 18:35:11 -08:00
Chris Conlon
1f8c4c2613 merge CMS changes with master 2018-11-06 18:35:11 -08:00
Chris Conlon
7841434744 add support for multiple certificates in CMS SignedData certificates field 2018-11-06 18:35:11 -08:00
Chris Conlon
897c6b455f move CMS signed attribute OIDs into BuildSignedAttributes() 2018-11-06 18:35:11 -08:00
Chris Conlon
a25a637270 add CMS signingTime attribute support for SignedData 2018-11-06 18:35:11 -08:00
Chris Conlon
56f1b68442 use SetContentType() to set SignedData content type 2018-11-06 18:35:11 -08:00
Chris Conlon
ce1381dc9a add contentType check to CMS compressed tests 2018-11-06 18:35:11 -08:00
Chris Conlon
6a06a3b63b add CMS CompressedData test using FirmwarePkgData 2018-11-06 18:35:11 -08:00
Chris Conlon
c51cf4472e add support for CMS CompressedData content type 2018-11-06 18:35:11 -08:00
Chris Conlon
32b70dd56c add support for FirmwarePkgData in CMS SignedData EncapsulatedContentInfo 2018-11-06 18:35:11 -08:00
Chris Conlon
2a60fbd766 add support for SubjectKeyIdentifier in CMS SignedData SignerInfo 2018-11-06 18:35:11 -08:00
Chris Conlon
70ca95b357 add support for custom contentType with CMS SignedData type 2018-11-06 18:35:11 -08:00
toddouska
bdf07e64cf Merge pull request #1901 from dgarske/rsa_nonblock
Added RSA non-blocking support
2018-11-06 16:39:43 -08:00
toddouska
5d8f4351ff Merge pull request #1903 from dgarske/dhkeycheck
Speed improvements for DH public key prime checking
2018-11-06 16:35:27 -08:00
Jacob Barthelmeh
7a2a66743b fix side init for set connect/accept functions 2018-11-06 16:48:06 -07:00
kaleb-himes
bc2bb78010 Fix -x option in server to continue in event of error (R) 2018-11-06 14:09:46 -07:00
toddouska
144ff68cfb Merge pull request #1882 from SparkiDev/pkcs11_lib
Improvements for PKCS#11 library
2018-11-06 08:53:57 -08:00
toddouska
2c7ff56a3e Merge pull request #1907 from JacobBarthelmeh/Testing
infer and g++ build fixes
2018-11-06 08:48:28 -08:00
David Garske
95092696bf Fix to make sure mp_toradix and mp_radix_size are included for OPENSSL_EXTRA. 2018-11-06 08:38:47 -08:00
David Garske
efb1efcc0d Fixes and additional tests for compatibility function BN_bn2hex. In the DEBUG_WOLFSSL case it was returning a (char*)"", which was trying to be free'd. We cannot return const char* here, since its assumed to be an allocated pointer. Fix the dynamic type for XMALLOC/XFREE to match, since OPENSSL_free is used to free returned value. Fix to add room for null term. Added missing API unit test for BN_print_fp. Exposed these functions for OPENSSL_EXTRA. 2018-11-06 05:55:25 -08:00
David Garske
1a4533f166 Merge pull request #1910 from embhorn/zd4324
Handle incomplete shutdown
2018-11-06 05:19:58 -08:00
JacobBarthelmeh
ee00852509 Merge pull request #1909 from ejohnstown/filedist
Added the resource.h and wolfssl.rc to the list of EXTRA_DIST files.
2018-11-05 14:40:04 -07:00
Eric Blankenhorn
d61ae3a02a Handle incomplete shutdown 2018-11-05 10:30:48 -06:00
kaleb-himes
92d6dc36af Fix pre-processor checks in wolfCrypt test for unique configuration 2018-11-02 15:22:11 -06:00
John Safranek
c1ca1f1b78 Remove DH prime check on selftest/fips builds. 2018-11-02 12:55:07 -07:00
David Garske
6372c3d6e1 * Added RSA non-blocking support enabled with WC_RSA_NONBLOCK. Adds new wc_RsaSetNonBlock function for enabling / non-block context. Added wolfCrypt test function rsa_nb_test to validate. Result is: RSA non-block sign: 8200 times and RSA non-block verify: 264 times
* Signature wrapper improvements to eliminate mallocs/frees unless small stack is used. If small stack is used only one allocation is done based on actual max (was previously was allocating too much and in the encoding case was reallocating a second buffer).
2018-11-02 12:41:23 -07:00
John Safranek
98291f8465 Update comment in dh.c. 2018-11-02 11:38:52 -07:00
John Safranek
1261247e2a Added the resource.h and wolfssl.rc to the list of EXTRA_DIST files. 2018-11-02 11:30:29 -07:00
John Safranek
cfafbd9659 Added the prime check to the functions wolfSSL_SetTmpDh() and wolfSSL_CTX_SetTmpDh(). 2018-11-02 11:01:39 -07:00
JacobBarthelmeh
1ffc1108a6 Merge pull request #1906 from cconlon/selftest-fixes
fixes for CAVP selftest build errors
2018-11-01 11:31:39 -06:00
Jacob Barthelmeh
a953a3141e infer and g++ build fixes 2018-11-01 09:59:35 -06:00
Sean Parkinson
81650d6cef Fix for subtract
Added cortex-m support using umull for faster implementation.
2018-11-01 15:21:51 +10:00
Sean Parkinson
2b3b19d1c8 Merge pull request #1904 from JacobBarthelmeh/PKCS7
add test for degenerate case and allow degenerate case by default
2018-11-01 08:36:15 +10:00
Jacob Barthelmeh
6dd4fba888 fix for clang warning 2018-10-30 17:41:03 -06:00
Jacob Barthelmeh
cc3ccbaf0c add test for degenerate case and allow degenerate case by default 2018-10-30 17:04:33 -06:00
David Garske
f6093e1e0d Fixes to remove DH prime checks for server side DH parameters. 2018-10-30 15:51:47 -07:00
Chris Conlon
def7a91e70 fix CAVP selftest build errors 2018-10-30 16:35:45 -06:00
David Garske
f4b0261ca7 Fix to not do prime test on DH key the server loaded. Now it will only do the prime test on the peer's provided public DH key using 8 miller rabbins. Refactored the fast math miller rabin function to reuse mp_int's, which improved peformance for mp_prime_is_prime_ex from 100ms to 80ms. Normal math mp_prime_is_prime_ex is ~40ms (as-is). Added test for wc_DhSetCheckKey. 2018-10-30 11:20:07 -07:00
Chris Conlon
2c0edae96f Merge pull request #1889 from kojo1/t4_demo
Renesas RX demo
2018-10-30 10:14:02 -06:00
Sean Parkinson
ab458db504 Review comment changes
Add heap as a device initialization parameter.
Allocate slot info pointer wiht device heap pointer.
ForceZero user pin on token finalization.
Add comments to structure definitions.
2018-10-30 15:56:31 +10:00
Takashi Kojo
b64c527138 added files under t4_demo to include.am 2018-10-30 13:18:58 +09:00
David Garske
ba90674357 Merge pull request #1897 from WolfWalter/fix_sigrs_length
ATECC508 reference PK callback fix for signature length
2018-10-29 08:54:46 -07:00
toddouska
ae07ba93ad Merge pull request #1894 from dgarske/pk_keysize
Fixes for key size detection when using PK callbacks
2018-10-26 09:46:10 -07:00
toddouska
d18c9cad61 Merge pull request #1895 from dgarske/test_384bit
Added ECC P-384 bit test certs and keys
2018-10-26 09:44:41 -07:00
toddouska
a6adfd434d Merge pull request #1893 from dgarske/ecdsa_hashalgo
New build option to match ECDSA hash algo digest size with ephemeral key size
2018-10-26 09:43:07 -07:00
Wolf Walter
a47eeec145 fixed sigRs length
atmel_ecc_sign and atmel_ecc_verify expect sigRS length to be 64 Byte (32 Byte each).
2018-10-26 16:43:03 +02:00
David Garske
153c7cc684 Fix for unused variable in new fast-rsa function wc_RsaPublicKeyDecode_ex. 2018-10-25 11:12:33 -07:00
David Garske
3be7eacea9 Added client/server certs and keys for P-384-bit signed by P-384 CA. Fix for broken certs/ecc/genecc.sh script. Added simple P-384 cipher suite test. 2018-10-25 09:21:27 -07:00
David Garske
d21603334b Added build option USE_ECDSA_KEYSZ_HASH_ALGO to alter the hash algorithm selection for ecc_dsa_sa_algo. With this build option we try and choose a hash algorithm digest size that matches the ephemeral key size, if not found then will match on next highest. We've seen cases with some Windows based TLS client's where they do not properly support hashing a smaller ephemeral key with a larger hash digest size (such as P-256 key and SHA512 hash). 2018-10-25 09:19:35 -07:00
David Garske
81651c351b Added optional logging for example PK callbacks in test.h enabled with DEBUG_PK_CB. 2018-10-25 09:15:34 -07:00
David Garske
86758f9640 Fixes for key size detection when using PK callbacks (HSM) and no private key has been loaded (affects HAVE_PK_CALLBACKS on server side only when no dummy private key is loaded). Fix for possible leak during ECC min key size failure with small stack. Added new API wc_RsaPublicKeyDecode_ex for parsing an RSA public key for the modulus and exponent. Changed wolfSSL_CTX_SetTmpEC_DHE_Sz to support a size == 0 for using the long-term private key's size. Changed ECDHE_SIZE so it can be overridden and build-time. Added tests for wolfSSL_CTX_SetTmpEC_DHE_Sz and wolfSSL_SetTmpEC_DHE_Sz. 2018-10-25 09:15:23 -07:00
toddouska
23445546c5 Merge pull request #1892 from dgarske/ecdhe_keysize
Fix for ephemeral key size selection
2018-10-25 07:27:20 -07:00
David Garske
c4d6f886b7 Revert change from PR #1845 commit 24f9f12844. This ensure the ephemeral key is P-256 or the overridden value determined by wolfSSL_CTX_SetTmpEC_DHE_Sz and wolfSSL_SetTmpEC_DHE_Sz. This restores previous behavior from last release. 2018-10-24 09:48:03 -07:00
toddouska
0eb115e7a1 Merge pull request #1884 from kaleb-himes/ECC_DISABLED_TEST_FIX
Fixes to resolve skipped tests with ECC disabled
2018-10-24 09:30:47 -07:00
Sean Parkinson
7586e1df42 Only do early data in initial handshake when using PSK 2018-10-24 09:47:30 +10:00
toddouska
c173d72423 Merge pull request #1891 from SparkiDev/nginx-1.15.5
Add defines for latest nginx
2018-10-23 08:07:52 -07:00
Sean Parkinson
ef8b564d2e Add defines for latest nginx 2018-10-23 22:08:44 +10:00
toddouska
22aa01a547 Merge pull request #1881 from SparkiDev/pkcs7_no_si
Return error when attempting to verify signed data without signers
2018-10-22 15:00:55 -07:00
toddouska
878b5925fc Merge pull request #1877 from dgarske/pkcs8_ec
Added support for ECC private key with PKCS8 encoding
2018-10-22 14:59:10 -07:00
toddouska
42fecee77b Merge pull request #1859 from SparkiDev/pkcs7-cons
Support constructed OCTET_STRING in PKCS#7 signed data
2018-10-22 14:52:50 -07:00
Chris Conlon
353f9018f5 Merge pull request #1890 from miyazakh/jamsg
Added Japanese message into the examples client and server
2018-10-22 13:44:11 -06:00
David Garske
0b720c4412 Fixes for TLSv1.3 early data. 2018-10-22 11:35:40 -07:00
Chris Conlon
96abf43238 Merge pull request #1888 from MJSPollard/nidFIX
Fixed compilation issues with Asio, Websocket++, and HAProxy
2018-10-22 10:19:05 -06:00
Hideki Miyazaki
6953677a8f Keep the max line length to 80 2018-10-20 17:15:17 +09:00
Hideki Miyazaki
a27b4c2efb Added Japanese message into the examples client and server 2018-10-20 13:40:01 +09:00
David Garske
7ce236f3af Fix for new test_wolfSSL_PKCS8 changes to init/free the ecc_key. 2018-10-19 16:04:02 -07:00
Takashi Kojo
dabeccca27 README_en 2018-10-20 07:59:22 +09:00
Takashi Kojo
f2ef67446d T4 demo 2018-10-20 07:21:52 +09:00
David Garske
c268829b68 Fix bug with SendClientKeyExchange and ifdef logic for ecdhe_psk_kea, which was preventing ECDHE-PSK from working if HAVE_CURVE25519 was defined. Disabled broken downgrade test in test-tls13-down.conf (@SpariDev will need to investigate). Various spelling fixes. 2018-10-19 13:21:56 -07:00
Carie Pointer
fac6ce794d Fix HAProxy redefinition warning 2018-10-19 12:14:57 -06:00
MJSPollard
355184bc9b added fix for failing asio and haproxy tests 2018-10-18 17:32:42 -06:00
David Garske
4a4ae446aa Fix for unit.test fails with -H verifyFail. 2018-10-18 11:58:00 -07:00
David Garske
84fb23cfab Merge pull request #1880 from kojo1/NID
NID definitions are in asn.h
2018-10-18 09:48:20 -07:00
Sean Parkinson
7551e49fed Improvements for PKCS#11 library 2018-10-18 17:31:17 +10:00
Sean Parkinson
67bb558025 Return error when attempting to verify signed data without signers 2018-10-18 13:44:13 +10:00
Takashi Kojo
8a872891c5 NID_domainComponent is moved to asn.h 2018-10-18 09:28:15 +09:00
kaleb-himes
cdd8f6b950 Macro guard on cipher suite added - Thanks Jacob\! 2018-10-17 16:44:47 -06:00
kaleb-himes
dc519e6a45 When no cert specified using default, do not return failure in suite tests 2018-10-17 15:20:39 -06:00
David Garske
095337b1cf Merge pull request #1878 from kaleb-himes/TEST_COVERAGE_3
Test coverage 3
2018-10-17 13:47:10 -07:00
toddouska
dcb105deff Merge pull request #1876 from dgarske/max_frag_256
Added new 256-byte max fragment option `WOLFSSL_MFL_2_8`
2018-10-17 13:21:57 -07:00
David Garske
8b529d3d57 Add test for ECC private key with PKCS 8 encoding (no crypt) and -----BEGIN EC PRIVATE KEY----- header. 2018-10-17 10:01:29 -07:00
kaleb-himes
5ca822b1e9 Peer review changes requested 2018-10-17 10:46:45 -06:00
toddouska
7391f4db90 Merge pull request #1815 from dgarske/atecc508_fixes
Fixes for ATECC508A
2018-10-17 08:35:09 -07:00
toddouska
969098518f Merge pull request #1873 from dgarske/fix_async_multi_rec
Fixes and improvements for wolfSSL asynchronous mode
2018-10-17 08:23:27 -07:00
kaleb-himes
2aa6f91144 Reset IV after update via call to encrypt 2018-10-16 18:31:16 -06:00
David Garske
0d7d8f54e0 Added support for ECC private key with PKCS8 parsing. Fix is to attempt pkcs8 parse for -----BEGIN EC PRIVATE KEY----- and if parse fails to treat as normal private key. ZD 4379. 2018-10-16 16:56:42 -07:00
David Garske
d7d102d90a Added cipher suite unit tests for max fragment options 1-6 for TLS v1.2 and DTLS v1.2. Fix for client usage comment for max fragment. 2018-10-16 16:47:24 -07:00
David Garske
ab61cefa58 Fix max frag error case tests to use min/max. 2018-10-16 08:58:46 -07:00
David Garske
4adaeb8585 Added new 256-byte max fragment option WOLFSSL_MFL_2_8. 2018-10-15 17:06:21 -07:00
David Garske
e53694b351 Fix for shared secret callback for client side, where it was not using the provided peer's public key. Fix for ATECC508A to put it into idle mode after operations to prevent watchdog fault mode (can be disabled by defining WOLFSSL_ATECC508A_NOIDLE). Fixes for callbacks to support using software for non P-256 curves (can be disabled by defining WOLFSSL_ATECC508A_NOSOFTECC). 2018-10-15 16:01:04 -07:00
David Garske
bd57f5b385 Fix to resolve possible buffer overflow with atmel_get_rev_info when using byte. 2018-10-15 14:17:43 -07:00
David Garske
177bf49fa6 Updates to the atmel.c code to allow easier customization of the hardware interface. 2018-10-15 14:17:43 -07:00
David Garske
bb737ec99d Fixes for building against latest CryptoAuthLib. Refactor to eliminate the atcatls function calls, since these have been removed from latest CryptoAuthLib. Cleanup of the slot assignment handling. 2018-10-15 14:17:43 -07:00
David Garske
d67cb9e875 Added new build option for Microchip CryptoAuthLib (--enable-cryptoauthlib). Build fixes with WOLFSSL_ATECC508A enabled. 2018-10-15 14:17:43 -07:00
David Garske
ba9f21bad6 Improvements to the ATECC508A README.md. 2018-10-15 14:17:42 -07:00
David Garske
c51c607e96 Fix to use inLen for raw public key copy. No need to throw an error for other curve types as this function may be used for software only import/export. In the TLS case with only SECP256R1 there are other places where an error will be thrown. 2018-10-15 14:17:42 -07:00
David Garske
53c2264327 Fix for checking the inLen when setting raw public key len for hardware. Finished the ATECC508A ECC functions to support native TLS with the WOLFSSL_ATECC508A option and SECP256R1. Added slot type for alloc/free. Added helper functions for setting the PK callbacks and custom content. Updated the README.md with build options. Added support for overriding the ATECC_MAX_SLOT. Added overridable define for encryption slot number ATECC_SLOT_I2C_ENC. Added new build option WOLFSSL_ATECC_PKCB for using just the reference PK callbacks. 2018-10-15 14:17:42 -07:00
David Garske
7074625048 Added slot callbacks. Improvements for the Atmel time support. Fix to make sure read encryption key is cleared from stack buffer. 2018-10-15 14:17:42 -07:00
David Garske
e78ddfce75 Fix for wc_ecc_import_x963_ex to handle ATECC508A raw public key. Cleanup of the ATECC508A encryption key support. Added new macro ATCA_TLS_GET_ENC_KEY to allow setting your own function at build-time for getting the encryption key. 2018-10-15 14:17:42 -07:00
David Garske
be318abbc2 Fixes for building with WOLFSSL_ATECC508A with latest atca. 2018-10-15 14:17:42 -07:00
David Garske
7c3313481a Fix for memory cleanup cases in MakeTlsMasterSecret. 2018-10-15 13:22:55 -07:00
toddouska
f7eb8bf080 Merge pull request #1874 from JacobBarthelmeh/HardwareAcc
fix for afalg header install and macro set
2018-10-15 11:51:10 -07:00
Jacob Barthelmeh
23ef832dd3 fix for afalg header install and macro set 2018-10-12 15:45:46 -06:00
David Garske
a0608151cf Fix for the WOLFSSL_NONBLOCK_OCSP case to reset the error code as well. 2018-10-12 11:20:13 -07:00
David Garske
5904a97378 Added comments in aes.c for locating software implementation of algorithm using Software AES. 2018-10-12 10:48:26 -07:00
David Garske
23a0f3cfa1 Added new WOLFSSL_SSLKEYLOGFILE define to output master secret used by Wireshark logging to file. Defaults to sslkeylog.log, but can be overridden using WOLFSSL_SSLKEYLOGFILE_OUTPUT. 2018-10-12 10:47:30 -07:00
David Garske
52210c9d16 Improved error trapping in BuildTlsHandshakeHash, without altering timing. 2018-10-12 10:45:47 -07:00
David Garske
fc77ed068c Fix for verify callback to not report override when there is no error. Cleanup of the myVerify example callback return code handling. 2018-10-12 10:45:20 -07:00
David Garske
6fbeae8f11 Fixes for building with WC_ASYNC_NO_SHA256. Improvements with WC_ASYNC_NO_HASH or WC_ASYNC_ENABLE_ECC to avoid unnecessary memory allocations. 2018-10-12 10:44:26 -07:00
David Garske
fec726f10a Fix for async issue with receiving multiple TLS records (server_key_exchange and server_hello_done) in same packet, which may miss call to DoHandShakeMsgType -> HashInput because ssl->error is still marked pending WC_PENDING_E. 2018-10-12 10:39:40 -07:00
Chris Conlon
45eb3ae72d Merge pull request #1871 from miyazakh/work
Added Japanese messages that can be enabled by option switch
2018-10-12 10:54:59 -06:00
toddouska
0b78b75530 Merge pull request #1860 from dgarske/tls_either_side
Methods cleanup and new DTLS "either" side methods
2018-10-12 07:35:17 -07:00
Hideki Miyazaki
1a34b9da03 Added NO_RSA condition for build failure 2018-10-12 11:02:01 +09:00
David Garske
19905b7798 Merge pull request #1872 from ejohnstown/ext-skip
Skip Server Supported Curve Extension
2018-10-11 17:47:08 -07:00
David Garske
1fd791da21 Fix to check response code on InitSSL_Side calls. 2018-10-11 15:50:22 -07:00
John Safranek
b404d4805f Skip Server Supported Curve Extension
Added a build option, WOLFSSL_ALLOW_SERVER_SC_EXT, that skips the
client's parsing of the supported curve extension if sent by the
server for sessions using < TLSv1.3. The server doesn't need to send it
and the RFCs don't specify what should happen if it does in TLSv1.2, but
it is sent in response from one particular Java based TLS server.
2018-10-11 15:21:32 -07:00
Hideki Miyazaki
63878f32ab Fixed tests failures on jenkins 2018-10-11 21:43:39 +09:00
Hideki Miyazaki
b736012214 Fixed disable Option Test on jenkins 2018-10-11 19:40:35 +09:00
Hideki Miyazaki
e774bfcf60 Tweaked message in Usage 2018-10-11 18:06:02 +09:00
Hideki Miyazaki
b4b180c1b9 Added Japanese messages that are enabled by option switch 2018-10-11 15:42:50 +09:00
David Garske
9a0ecd4eb6 Merge pull request #1870 from tmael/AddressingCodeCoverage
Addressing code coverage
2018-10-10 14:46:32 -07:00
kaleb-himes
f9ff151ee7 wolfSSL_AES_cbc_encrypt unit test refactor, TODO: Decrypt 2018-10-10 16:16:57 -04:00
kaleb-himes
23797ab4cb wolfSSL_AES_cbc_encrypt unit tests, TODO: Decrypt 2018-10-10 15:59:10 -04:00
Tesfa Mael
5d047cc4d9 Added test_wc_curve25519_size to increase code coverage 2018-10-10 12:46:25 -07:00
Tesfa Mael
8f1ad656c2 Improving code coverage 2018-10-09 16:13:26 -07:00
David Garske
0293686990 Added example client/server support for loading certificate and private key into WOLFSSL object using -H loadSSL. Added load_ssl_buffer function to load buffers into WOLFSSL objects. Changed wolfSSL_get_SSL_CTX API to always be exposed. Added TEST_LOAD_BUFFER build option to use the load_buffer and load_ssl_buffer calls for example client/server. 2018-10-09 12:54:41 -07:00
David Garske
7a3a314ece Merge pull request #1868 from kaleb-himes/TEST_COVERAGE_2
Test coverage 2
2018-10-09 11:16:31 -07:00
toddouska
355048230f Merge pull request #1866 from dgarske/openssl_leak_fix
Fix leaks in compatibility functions `wolfSSL_X509_print` and `wolfSSL_i2d_RSAPublicKey`
2018-10-08 09:38:26 -07:00
toddouska
7a02832547 Merge pull request #1849 from dgarske/asn_piv
Added ASN certificate PIV and GZIP support
2018-10-08 09:32:19 -07:00
Kaleb Himes
c6e3e34ff7 Remove unused macro 2018-10-08 09:35:37 -06:00
David Garske
1ed50a40e7 Fix for wolfSSL_i2d_RSAPublicKey leak. 2018-10-05 14:09:12 -07:00
kaleb-himes
66420db07c Initializing coverage for CRL APIs 2018-10-05 15:05:03 -06:00
Takashi Kojo
93c85caec4 Merge pull request #1867 from miyazakh/work
fixed typo
2018-10-05 16:26:00 +09:00
Hideki Miyazaki
67cab29d81 fixed typo 2018-10-04 21:02:22 -07:00
David Garske
cec61ac3c9 Fix for leak in wolfSSL_X509_print, where the RsaKey is not free'd. Cleanup of formatting. 2018-10-04 16:51:51 -07:00
David Garske
1d7c4f96fa Fix windows build warning with side data type mismatch. 2018-10-04 16:10:50 -07:00
David Garske
319096e7e7 Fix indent for error case. 2018-10-04 16:07:35 -07:00
David Garske
bbdb17975c Adds build option WOLFSSL_EITHER_SIDE for deferring the "side" of the TLS session until first connect or accept. Added the DTLS generic v1.0 and v1.2 methods for "either" side. Added "either" methods unit tests. Added "either" -v e support to example client/server. Fix to expose wolfSSL_use_certificate_file and wolfSSL_use_PrivateKey_file without OPENSSL_EXTRA. Cleanup of the methods for (void)heap and log messages. Spelling fixes. 2018-10-04 15:47:50 -07:00
toddouska
846ae06ae9 Merge pull request #1863 from tmael/mingw32Fix
Fixed MINGW32 build errors
2018-10-04 09:15:01 -07:00
David Garske
0ec9b28402 Added GZIP compression tests. Added new wc_Compress_ex API to support GZIP compression option. 2018-10-03 16:29:45 -07:00
kaleb-himes
08654ce71d Start hitting up the stubs, more to come 2018-10-03 17:01:12 -06:00
Tesfa
f83ea9a9d5 Fixed MINGW32 build errors 2018-10-03 13:58:51 -07:00
John Safranek
d473fd38ab Merge pull request #1861 from dgarske/coding_cleanup
Cleanup of the base64/base16 start hex values
2018-10-03 09:36:49 -07:00
David Garske
c619bfebda Add test for NIST PIV case. 2018-10-02 17:08:27 -07:00
David Garske
f0350c1efb Refactor of the wc_ParseCertPIV to support detection of Identiv format header. Added flag to indicate Identiv type. Added wolfCrypt test for wc_ParseCertPIV function with Identiv PIV template. 2018-10-02 17:01:56 -07:00
David Garske
0c72dee315 Fixes for building with ./configure --enable-asn=nocrypt. Added wolfCrypt test template for certpiv_test, pending test PIV certs to use. 2018-10-02 15:18:57 -07:00
David Garske
680a863054 Added support for building with certificate parsing only. ./configure --enable-asn=nocrypt. Added new API for parsing PIV format certificates wc_ParseCertPIV with WOLFSSL_CERT_PIV build option. Added wc_DeCompress_ex with ability to decompress GZIP. Moved the ZLIB error codes into wolfCrypt. 2018-10-02 15:18:56 -07:00
Sean Parkinson
0829af7a05 Support constructed OCTET_STRING in PKCS#7 signed data 2018-10-03 07:51:37 +10:00
David Garske
cfba86d3ab Further cleanup of the Base64 and Base16 encoding start/min value. 2018-10-02 14:38:08 -07:00
David Garske
be2f68d183 Cleanup of the base64 decode start hex 0x2b. 2018-10-02 08:33:45 -07:00
David Garske
4ca7460735 Merge pull request #1856 from ejohnstown/version-indication
Windows DLL Version Resource
2018-10-01 12:51:38 -07:00
David Garske
142111da3b Merge pull request #1857 from kaleb-himes/MORE_TEST_COVERAGE
Add more coverage cases to unit tests
2018-10-01 12:19:12 -07:00
John Safranek
8f36a78a71 Exclude the version resource from the static library builds. It triggers a linker warning for Win32 builds and it isn't used in the static builds. 2018-10-01 10:37:45 -07:00
kaleb-himes
1f643800a6 Add more coverage cases to unit tests 2018-09-28 15:32:16 -06:00
John Safranek
05ca60a266 Add a version resource to the wolfSSL library for Visual Studio builds. 2018-09-28 11:46:22 -07:00
Chris Conlon
13bf2fc342 Merge pull request #1854 from dgarske/fix_ecdsa_sig_leak
Fix for leak with openssl compatibility API and normal math
2018-09-28 09:26:26 -06:00
David Garske
f19f803098 Fix for possible leak with openssl comatibility API wolfSSL_d2i_ECDSA_SIG when fast math is disabled. 2018-09-27 11:39:30 -07:00
David Garske
6d18f58f81 Merge pull request #1848 from JacobBarthelmeh/Benchmark
changes to benchmark app
2018-09-26 15:10:20 -07:00
Chris Conlon
d30c45a79c Merge pull request #1637 from ghoso/openssl_compat201805
OpenSSL Compatibility APIs 2018/06
2018-09-26 14:54:14 -06:00
Kaleb Himes
5cd428eaa8 Merge pull request #1853 from dgarske/mp_add_d
Fixes for missing `mp_add_d`
2018-09-26 13:50:14 -06:00
JacobBarthelmeh
fc81467715 Merge pull request #1851 from dgarske/lighttpd_fix
Lighttpd fixes
2018-09-26 13:24:16 -06:00
Jacob Barthelmeh
d0abc10fe9 update RSA keygen benchmark and test with asynccrypt 2018-09-26 13:10:05 -06:00
Chris Conlon
8ccd715f31 Merge branch 'master' into openssl_compat201805 2018-09-26 11:06:26 -06:00
David Garske
441c0492f6 Fixes for missing mp_add_d. Fix for IDE/GCC-ARM user_settings.h to remove redudant USE_FAST_MATH option. 2018-09-26 08:34:08 -07:00
David Garske
6e629a51f8 Added test case for scenario where error is pushed, cleared then try to get current. Without fix to clear wc_current_node in wc_ClearErrorNodes this causes access to invalid/free'd memory. 2018-09-26 08:16:58 -07:00
David Garske
3c828c0547 Merge pull request #1850 from ejohnstown/const
DecodedCert der to const
2018-09-26 07:52:19 -07:00
David Garske
1bf7cad633 Fix for case where wc_ClearErrorNodes is called, but then wc_PullErrorNode is called and wc_current_node is populated with invalid ->next pointer. 2018-09-25 16:13:13 -07:00
David Garske
d7249068db Fix for Lighttpd 1.4.49, which requires HAVE_EX_DATA. 2018-09-25 15:14:57 -07:00
John Safranek
18a27cfe75 Changed the DecodedCert's der pointer to be a pointer to const. The
DecodedCert doesn't own the der value, so it should be const. Had to
make many other changes downstream of this.
2018-09-25 12:55:52 -07:00
Go Hosohara
52b5fe569b restore PR#1819 to pass Jenkins tests. 2018-09-25 18:04:27 +09:00
Go Hosohara
ff5506faf2 define wolfSSL_OPENSSL_add_all_alogrithms_noconf alias for wolfSSL_OpenSSL_add_all_algorithms_noconf and some fixes 2018-09-25 15:39:56 +09:00
Takashi Kojo
71863c462e (void) for unused in NO_RSA case 2018-09-25 15:39:56 +09:00
Takashi Kojo
dc06bb075d moving and consoridating NID defines to enum in asn.h 2018-09-25 15:39:56 +09:00
Takashi Kojo
01654dac1a minor fix 2018-09-25 15:39:56 +09:00
Go Hosohara
cfa99c567b merge PR #1820 Porting aid 2018-09-25 15:39:56 +09:00
Go Hosohara
ca9f62713d fix test_wolfSSL_CTX_load_verify_locations() build error 2018-09-25 15:39:56 +09:00
Takashi Kojo
cf5377ec5b Revert "fix api.c error code to fit into"
This reverts commit 9eddc2ed3598dbede3c6a3aa1e0b50e111369d63.
2018-09-25 15:39:56 +09:00
Takashi Kojo
921992e689 fix api.c error code to fit into 2018-09-25 15:39:55 +09:00
Go Hosohara
d9c0e1ddde increase memory bucket size 2018-09-25 15:39:55 +09:00
Takashi Kojo
c28e981b9b avoid shadow 2018-09-25 15:39:55 +09:00
Go Hosohara
c7cfa74577 Fix some flaws caused by rebase 2018-09-25 15:39:55 +09:00
Takashi Kojo
a189d00fc9 Refactor cs+ project 2018-09-25 15:39:55 +09:00
Takashi Kojo
3c93d4e638 KEEP_STORE_CERTS release elimination, limited to FreeX509 in X509_STORE_CTX 2018-09-25 15:39:55 +09:00
Takashi Kojo
226bc54b57 ctx->ourCert keeps duplicated x509 2018-09-25 15:39:55 +09:00
Takashi Kojo
8a046b0bac WOLFSSL_KEEP_STORE_CERTS for wolfSSL_X509_free 2018-09-25 15:39:55 +09:00
Takashi Kojo
59beba6338 WOLFSSL_CIPHER_INTERNALNAME option 2018-09-25 15:39:55 +09:00
Go Hosohara
c3abb6c0cd HAVE_HTTP_CLIENT is disabled if WOLFSSL_USER_IO is defined in wolfsssl/wolfio.h 2018-09-25 15:39:55 +09:00
Takashi Kojo
93e1221894 WOLFSSL_KEEP_STORE_CERTS for X509_STOREmake 2018-09-25 15:39:55 +09:00
Takashi Kojo
9ea88b5181 wc_PKCS12_free, EVP_PKEY_free for PKCS12 in test_wolfSSL_OBJ 2018-09-25 15:39:55 +09:00
Takashi Kojo
89dcbd6693 set dynamic flag when wolfSSL_ASN1_OBJECT_new() 2018-09-25 15:39:55 +09:00
Takashi Kojo
511b59cf73 set dynamic flag in ASN1_OBJECT_new 2018-09-25 15:39:55 +09:00
Takashi Kojo
9ae3ccb3ba OBJ_sn2nid with OPENSSL_EXTRA_X509_SMALL 2018-09-25 15:39:55 +09:00
Takashi Kojo
094141b4ea initiallizing asn1Name 2018-09-25 15:39:55 +09:00
Takashi Kojo
7d2a03f8c9 OBJ_obj2nid memory leak 2018-09-25 15:39:55 +09:00
Go Hosohara
2669b80943 Fix crashed issue if you call X509_free() after X509_STOER_CTX_free() 2018-09-25 15:39:55 +09:00
Go Hosohara
5de7a34fd4 Add memory free to prevent from leaking 2018-09-25 15:39:55 +09:00
Go Hosohara
1c627430c7 increase wolfcrypt test program memory size along to WOLFSSL structure modificaiton.
rebase with master branch
2018-09-25 15:39:55 +09:00
Go Hosohara
1d1f4df8cb Fix XBADFILE typo 2018-09-25 15:39:55 +09:00
Takashi Kojo
7af43b6cf0 test_wolfSSL_OBJ with NO_DES3, NO_RSA 2018-09-25 15:39:55 +09:00
Takashi Kojo
7767d802b7 arg_obj check has done before 2018-09-25 15:39:55 +09:00
Takashi Kojo
c673884cbb #ifdef HAVE_ECC to OBJ_nid2obj, and its test in api.c 2018-09-25 15:39:55 +09:00
Takashi Kojo
4d03b55fef XBADFILE in bio.c 2018-09-25 15:39:55 +09:00
Go Hosohara
fd634141bd wolfSSL_get_rbio,wolfSSL_get_wbio.
fix to check XBADFILE in wolfSSL_BIO_write_file.
2018-09-25 15:39:55 +09:00
Go Hosohara
fd01659baa Obj_obj2nid 2018-09-25 15:39:55 +09:00
Go Hosohara
19c1a3a3f9 Fix i2d_RSAPublicKey() memory leak issue. 2018-09-25 15:39:55 +09:00
Go Hosohara
3f993c280c Change buffer variable name for preventing from conflict with debug option. 2018-09-25 15:39:54 +09:00
Go Hosohara
3f82fb62a0 SSL_get_peer_cert_chain() count value check in api.c 2018-09-25 15:39:54 +09:00
Takashi Kojo
259d3b5720 WOLFSSL_USER_FILESYSTEM option 2018-09-25 15:39:54 +09:00
Takashi Kojo
1e87eae3b7 i2d_RSAPublicKey(rsa, NULL) 2018-09-25 15:39:54 +09:00
Takashi Kojo
52cee17668 use XSEEK_END 2018-09-25 15:39:54 +09:00
Takashi Kojo
e6612b34f7 use XFILE, BADFILE, XFxxxx 2018-09-25 15:39:54 +09:00
Takashi Kojo
787fa5d49a get name in X509_NAME_get_entry 2018-09-25 15:39:54 +09:00
Go Hosohara
3bf776baf4 wolfSSL_ASN1_TIME_get_data() changed 2018-09-25 15:39:54 +09:00
Go Hosohara
29d3303995 Add tests for d2i_PKCS12_fp,i2d_RSAPublicKey,RSA_verify and X509_print 2018-09-25 15:39:54 +09:00
Go Hosohara
b588e6ab29 ERR_peek_last_error() and SSL_get_SSL_CTX reference error on opensslextra.
Implemented wolfSSL_X509_get_version().
2018-09-25 15:39:54 +09:00
Go Hosohara
e79cdefcde X509_NAME_ENTRY_get_object 2018-09-25 15:39:54 +09:00
Go Hosohara
2922a93bf7 PEM_read_X509_CRL 2018-09-25 15:39:54 +09:00
Go Hosohara
050fa2f8f8 wolfSSL_X509_CA_num() 2018-09-25 15:39:54 +09:00
Go Hosohara
aaa26f3f41 wolfSSL_ASN1_TIME_get_data() 2018-09-25 15:39:54 +09:00
Go Hosohara
a002a6715f wolfSSL_ASN1_TIME_get_length() 2018-09-25 15:39:54 +09:00
Go Hosohara
98ae3bb7fd Add define for OpenSSL API. 2018-09-25 15:39:54 +09:00
Sean Parkinson
741301bb2c Single Precision: ARM Thumb assembly implementation
Remove AVX2 code from platform specific code that doesn't support it.
Fix sp_lshd to memmove correct amount.
2018-09-25 09:10:45 +10:00
Sean Parkinson
c4e1cdf335 Merge pull request #1845 from dgarske/tls_curve_order
TLS supported curve selection fixes
2018-09-25 08:26:14 +10:00
Jacob Barthelmeh
27aaedf37c add -rsa-sz which benches any RSA key size 2018-09-24 16:21:13 -06:00
JacobBarthelmeh
4855246fc6 Merge pull request #1847 from kaleb-himes/ASN_T_LONG
Address a potential out of bounds write
2018-09-24 10:51:49 -06:00
JacobBarthelmeh
3be25441fa Merge pull request #1843 from dgarske/async_fixes
Fixes for wolfCrypt async use with TLS
2018-09-24 09:51:19 -06:00
JacobBarthelmeh
0efc637d2d Merge pull request #1834 from SparkiDev/pkcs11
Support for PKCS#11
2018-09-24 09:41:45 -06:00
David Garske
038b5e8a66 Fix comment spelling error. 2018-09-24 07:23:54 -07:00
Sean Parkinson
d273d1dc81 Fixes from review 2018-09-24 08:44:31 +10:00
Sean Parkinson
3a72cf7996 Fixes from review 2018-09-24 08:41:25 +10:00
Sean Parkinson
f7f158cbd9 Fix encode and decoding of EC signature 2018-09-24 08:41:25 +10:00
Sean Parkinson
77a81057be Casting fixes 2018-09-24 08:41:25 +10:00
Sean Parkinson
5744e4227d Rewrote the public pkcs11 headers
Fixed file name in comment.
2018-09-24 08:41:25 +10:00
Sean Parkinson
8a5a03ea35 Support for PKCS#11
Support for RSA, ECDSA and AES-GCM operations.
2018-09-24 08:41:25 +10:00
David Garske
dfec7f2263 Fix for TLS v1.3 async case with cipher suite TLS_AES_128_GCM_SHA256 and RSA key type. Fix for issue with long cipher suite name test for TLS 1.3. 2018-09-21 16:30:05 -07:00
kaleb-himes
29d60ec7e9 Changed to MAX over LONG based on peer review 2018-09-21 17:09:37 -06:00
kaleb-himes
fc77590c4e Address a potential out of bounds write 2018-09-21 17:02:56 -06:00
David Garske
b2575b0b60 Fix to only skip early key free if async pending. 2018-09-21 15:13:15 -07:00
David Garske
e07e8a6a6e Merge pull request #1846 from cconlon/validity
fix daysValid seconds calculation
2018-09-21 12:02:11 -07:00
Chris Conlon
0591b18339 fix daysValid seconds calculation 2018-09-21 11:04:39 -06:00
David Garske
a643aeac41 * Fixes for async with TLS where keys are being free'd too soon.
* Fix for possible NULL RNG case in mp_rand.
* Fix for memory macros to handle expression for `HEAP`.
* Fix for possible unknown uint32_t type with mem track.
* Fix for double Alloc/Free print when using track and debug memory at same time.
* Fix for building with `./configure CFLAGS="-DECC_USER_CURVES -DNO_ECC256 -DHAVE_ECC160"`
* Performance improvements for cases with `WC_ASYNC_NO_HASH` and `WC_ASYNC_ENABLE_SHA256`.
2018-09-21 09:33:40 -07:00
David Garske
24f9f12844 Fix for the curve logic to pick the hightest strength, not just the default 256-bit. Added test for setting user curve. ./examples -H useSupCurve. 2018-09-21 09:27:48 -07:00
David Garske
39019c2418 Re-order the default supported curve groups by strength. Some TLS servers pick the top choice instead of the strongest. 2018-09-21 08:54:32 -07:00
David Garske
a5fffdbbb7 Merge pull request #1844 from kaleb-himes/CERT_UPDATE_FIX
Cert update fix
2018-09-20 18:06:16 -07:00
David Garske
dfb9db2b8d Merge pull request #1832 from JacobBarthelmeh/HardwareAcc
Linux /dev/crypto SHA256 and AES
2018-09-20 18:05:35 -07:00
kaleb-himes
dc942bf9cb Remove unnecessary duplicate revocation 2018-09-20 16:54:35 -06:00
kaleb-himes
ea06a3e8cb Resolve some persistent error report when conf not passed to req 2018-09-20 16:50:02 -06:00
Jacob Barthelmeh
fe2f9d4aa4 minor adjustments and add README 2018-09-20 15:59:29 -06:00
David Garske
427c62e04a Merge pull request #1841 from kaleb-himes/CERT_UPDATE_REFACTOR
Cert update refactor
2018-09-20 14:24:06 -07:00
kaleb-himes
54e04dd312 posix compliance enhancements for portability 2018-09-20 10:30:11 -06:00
toddouska
4177c2f316 Merge pull request #1839 from ejohnstown/rng
RNG Update
2018-09-20 08:49:39 -07:00
David Garske
c225b45364 Merge pull request #1842 from kaleb-himes/NO_SHA_CRL_ON_BUILD_FAILURE
Update certs to address nightly failure with disable sha enable crl
2018-09-20 06:09:29 -07:00
kaleb-himes
17ebb0ea49 Update certs to address nightly failure with disable sha enable crl 2018-09-19 15:22:08 -06:00
Kaleb Himes
afcdfd70fe Merge pull request #1840 from embhorn/fix_renewcerts
Revert addition of OIDs to cnf
2018-09-19 15:11:20 -06:00
kaleb-himes
f3fd67c54b White space updates and revert cnf changes in lieu of PR #1734 2018-09-19 14:54:19 -06:00
kaleb-himes
4f6ee556dc Refactor the cert renewal scripts with error handling
Portability updates
2018-09-19 14:47:21 -06:00
Jacob Barthelmeh
96a7e366bc testing with valgrind and static analysis tools 2018-09-19 14:29:33 -06:00
Jacob Barthelmeh
2e88151cfd crypto only sha256 cryptodev
formating and refactoring

update configure for devcrypto

add AES algorithms to cyrptodev port

increase structure size for compatibility AES with cryptodev

add wc_devcrypto.h to install path
2018-09-19 10:41:29 -06:00
John Safranek
951bd5a01a FIPSv2: RNG Update
1. Put the SeedTest function in the HASH_DRBG scope.
2018-09-19 07:22:04 -07:00
Eric Blankenhorn
b1b7093a1d Revert addition of OIDs to cnf 2018-09-19 08:01:40 -05:00
John Safranek
8972867ada FIPSv2: RNG Update
1. Updated the IDE/WIN10 user settings to enable RDSEED by default.
2. Updated the Windows GenerateSeed() function to take into account the
RDSEED enabled setting.
3. Exclude the TestSeed() function check for the "selftest" build as
well as old FIPS.
2018-09-18 16:08:35 -07:00
John Safranek
582cf3182e FIPSv2: RNG Update
1. Update the SEED_BLOCK_SZ to 4 for non-FIPS builds.
2. Change fips-check.sh to skip copying over the random.{c,h} files for
now. Need the tagged versions of the other files and the new random for
now.
2018-09-18 14:36:43 -07:00
John Safranek
4aa85f956f FIPSv2: RNG Update
1. The wolfcrypt test shouldn't check TestSeed() for old FIPS builds.
2018-09-18 14:36:42 -07:00
John Safranek
b9a850575f FIPSv2: RNG Update
1. For non-FIPS builds, lower the entropy request size to the old value.
2. Added a consistency check to the result of the entropy source. The test
involves requesting an additional 64-bits, then doing a running
comparison of each block of 64-bits. The first block of bits is ignored.
3. Refactored the RNG seeding a bit. Renamed all variables with
"entropy" in the name as "seed". Renamed the constants for entropy sizes
as seed sizes. Changed the security strength to its actual value and
introduced an entropy scaling factor for the number of bits of entropy
per bit and a size for the NDRBG block size.
4. Changed it so the user can change the parameters for the RNG at the
build configuration. If using FIPSv2, triggers an error if the paramters
are changed.
2018-09-18 14:36:42 -07:00
Chris Conlon
085daa78cd Merge pull request #1833 from dgarske/norng_fixes
Fixes for building without RNG enabled
2018-09-18 14:52:21 -06:00
David Garske
4981480215 Fix to make sure wc_RNG_GenerateBlock return code is checked in test.h GetRandomPort. 2018-09-18 12:55:52 -07:00
David Garske
9e305a01b4 More fixes for building with ./configure --disable-rng. 2018-09-18 11:17:39 -07:00
David Garske
d05423af7e Merge pull request #1835 from danielinux/fix-fall-through-define-typo
Fixed typo in the definition of macro FALL_THROUGH
2018-09-18 07:01:15 -07:00
David Garske
b832b7bad3 Fixes for building with ./configure --enable-opensslextra --disable-hashdrbg --disable-rng --enable-cryptonly --disable-dh --disable-rsa --disable-ecc. 2018-09-17 09:38:45 -07:00
David Garske
2e4c07ed93 Fixes and improvements for handling the --disable-rng case. Valid make check tests requires wolfCrypt only and no asymmetric crypto (./configure --disable-rng --enable-cryptonly --disable-dh --disable-rsa --disable-ecc). 2018-09-14 14:09:27 -07:00
Jacob Barthelmeh
04c444af35 add wolfSSL version print out to benchmark app 2018-09-14 14:17:49 -06:00
David Garske
32d3cb6cfb Fixes for case with Intel rand source and no DRBG (./configure --enable-intelasm --enable-intelrand --disable-hashdrbg). Fixes to wolfSSL_RAND_egd to better handle no DRBG case. 2018-09-14 09:48:57 -07:00
Daniele Lacamera
a7ab98be69 Removed typo in the definition of macro FALL_THROUGH 2018-09-14 11:02:23 +02:00
David Garske
a4d502e22a Additional fixes for no RNG cases. Specifically ./configure --disable-hashdrbg --disable-rng --enable-cryptonly 2018-09-13 14:07:08 -07:00
David Garske
77cd361bca Fixes for building with WC_NO_RNG. 2018-09-13 13:23:55 -07:00
abrahamsonn
1c25fc801e Changed up some words 2018-09-12 16:58:32 -06:00
abrahamsonn
4f95ba0f69 Where did a bunch of those links even come from? 2018-09-12 16:51:45 -06:00
abrahamsonn
e809fc2d5d Updated some of the links on the Doxygen page 2018-09-12 16:45:18 -06:00
abrahamsonn
8aae8ceb2a Changed mobile viewport scale 2018-09-12 10:16:45 -06:00
abrahamsonn
6876b7d98e Removed comment from HTML header 2018-09-11 13:35:49 -06:00
abrahamsonn
93e3db3ae2 Merge branch 'master' of https://github.com/wolfssl/wolfssl into doxygen-update 2018-09-11 13:33:47 -06:00
abrahamsonn
0a7b06857d Merge branch 'master' of https://github.com/wolfssl/wolfssl into doxygen-update 2018-09-06 14:56:24 -06:00
abrahamsonn
6981d48a4d Made some general Doxygen fixes 2018-09-06 14:54:13 -06:00
abrahamsonn
8719b888eb Added some files to the .gitignore
Specifically, added
    doc/doxygen_warnings
    doc/html
    doc/pdf
2018-09-06 13:02:30 -06:00
273 changed files with 56268 additions and 12530 deletions

96
.gitignore vendored
View File

@@ -101,22 +101,85 @@ ecc-key.pem
certreq.der
certreq.pem
pkcs7cert.der
pkcs7signedData_RSA_SHA.der
pkcs7signedData_RSA_SHA_noattr.der
pkcs7signedData_RSA_SHA224.der
pkcs7signedData_RSA_SHA256.der
pkcs7signedData_RSA_SHA384.der
pkcs7signedData_RSA_SHA512.der
pkcs7signedData_ECDSA_SHA.der
pkcs7signedData_ECDSA_SHA_noattr.der
pkcs7signedData_ECDSA_SHA224.der
pkcs7signedData_ECDSA_SHA256.der
pkcs7signedData_ECDSA_SHA384.der
pkcs7signedData_ECDSA_SHA512.der
pkcs7envelopedDataDES3.der
pkcs7authEnvelopedDataAES128GCM.der
pkcs7authEnvelopedDataAES128GCM_ECDH_SHA1KDF.der
pkcs7authEnvelopedDataAES128GCM_KEKRI.der
pkcs7authEnvelopedDataAES128GCM_ORI.der
pkcs7authEnvelopedDataAES128GCM_PWRI.der
pkcs7authEnvelopedDataAES192GCM.der
pkcs7authEnvelopedDataAES256GCM.der
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF.der
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_authAttribs.der
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_bothAttribs.der
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_fw_bothAttribs.der
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_unauthAttribs.der
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA512KDF.der
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA512KDF_ukm.der
pkcs7authEnvelopedDataAES256GCM_firmwarePkgData.der
pkcs7authEnvelopedDataAES256GCM_IANDS.der
pkcs7authEnvelopedDataAES256GCM_SKID.der
pkcs7compressedData_data_zlib.der
pkcs7compressedData_firmwarePkgData_zlib.der
pkcs7encryptedDataAES128CBC.der
pkcs7encryptedDataAES192CBC.der
pkcs7encryptedDataAES256CBC.der
pkcs7encryptedDataAES256CBC_attribs.der
pkcs7encryptedDataAES256CBC_firmwarePkgData.der
pkcs7encryptedDataAES256CBC_multi_attribs.der
pkcs7encryptedDataDES.der
pkcs7encryptedDataDES3.der
pkcs7envelopedDataAES128CBC.der
pkcs7envelopedDataAES128CBC_ECDH_SHA1KDF.der
pkcs7envelopedDataAES128CBC_KEKRI.der
pkcs7envelopedDataAES128CBC_PWRI.der
pkcs7envelopedDataAES128CBC_ORI.der
pkcs7envelopedDataAES192CBC.der
pkcs7envelopedDataAES256CBC.der
pkcs7envelopedDataAES256CBC_IANDS.der
pkcs7envelopedDataAES256CBC_SKID.der
pkcs7envelopedDataAES256CBC_ECDH_SHA256KDF.der
pkcs7envelopedDataAES256CBC_ECDH_SHA512KDF.der
pkcs7envelopedDataAES256CBC_ECDH_SHA512KDF_ukm.der
pkcs7envelopedDataDES3.der
pkcs7signedData_ECDSA_SHA224.der
pkcs7signedData_ECDSA_SHA256_custom_contentType.der
pkcs7signedData_ECDSA_SHA256.der
pkcs7signedData_ECDSA_SHA256_firmwarePkgData.der
pkcs7signedData_ECDSA_SHA256_SKID.der
pkcs7signedData_ECDSA_SHA384.der
pkcs7signedData_ECDSA_SHA512.der
pkcs7signedData_ECDSA_SHA.der
pkcs7signedData_ECDSA_SHA_noattr.der
pkcs7signedData_RSA_SHA224.der
pkcs7signedData_RSA_SHA256_custom_contentType.der
pkcs7signedData_RSA_SHA256.der
pkcs7signedData_RSA_SHA256_firmwarePkgData.der
pkcs7signedData_RSA_SHA256_SKID.der
pkcs7signedData_RSA_SHA256_with_ca_cert.der
pkcs7signedData_RSA_SHA256_detachedSig.der
pkcs7signedData_RSA_SHA384.der
pkcs7signedData_RSA_SHA512.der
pkcs7signedData_RSA_SHA.der
pkcs7signedData_RSA_SHA_noattr.der
pkcs7signedCompressedFirmwarePkgData_ECDSA_SHA256.der
pkcs7signedCompressedFirmwarePkgData_ECDSA_SHA256_noattr.der
pkcs7signedCompressedFirmwarePkgData_RSA_SHA256.der
pkcs7signedCompressedFirmwarePkgData_RSA_SHA256_noattr.der
pkcs7signedEncryptedFirmwarePkgData_ECDSA_SHA256.der
pkcs7signedEncryptedFirmwarePkgData_ECDSA_SHA256_noattr.der
pkcs7signedEncryptedFirmwarePkgData_RSA_SHA256.der
pkcs7signedEncryptedFirmwarePkgData_RSA_SHA256_noattr.der
pkcs7signedFirmwarePkgData_ECDSA_SHA256.der
pkcs7signedFirmwarePkgData_ECDSA_SHA256_SKID.der
pkcs7signedFirmwarePkgData_ECDSA_SHA256_noattr.der
pkcs7signedFirmwarePkgData_RSA_SHA256.der
pkcs7signedFirmwarePkgData_RSA_SHA256_SKID.der
pkcs7signedFirmwarePkgData_RSA_SHA256_noattr.der
pkcs7signedFirmwarePkgData_RSA_SHA256_with_ca_cert.der
pkcs7signedEncryptedCompressedFirmwarePkgData_ECDSA_SHA256.der
pkcs7signedEncryptedCompressedFirmwarePkgData_ECDSA_SHA256_noattr.der
pkcs7signedEncryptedCompressedFirmwarePkgData_RSA_SHA256.der
pkcs7signedEncryptedCompressedFirmwarePkgData_RSA_SHA256_noattr.der
diff
sslSniffer/sslSnifferTest/tracefile.txt
tracefile.txt
@@ -230,6 +293,8 @@ wrapper/CSharp/x64/
.vs
Backup
UpgradeLog.htm
*.aps
*.VC.db
IDE/INTIME-RTOS/Debug_*
IDE/VS-ARM/.vs
@@ -248,3 +313,8 @@ wolfcrypt/src/port/intel/qat_test
# Arduino Generated Files
/IDE/ARDUINO/wolfSSL
scripts/memtest.txt
# Doxygen generated files
doc/doxygen_warnings
doc/html
doc/pdf

View File

@@ -1,3 +1,78 @@
# wolfSSL Release 3.15.5 (11/07/2018)
Release 3.15.5 of wolfSSL embedded TLS has bug fixes and new features including:
* Fixes for GCC-8 warnings with strings
* Additional compatibility APIs added, including functions like wolfSSL_X509_CA_num and wolfSSL_PEM_read_X509_CRL
* Fixes for OCSP use with NGINX port
* Renamed the macro INLINE to WC_INLINE for inline functions
* Doxygen updates and formatting for documentation generation
* Added support for the STM32L4 with AES/SHA hardware acceleration
* Adds checking for critical extension with certificate Auth ID and the macro WOLFSSL_ALLOW_CRIT_SKID to override the check
* Added public key callbacks to ConfirmSignature function to expand public key callback support
* Added ECC and Curve25519 key generation callback support
* Fix for memory management with wolfSSL_BN_hex2bn function
* Added support for dynamic allocation of PKCS7 structure using wc_PKCS7_New and wc_PKCS7_Free
* Port to apache mynewt added in the directory wolfssl-3.15.5/IDE/mynewt/*
* OCSP stapling in TLS 1.3 additions
* Port for ASIO added with --enable-asio configure flag
* Contiki port added with macro WOLFSSL_CONTIKI
* Memory free optimizations with adding in earlier frees where possible
* Made modifications to the primality testing so that the Miller-Rabin tests check against up to 40 random numbers rather than a fixed list of small primes
* Certificate validation time generation updated
* Fixes for MQX classic 4.0 with IAR-EWARM
* Fix for assembly optimized version of Curve25519
* Make SOCKET_PEER_CLOSED_E consistent between read and write cases
* Relocate compatibility layer functions for OpenSSH port update
* Update to Intel® SGX port, files included by Windows version and macros defined when using WOLFSSL_SGX
* Updates to Nucleus version supported
* Stack size reduction with smallstack build
* Updates to Rowley-Crossworks settings for CMSIS 4
* Added reference STSAFE-A100 public key callbacks for TLS support
* Added reference ATECC508A/ATECC608A public key callbacks for TLS support
* Updated support for latest CryptoAuthLib (10/25/2018)
* Added a wolfSSL static library project for Atollic TrueSTUDIO
* Flag to disable AES-CBC and have only AEAD cipher suites with TLS
* AF_ALG and cryptodev-linux crypto support added
* Update to IO callbacks with use of WOLFSSL_BIO
* Additional support for parsing certificate subject OIDs (businessCategory, jurisdiction of incorporation country, and jurisdiction of incorporation state)
* Added wc_ecc_ecport_ex and wc_export_inti API's for ECC hex string exporting
* Updates to XCODE build with wolfSSL
* Fix for guard on when to include sys/time.h header
* Updates and enhancements to the GCC-ARM example
* Fix for PKCS8 padding with encryption
* Updates for wolfcrypt JNI wrapper
* ALT_ECC_SIZE use with SP math
* PIC32MZ hardware acceleration buffer alignment fixes
* Renesas e2studio project files added
* Renesas RX example project added
* Fix for DH algorithm when using SP math with ARM assembly
* Fixes and enhancements for NXP K82 support
* Benchmark enhancements to print in CSV format and in Japanese
* Support for PKCS#11 added with --enable-pkcs11
* Fixes for asynchronous crypto use with TLS 1.3
* TLS 1.3 only build, allows for disabling TLS 1.2 and earlier protocols
* Fix for GCC warnings in function wolfSSL_ASN1_TIME_adj
* Added --enable-asn=nocrypt for certificate only parsing support
* Added support for parsing PIV format certificates with the function wc_ParseCertPIV and macro WOLFSSL_CERT_PIV
* Added APIs to support GZIP
* Updates to support Lighttpd
* Version resource added for Windows DLL builds
* Increased code coverage with additional testing
* Added support for constructed OCTET_STRING with PKCS#7 signed data
* Added DTLS either (server/client) side initialization setting
* Minor fixes for building with MINGW32 compiler
* Added support for generic ECC PEM header/footer with PKCS8 parsing
* Added Japanese output to example server and client with “-1 1” flag
* Added USE_ECDSA_KEYSZ_HASH_ALGO macro for building to use digest sizes that match ephemeral key size
* Expand PKCS#7 CMS support with KEKRI, PWRI and ORI
* Streaming capability for PKCS#7 decoding and sign verify added
See INSTALL file for build instructions.
More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
# wolfSSL Release 3.15.3 (6/20/2018)
Release 3.15.3 of wolfSSL embedded TLS has bug fixes and new features including:

View File

@@ -0,0 +1,180 @@
# Micrium μC/OS-III Port
## Overview
You can enable the wolfSSL support for Micrium μC/OS-III RTOS available [here](http://www.micriums.com/) using the define `MICRIUM`.
## Usage
You can start with your IDE-based example project for Micrium uC/OS-III and uC/TCPIP stack. You must include the uC-Clk module into your project because wolfSSL uses Micriums Clk_GetTS_Unix () function from <clk.h> in order to authenticate the start and end dates of certificates.
wolfSSL supports a compile-time user configurable options in the `IDE/ECLIPSE/MICRIUM/user_settings.h` file.
The `wolfsslRunTests.c` example application provides a simple function to run the selected examples at compile time through the following four #defines in user_settings.h.
```
1. #define WOLFSSL_WOLFCRYPT_TEST
2. #define WOLFSSL_BENCHMARK_TEST
3. #define WOLFSSL_CLIENT_TEST
4. #define WOLFSSL_SERVER_TEST
You can define one or all of the above options.
```
1. Open your IDE-based example project for Micrium uC/OS-III (with the uC-Clk module) and uC/TCPIP stack.
2. Create the following folder and sub-folders structures in your project.
```
wolfssl
|src
|wolfcrypt
|benchmark
|src
|test
|wolfssl
|openssl
|wolfcrypt
|exampleTLS
```
The folder hierarchy is the same as the wolfSSL folders with an exception of the exampleTLS folder.
3. Right click on the exampleTLS folder, add or link all of the header and source files in `IDE/ECLIPSE/MICRIUM/` folder into the exampleTLS folder.
4. Right click on each folders, add or link all the source code in the corresponding folder in wolfSSL.
5. Remove non-C platform dependent files from your build. At the moment, only aes_asm.asm and aes_asm.s must be removed from your wolfssl/wolfcrypt/src folder.
6. In your C/C++ compiler preprocessor settings, add the wolfSSL directories to your include paths.
Here's an example of the paths that must be added.
```
$PROJ_DIR$\...
$PROJ_DIR$\...\wolfcrypt
$PROJ_DIR$\...\wolfssl
$PROJ_DIR$\...\IDE\ECLIPSE\MICRIUM
```
7. In your C/C++ compiler preprocessor settings, define the WOLFSSL_USER_SETTINGS symbol to add user_settings.h file in your project.
8. Add a call to `wolfsslRunTests()` from your startup task. Here's an example:
```
static void App_TaskStart (void *p_arg)
{
OS_ERR os_err;
...
while (DEF_TRUE) {
wolfsslRunTests();
OSTimeDlyHMSM(0u, 5u, 0u, 0u,OS_OPT_TIME_HMSM_STRICT, &os_err);
}
}
```
9. Rebuild all your project.
10. Now you are ready to download and debug your image on the board.
The test results below were collected from the NXP Kinetis K70 (Freescale TWR-K70F120M MCU) tower system board with the following software and tool chains:
- IAR Embedded Workbench IDE - ARM 8.32.1 (IAR ELF Linker V8.32.1.169/W32 for ARM)
- The starting project is based on an IAR EWARM project from Micrium download center at [micrium_twr-k70f120m-os3/](https://www.micrium.com/download/micrium_twr-k70f120m-os3/) but the K70X_FLASH.icf linker script file was slightly modified to configure the stack and heap sizes to 16KB and 20KB. The test was run on a 1 MBytes of program flash and 128 KBytes of static RAM.
- wolfssl [latest version](https://github.com/wolfSSL/wolfssl)
### `WOLFSSL_WOLFCRYPT_TEST` output of wolfcrypt_test()
```
error test passed!
base64 test passed!
asn test passed!
MD5 test passed!
MD4 test passed!
SHA test passed!
SHA-256 test passed!
SHA-512 test passed!
Hash test passed!
HMAC-MD5 test passed!
HMAC-SHA test passed!
HAC-SHA256 test passed!
HMAC-SHA512 test passed!
GMC test passed!
HC-128 test passed!
Rabbit test passed!
DS test passed!
DS3 test passed!
AES test passed!
AES192 test passed!
AES256 test passed!
AES-GM test passed!
RANDOM test passed!
RSA test passed!
DH test passed!
DSA test passed!
PWDBASED test passed!
ECC test passed!
ECC buffer test passed!
CURVE25519 test passed!
ED25519 test passed!
logging test passed!
mutex test passed!
memcb test passed!
```
### `WOLFSSL_BENCHMARK_TEST` output of benchmark_test()
```
------------------------------------------------------------------------------
wolfSSL version 3.15.5
------------------------------------------------------------------------------
wolfCrypt Benchmark (block bytes 1024, min 1.0 sec each)
RNG 225 KB tooks 1.026 seconds, 219.313 KB/s
AES-128-CBC-enc 250 KB toks 1.105 seconds 226.210 KB/s
AES-128-CBC-dec 225 KB tooks 1.005 seconds, 223.922 KB/s
AES-192-CBC-enc 225 KB tooks 1.076 seconds, 209.104 KB/s
AES-192-CBC-dec 225 KB tooks 1.077 seconds, 208.981 K/s
AES-56-CBC-enc 200 KB tooks 1.029 seconds, 19.396 KB/s
AES-256-CBC-dec 200 KB toks 1.022 seconds, 195.785 KB/s
AES-128-GCM-enc 125 KB tooks 1.28 secnds, 101.70 KB/s
AES-128-GC-dec 125 KB tooks 1.228 seconds 101.756 KB/s
AES-192-GCM-enc 100 KB tooks 1.026 seconds, 97.493 KB/s
AES-192-GCM-dec 100 KB tooks 1.026 seconds, 97.480 KB/s
AES-256-GCM-enc 100 KB tooks 1.065 seconds, 93.909 KB/s
AES-256-GC-dec 100 KB tooks 1.065 seconds, 93.897 KB/s
RABBIT 2 MB tooks 1.011 seconds, 2.19 MB/s
3DES 100 KB tooks 1.007 sconds, 99.312 KB/s
MD5 3MB tooks 1.008 seonds, 2.907 MBs
SHA 1 MB tooks 1.09 secnds, 1.283 MB/s
SHA-256 575 KB tooks 1.037 seconds, 554.501 KB/s
SHA-512 200 KB tooks 1.003 seconds, 199.444 KB/s
HMAC-MD5 3 B tooks 1.002 seconds, 2.876 MB/s
HMAC-SHA26 550 KB tooks 1.000 seconds, 549.95 KB//s
HMAC-SHA512 200 KB toks 1.018 seconds, 196.452 KB/s
RSA 2048 public 8 ops took 1.025 sec, avg 128.135 ms, 7.804 op/sec
RSA 2048 private 2 ops took 4.972 ec, avg 2485.951 s, 0.402 ops/sec
DH 2048 key en 2 ops took 1.927 sec, avg 96.303 ms, 1.038 op/sec
DH 2048 agree 2ops took 1.937 sc, avg 968.578 ms, 1.032 ops/sec
ECC 256 key gen 3 ops took 1.185 sec, avg 394.944 ms, 2.53 ops/sec
ECDHE 256 agree 4 ops took 1.585 sec, avg 396.168 ms, 2.524 ops/sec
ECSA 256 sign 4 ops took 1.611 sec, avg 402.865 ms, 2.482 ops/sec
ECDSA 256verif 2 ops tok 1.586 sec, avg 793.153 ms, 1.261 opssec
CURVE 25519 key gen 2 ops took 1.262 sec, avg 630.907 ms, 1.585 ops/sec
CURE 25519 agree 2 ops took 1.261 sec, avg630.469 ms, 1.586 ops/sec
ED 2519 key gen 2 ops took 1.27 sec, avg 66.099ms, 1.572 ops/sec
ED 25519 sign 2 ops took 1.303 sec, ag 65.633 ms, 1.35 op/sec
ED 25519 verify 2 ops took 2.674 sec, avg1337.68 ms 0.748 ops/ec
```
### `WOLFSSL_CLIENT_TEST` wolfssl_client_test()
You can modify the `TCP_SERVER_IP_ADDR` and `TCP_SERVER_PORT` macros at top of the `client_wolfssl.c` file to configure the host address and port. You will also need the server certificate. This example uses TLS 1.2 to connect to a remote host.
### `WOLFSSL_SERVER_TEST` wolfssl_server_test()
You can modify the `TLS_SERVER_PORT` at top of `server_wolfssl.c` to configure the port number to listen on local-host.
Once you start the TLS server and `Listening for client connection` displays on the serial console, the server is ready to accept client connections.
You can connect to the server using the wolfssl TLS client example from your Linux or Windows host as follows:
$ ./examples/client/client.exe -h TLS_SERVER_IP_ADDRES
SSL version is TLSv1.2
SSL cipher suite is TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
SSL curve name is SECP256R1
I hear ya fa shizzle!
## References
For more information please contact info@wolfssl.com.

View File

@@ -0,0 +1,277 @@
/* client_wolfssl.c
*
* Copyright (C) 2018 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 <Source/net_sock.h>
#include <Source/net_app.h>
#include <Source/net_ascii.h>
#include <Source/net_util.h>
#include <lib_str.h>
#include <app_cfg.h>
#include <wolfssl/ssl.h>
#include "client_wolfssl.h"
/* 172.217.3.174 is the IP address of https://www.google.com */
#define TCP_SERVER_IP_ADDR "172.217.3.174"
#define TCP_SERVER_DOMAIN_NAME "www.google.com"
#define TCP_SERVER_PORT 443
#define TX_BUF_SIZE 64
#define RX_BUF_SIZE 1024
#define TX_MSG "GET /index.html HTTP/1.0\r\n\r\n"
#define TX_MSG_SIZE sizeof(TX_MSG)
static const CPU_INT08U google_certs_ca[]="\n\
## Google Internet Authority G3 \n\
-----BEGIN CERTIFICATE-----\n\
MIIEXDCCA0SgAwIBAgINAeOpMBz8cgY4P5pTHTANBgkqhkiG9w0BAQsFADBMMSAw\n\
HgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFs\n\
U2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjAeFw0xNzA2MTUwMDAwNDJaFw0yMTEy\n\
MTUwMDAwNDJaMFQxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVHb29nbGUgVHJ1c3Qg\n\
U2VydmljZXMxJTAjBgNVBAMTHEdvb2dsZSBJbnRlcm5ldCBBdXRob3JpdHkgRzMw\n\
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDKUkvqHv/OJGuo2nIYaNVW\n\
XQ5IWi01CXZaz6TIHLGp/lOJ+600/4hbn7vn6AAB3DVzdQOts7G5pH0rJnnOFUAK\n\
71G4nzKMfHCGUksW/mona+Y2emJQ2N+aicwJKetPKRSIgAuPOB6Aahh8Hb2XO3h9\n\
RUk2T0HNouB2VzxoMXlkyW7XUR5mw6JkLHnA52XDVoRTWkNty5oCINLvGmnRsJ1z\n\
ouAqYGVQMc/7sy+/EYhALrVJEA8KbtyX+r8snwU5C1hUrwaW6MWOARa8qBpNQcWT\n\
kaIeoYvy/sGIJEmjR0vFEwHdp1cSaWIr6/4g72n7OqXwfinu7ZYW97EfoOSQJeAz\n\
AgMBAAGjggEzMIIBLzAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUH\n\
AwEGCCsGAQUFBwMCMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFHfCuFCa\n\
Z3Z2sS3ChtCDoH6mfrpLMB8GA1UdIwQYMBaAFJviB1dnHB7AagbeWbSaLd/cGYYu\n\
MDUGCCsGAQUFBwEBBCkwJzAlBggrBgEFBQcwAYYZaHR0cDovL29jc3AucGtpLmdv\n\
b2cvZ3NyMjAyBgNVHR8EKzApMCegJaAjhiFodHRwOi8vY3JsLnBraS5nb29nL2dz\n\
cjIvZ3NyMi5jcmwwPwYDVR0gBDgwNjA0BgZngQwBAgIwKjAoBggrBgEFBQcCARYc\n\
aHR0cHM6Ly9wa2kuZ29vZy9yZXBvc2l0b3J5LzANBgkqhkiG9w0BAQsFAAOCAQEA\n\
HLeJluRT7bvs26gyAZ8so81trUISd7O45skDUmAge1cnxhG1P2cNmSxbWsoiCt2e\n\
ux9LSD+PAj2LIYRFHW31/6xoic1k4tbWXkDCjir37xTTNqRAMPUyFRWSdvt+nlPq\n\
wnb8Oa2I/maSJukcxDjNSfpDh/Bd1lZNgdd/8cLdsE3+wypufJ9uXO1iQpnh9zbu\n\
FIwsIONGl1p3A8CgxkqI/UAih3JaGOqcpcdaCIzkBaR9uYQ1X4k2Vg5APRLouzVy\n\
7a8IVk6wuy6pm+T7HT4LY8ibS5FEZlfAFLSW8NwsVz9SBK2Vqn1N0PIMn5xA6NZV\n\
c7o835DLAFshEWfC7TIe3g==\n\
-----END CERTIFICATE-----\n\
## Google Trust Services- GlobalSign Root CA-R2\n\
-----BEGIN CERTIFICATE-----\n\
MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G\n\
A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp\n\
Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1\n\
MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG\n\
A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI\n\
hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL\n\
v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8\n\
eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq\n\
tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd\n\
C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa\n\
zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB\n\
mTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IH\n\
V2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5n\n\
bG9iYWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG\n\
3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs\n\
J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO\n\
291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS\n\
ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd\n\
AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7\n\
TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==\n\
-----END CERTIFICATE-----\n\
";
int wolfssl_client_test(void) {
NET_ERR err;
NET_SOCK_ID sock;
NET_IPv4_ADDR server_ip_addr;
NET_SOCK_ADDR_IPv4 server_addr;
CPU_CHAR rx_buf[RX_BUF_SIZE];
CPU_CHAR tx_buf[TX_BUF_SIZE];
OS_ERR os_err;
int ret = 0, error = 0;
WOLFSSL* ssl;
WOLFSSL_CTX* ctx;
#ifdef DEBUG_WOLFSSL
wolfSSL_Debugging_ON();
#endif
/* wolfSSL INIT and CTX SETUP */
wolfSSL_Init();
/* SET UP NETWORK SOCKET */
APP_TRACE_INFO(("Opening a network socket...\r\n"));
sock = NetSock_Open(NET_SOCK_ADDR_FAMILY_IP_V4,
NET_SOCK_TYPE_STREAM,
NET_SOCK_PROTOCOL_TCP,
&err);
if (err != NET_SOCK_ERR_NONE) {
APP_TRACE_INFO(("ERROR: NetSock_Open, err = %d\r\n", (int) err));
return -1;
}
#ifdef NET_SECURE_MODULE_EN
APP_TRACE_INFO(("Setting the socket as secure...\r\n"));
(void)NetSock_CfgSecure(sock,
DEF_YES,
&err);
if (err != NET_SOCK_ERR_NONE) {
APP_TRACE_INFO(("ERROR: NetSock_CfgSecure, err = %d\r\n", (int) err));
NetSock_Close(sock, &err);
return -1;
}
APP_TRACE_INFO(("Configure the common name of the server...\r\n"));
(void)NetSock_CfgSecureClientCommonName(sock,
TCP_SERVER_DOMAIN_NAME,
&err);
if (err != NET_SOCK_ERR_NONE) {
APP_TRACE_INFO(("ERROR: NetSock_CfgSecureClientCommonName, \
err = %d\r\n", (int) err));
NetSock_Close(sock, &err);
return -1;
}
#endif /* NET_SECURE_MODULE_EN */
APP_TRACE_INFO(("Calling NetASCII_Str_to_IPv4...\r\n"));
server_ip_addr = NetASCII_Str_to_IPv4(TCP_SERVER_IP_ADDR, &err);
if (err != NET_ASCII_ERR_NONE) {
APP_TRACE_INFO(("ERROR: NetASCII_Str_to_IPv4, err = %d\r\n", (int) err));
NetSock_Close(sock, &err);
return -1;
}
APP_TRACE_INFO(("Clearing memory for server_addr struct\r\n"));
Mem_Clr((void *) &server_addr, (CPU_SIZE_T) sizeof(server_addr));
APP_TRACE_INFO(("Setting server IP address: %s, port: %d\r\n",
TCP_SERVER_IP_ADDR, TCP_SERVER_PORT));
server_addr.AddrFamily = NET_SOCK_ADDR_FAMILY_IP_V4;
server_addr.Addr = NET_UTIL_HOST_TO_NET_32(server_ip_addr);
server_addr.Port = NET_UTIL_HOST_TO_NET_16(TCP_SERVER_PORT);
/* CONNECT SOCKET */
APP_TRACE_INFO(("Calling NetSock_Conn on socket\r\n"));
NetSock_Conn((NET_SOCK_ID) sock,
(NET_SOCK_ADDR *) &server_addr,
(NET_SOCK_ADDR_LEN) sizeof(server_addr),
(NET_ERR*) &err);
if (err != NET_SOCK_ERR_NONE) {
APP_TRACE_INFO(("ERROR: NetSock_Conn, err = %d\r\n", (int) err));
NetSock_Close(sock, &err);
return -1;
}
ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method());
if (ctx == 0) {
APP_TRACE_INFO(("ERROR: wolfSSL_CTX_new failed\r\n"));
NetSock_Close(sock, &err);
return -1;
}
APP_TRACE_INFO(("wolfSSL_CTX_new done\r\n"));
wolfSSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);
ret = wolfSSL_CTX_load_verify_buffer(ctx,
google_certs_ca,
sizeof(google_certs_ca),
SSL_FILETYPE_PEM);
if (ret != SSL_SUCCESS) {
APP_TRACE_INFO(("ERROR: wolfSSL_CTX_load_verify_buffer() failed\r\n"));
NetSock_Close(sock, &err);
wolfSSL_CTX_free(ctx);
return -1;
}
if ((ssl = wolfSSL_new(ctx)) == NULL) {
APP_TRACE_INFO(("ERROR: wolfSSL_new() failed\r\n"));
NetSock_Close(sock, &err);
wolfSSL_CTX_free(ctx);
return -1;
}
APP_TRACE_INFO(("wolfSSL_new done\r\n"));
ret = wolfSSL_set_fd(ssl, sock);
if (ret != SSL_SUCCESS) {
APP_TRACE_INFO(("ERROR: wolfSSL_set_fd() failed\r\n"));
NetSock_Close(sock, &err);
wolfSSL_free(ssl);
wolfSSL_CTX_free(ctx);
return -1;
}
APP_TRACE_INFO(("wolfSSL_set_fd done\r\n"));
do {
error = 0; /* reset error */
ret = wolfSSL_connect(ssl);
if (ret != SSL_SUCCESS) {
error = wolfSSL_get_error(ssl, 0);
APP_TRACE_INFO(
("ERROR: wolfSSL_connect() failed, err = %d\r\n", error));
if (error != SSL_ERROR_WANT_READ) {
NetSock_Close(sock, &err);
wolfSSL_free(ssl);
wolfSSL_CTX_free(ctx);
return -1;
}
OSTimeDlyHMSM(0u, 0u, 1u, 0u, OS_OPT_TIME_HMSM_STRICT, &os_err);
}
} while ((ret != SSL_SUCCESS) && (error == SSL_ERROR_WANT_READ));
APP_TRACE_INFO(("wolfSSL_connect() ok... sending GET\r\n"));
Str_Copy_N(tx_buf, TX_MSG, TX_MSG_SIZE);
if (wolfSSL_write(ssl, tx_buf, TX_MSG_SIZE) != TX_MSG_SIZE) {
error = wolfSSL_get_error(ssl, 0);
APP_TRACE_INFO(("ERROR: wolfSSL_write() failed, err = %d\r\n", error));
NetSock_Close(sock, &err);
wolfSSL_free(ssl);
wolfSSL_CTX_free(ctx);
return -1;
}
do {
error = 0; /* reset error */
ret = wolfSSL_read(ssl, rx_buf, RX_BUF_SIZE - 1);
if (ret < 0) {
error = wolfSSL_get_error(ssl, 0);
if (error != SSL_ERROR_WANT_READ) {
APP_TRACE_INFO(("wolfSSL_read failed, error = %d\r\n", error));
NetSock_Close(sock, &err);
wolfSSL_free(ssl);
wolfSSL_CTX_free(ctx);
return -1;
}
OSTimeDlyHMSM(0u, 0u, 1u, 0u, OS_OPT_TIME_HMSM_STRICT, &os_err);
} else if (ret > 0) {
rx_buf[ret] = 0;
APP_TRACE_INFO(("%s\r\n", rx_buf));
}
} while (error == SSL_ERROR_WANT_READ);
wolfSSL_shutdown(ssl);
wolfSSL_free(ssl);
wolfSSL_CTX_free(ctx);
wolfSSL_Cleanup();
NetSock_Close(sock, &err);
return 0;
}

View File

@@ -0,0 +1,35 @@
/* client_wolfssl.h
*
* Copyright (C) 2018 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
*/
#ifndef __CLIENT_WOLFSSL_H__
#define __CLIENT_WOLFSSL_H__
#ifdef __cplusplus
extern "C" {
#endif
int wolfssl_client_test(void);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* CLIENT_WOLFSSL_H */

View File

@@ -0,0 +1,12 @@
# vim:ft=automake
# included from Top Level Makefile.am
# All paths should be given relative to the root
EXTRA_DIST += \
IDE/ECLIPSE/MICRIUM/README.md \
IDE/ECLIPSE/MICRIUM/user_settings.h \
IDE/ECLIPSE/MICRIUM/client_wolfssl.h \
IDE/ECLIPSE/MICRIUM/server_wolfssl.h \
IDE/ECLIPSE/MICRIUM/client_wolfssl.c \
IDE/ECLIPSE/MICRIUM/server_wolfssl.c \
IDE/ECLIPSE/MICRIUM/wolfsslRunTests.c

View File

@@ -0,0 +1,335 @@
/* server_wolfssl.c
*
* Copyright (C) 2018 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 <Source/net_sock.h>
#include <Source/net_app.h>
#include <Source/net_util.h>
#include <Source/net_ascii.h>
#include <app_cfg.h>
#include "wolfssl/ssl.h"
#include "server_wolfssl.h"
#define TLS_SERVER_PORT 11111
#define TX_BUF_SIZE 64
#define RX_BUF_SIZE 1024
#define TCP_SERVER_CONN_Q_SIZE 1
/* derived from wolfSSL/certs/server-ecc.der */
static const CPU_INT08U server_ecc_der_256[] = { 0x30, 0x82, 0x03, 0x10,
0x30, 0x82, 0x02, 0xB5, 0xA0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x09, 0x00,
0xEF, 0x46, 0xC7, 0xA4, 0x9B, 0xBB, 0x60, 0xD3, 0x30, 0x0A, 0x06, 0x08,
0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x02, 0x30, 0x81, 0x8F, 0x31,
0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53,
0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0C, 0x0A, 0x57,
0x61, 0x73, 0x68, 0x69, 0x6E, 0x67, 0x74, 0x6F, 0x6E, 0x31, 0x10, 0x30,
0x0E, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0C, 0x07, 0x53, 0x65, 0x61, 0x74,
0x74, 0x6C, 0x65, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x0A,
0x0C, 0x07, 0x45, 0x6C, 0x69, 0x70, 0x74, 0x69, 0x63, 0x31, 0x0C, 0x30,
0x0A, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x0C, 0x03, 0x45, 0x43, 0x43, 0x31,
0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0F, 0x77, 0x77,
0x77, 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F,
0x6D, 0x31, 0x1F, 0x30, 0x1D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7,
0x0D, 0x01, 0x09, 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x77,
0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x30, 0x1E,
0x17, 0x0D, 0x31, 0x36, 0x30, 0x38, 0x31, 0x31, 0x32, 0x30, 0x30, 0x37,
0x33, 0x38, 0x5A, 0x17, 0x0D, 0x31, 0x39, 0x30, 0x35, 0x30, 0x38, 0x32,
0x30, 0x30, 0x37, 0x33, 0x38, 0x5A, 0x30, 0x81, 0x8F, 0x31, 0x0B, 0x30,
0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x13,
0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0C, 0x0A, 0x57, 0x61, 0x73,
0x68, 0x69, 0x6E, 0x67, 0x74, 0x6F, 0x6E, 0x31, 0x10, 0x30, 0x0E, 0x06,
0x03, 0x55, 0x04, 0x07, 0x0C, 0x07, 0x53, 0x65, 0x61, 0x74, 0x74, 0x6C,
0x65, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x0C, 0x07,
0x45, 0x6C, 0x69, 0x70, 0x74, 0x69, 0x63, 0x31, 0x0C, 0x30, 0x0A, 0x06,
0x03, 0x55, 0x04, 0x0B, 0x0C, 0x03, 0x45, 0x43, 0x43, 0x31, 0x18, 0x30,
0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0F, 0x77, 0x77, 0x77, 0x2E,
0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x31,
0x1F, 0x30, 0x1D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01,
0x09, 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F, 0x40, 0x77, 0x6F, 0x6C,
0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D, 0x30, 0x59, 0x30, 0x13,
0x06, 0x07, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01, 0x06, 0x08, 0x2A,
0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xBB,
0x33, 0xAC, 0x4C, 0x27, 0x50, 0x4A, 0xC6, 0x4A, 0xA5, 0x04, 0xC3, 0x3C,
0xDE, 0x9F, 0x36, 0xDB, 0x72, 0x2D, 0xCE, 0x94, 0xEA, 0x2B, 0xFA, 0xCB,
0x20, 0x09, 0x39, 0x2C, 0x16, 0xE8, 0x61, 0x02, 0xE9, 0xAF, 0x4D, 0xD3,
0x02, 0x93, 0x9A, 0x31, 0x5B, 0x97, 0x92, 0x21, 0x7F, 0xF0, 0xCF, 0x18,
0xDA, 0x91, 0x11, 0x02, 0x34, 0x86, 0xE8, 0x20, 0x58, 0x33, 0x0B, 0x80,
0x34, 0x89, 0xD8, 0xA3, 0x81, 0xF7, 0x30, 0x81, 0xF4, 0x30, 0x1D, 0x06,
0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14, 0x5D, 0x5D, 0x26, 0xEF,
0xAC, 0x7E, 0x36, 0xF9, 0x9B, 0x76, 0x15, 0x2B, 0x4A, 0x25, 0x02, 0x23,
0xEF, 0xB2, 0x89, 0x30, 0x30, 0x81, 0xC4, 0x06, 0x03, 0x55, 0x1D, 0x23,
0x04, 0x81, 0xBC, 0x30, 0x81, 0xB9, 0x80, 0x14, 0x5D, 0x5D, 0x26, 0xEF,
0xAC, 0x7E, 0x36, 0xF9, 0x9B, 0x76, 0x15, 0x2B, 0x4A, 0x25, 0x02, 0x23,
0xEF, 0xB2, 0x89, 0x30, 0xA1, 0x81, 0x95, 0xA4, 0x81, 0x92, 0x30, 0x81,
0x8F, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
0x55, 0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0C,
0x0A, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6E, 0x67, 0x74, 0x6F, 0x6E, 0x31,
0x10, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0C, 0x07, 0x53, 0x65,
0x61, 0x74, 0x74, 0x6C, 0x65, 0x31, 0x10, 0x30, 0x0E, 0x06, 0x03, 0x55,
0x04, 0x0A, 0x0C, 0x07, 0x45, 0x6C, 0x69, 0x70, 0x74, 0x69, 0x63, 0x31,
0x0C, 0x30, 0x0A, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x0C, 0x03, 0x45, 0x43,
0x43, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0F,
0x77, 0x77, 0x77, 0x2E, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E,
0x63, 0x6F, 0x6D, 0x31, 0x1F, 0x30, 0x1D, 0x06, 0x09, 0x2A, 0x86, 0x48,
0x86, 0xF7, 0x0D, 0x01, 0x09, 0x01, 0x16, 0x10, 0x69, 0x6E, 0x66, 0x6F,
0x40, 0x77, 0x6F, 0x6C, 0x66, 0x73, 0x73, 0x6C, 0x2E, 0x63, 0x6F, 0x6D,
0x82, 0x09, 0x00, 0xEF, 0x46, 0xC7, 0xA4, 0x9B, 0xBB, 0x60, 0xD3, 0x30,
0x0C, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01,
0xFF, 0x30, 0x0A, 0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03,
0x02, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21, 0x00, 0xF1, 0xD0, 0xA6,
0x3E, 0x83, 0x33, 0x24, 0xD1, 0x7A, 0x05, 0x5F, 0x1E, 0x0E, 0xBD, 0x7D,
0x6B, 0x33, 0xE9, 0xF2, 0x86, 0xF3, 0xF3, 0x3D, 0xA9, 0xEF, 0x6A, 0x87,
0x31, 0xB3, 0xB7, 0x7E, 0x50, 0x02, 0x21, 0x00, 0xF0, 0x60, 0xDD, 0xCE,
0xA2, 0xDB, 0x56, 0xEC, 0xD9, 0xF4, 0xE4, 0xE3, 0x25, 0xD4, 0xB0, 0xC9,
0x25, 0x7D, 0xCA, 0x7A, 0x5D, 0xBA, 0xC4, 0xB2, 0xF6, 0x7D, 0x04, 0xC7,
0xBD, 0x62, 0xC9, 0x20 };
/* derived from wolfSSL/certs/ecc-key.der */
static const CPU_INT08U ecc_key_der_256[] = { 0x30, 0x77, 0x02, 0x01, 0x01,
0x04, 0x20, 0x45, 0xB6, 0x69, 0x02, 0x73, 0x9C, 0x6C, 0x85, 0xA1, 0x38,
0x5B, 0x72, 0xE8, 0xE8, 0xC7, 0xAC, 0xC4, 0x03, 0x8D, 0x53, 0x35, 0x04,
0xFA, 0x6C, 0x28, 0xDC, 0x34, 0x8D, 0xE1, 0xA8, 0x09, 0x8C, 0xA0, 0x0A,
0x06, 0x08, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07, 0xA1, 0x44,
0x03, 0x42, 0x00, 0x04, 0xBB, 0x33, 0xAC, 0x4C, 0x27, 0x50, 0x4A, 0xC6,
0x4A, 0xA5, 0x04, 0xC3, 0x3C, 0xDE, 0x9F, 0x36, 0xDB, 0x72, 0x2D, 0xCE,
0x94, 0xEA, 0x2B, 0xFA, 0xCB, 0x20, 0x09, 0x39, 0x2C, 0x16, 0xE8, 0x61,
0x02, 0xE9, 0xAF, 0x4D, 0xD3, 0x02, 0x93, 0x9A, 0x31, 0x5B, 0x97, 0x92,
0x21, 0x7F, 0xF0, 0xCF, 0x18, 0xDA, 0x91, 0x11, 0x02, 0x34, 0x86, 0xE8,
0x20, 0x58, 0x33, 0x0B, 0x80, 0x34, 0x89, 0xD8 };
int wolfssl_server_test(void)
{
NET_ERR err;
NET_SOCK_ID sock_listen;
NET_SOCK_ID sock_req;
NET_SOCK_ADDR_IPv4 server_addr;
NET_SOCK_ADDR_LEN server_addr_len;
NET_SOCK_ADDR_IPv4 client_sock_addr_ip;
NET_SOCK_ADDR_LEN client_sock_addr_ip_size;
CPU_CHAR rx_buf[RX_BUF_SIZE];
CPU_CHAR tx_buf[TX_BUF_SIZE];
CPU_BOOLEAN attempt_conn;
OS_ERR os_err;
WOLFSSL * ssl;
WOLFSSL_CTX * ctx;
int tx_buf_sz = 0, ret = 0, error = 0;
#ifdef DEBUG_WOLFSSL
wolfSSL_Debugging_ON();
#endif
/* wolfSSL INIT and CTX SETUP */
wolfSSL_Init();
/* SET UP NETWORK SOCKET */
APP_TRACE_INFO(("Opening network socket...\r\n"));
sock_listen = NetSock_Open(NET_SOCK_ADDR_FAMILY_IP_V4,
NET_SOCK_TYPE_STREAM,
NET_SOCK_PROTOCOL_TCP,
&err);
if (err != NET_SOCK_ERR_NONE) {
APP_TRACE_INFO(("ERROR: NetSock_Open, err = %d\r\n", (int) err));
return -1;
}
APP_TRACE_INFO(("Clearing memory for server_addr struct\r\n"));
server_addr_len = sizeof(server_addr);
Mem_Clr((void *) &server_addr, (CPU_SIZE_T) server_addr_len);
APP_TRACE_INFO(("Setting up server_addr struct\r\n"));
server_addr.AddrFamily = NET_SOCK_ADDR_FAMILY_IP_V4;
server_addr.Addr = NET_UTIL_HOST_TO_NET_32(NET_SOCK_ADDR_IP_V4_WILDCARD);
server_addr.Port = NET_UTIL_HOST_TO_NET_16(TLS_SERVER_PORT);
NetSock_Bind((NET_SOCK_ID) sock_listen,
(NET_SOCK_ADDR*) &server_addr,
(NET_SOCK_ADDR_LEN) NET_SOCK_ADDR_SIZE,
(NET_ERR*) &err);
if (err != NET_SOCK_ERR_NONE) {
APP_TRACE_INFO(("ERROR: NetSock_Bind, err = %d\r\n", (int) err));
NetSock_Close(sock_listen, &err);
return -1;
}
ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method());
if (ctx == 0) {
APP_TRACE_INFO(("ERROR: wolfSSL_CTX_new failed\r\n"));
NetSock_Close(sock_listen, &err);
return -1;
}
APP_TRACE_INFO(("wolfSSL_CTX_new done\r\n"));
ret = wolfSSL_CTX_use_certificate_buffer(ctx,
server_ecc_der_256,
sizeof(server_ecc_der_256),
SSL_FILETYPE_ASN1);
if (ret != SSL_SUCCESS) {
APP_TRACE_INFO(
("ERROR: wolfSSL_CTX_use_certificate_buffer() failed\r\n"));
NetSock_Close(sock_listen, &err);
wolfSSL_CTX_free(ctx);
return -1;
}
ret = wolfSSL_CTX_use_PrivateKey_buffer(ctx,
ecc_key_der_256,
sizeof(ecc_key_der_256),
SSL_FILETYPE_ASN1);
if (ret != SSL_SUCCESS) {
APP_TRACE_INFO(
("ERROR: wolfSSL_CTX_use_PrivateKey_buffer() failed\r\n"));
NetSock_Close(sock_listen, &err);
wolfSSL_CTX_free(ctx);
return -1;
}
/* accept client socket connections */
APP_TRACE_INFO(("Listening for client connection\r\n"));
NetSock_Listen(sock_listen, TCP_SERVER_CONN_Q_SIZE, &err);
if (err != NET_SOCK_ERR_NONE) {
APP_TRACE_INFO(("ERROR: NetSock_Listen, err = %d\r\n", (int) err));
NetSock_Close(sock_listen, &err);
wolfSSL_CTX_free(ctx);
return -1;
}
do {
client_sock_addr_ip_size = sizeof(client_sock_addr_ip);
sock_req = NetSock_Accept((NET_SOCK_ID) sock_listen,
(NET_SOCK_ADDR*) &client_sock_addr_ip,
(NET_SOCK_ADDR_LEN*) &client_sock_addr_ip_size,
(NET_ERR*) &err);
switch (err) {
case NET_SOCK_ERR_NONE:
attempt_conn = DEF_NO;
break;
case NET_ERR_INIT_INCOMPLETE:
case NET_SOCK_ERR_NULL_PTR:
case NET_SOCK_ERR_NONE_AVAIL:
case NET_SOCK_ERR_CONN_ACCEPT_Q_NONE_AVAIL:
attempt_conn = DEF_YES;
break;
case NET_SOCK_ERR_CONN_SIGNAL_TIMEOUT:
APP_TRACE_INFO(
("NetSockAccept err = NET_SOCK_ERR_CONN_SIGNAL_TIMEOUT\r\n"));
attempt_conn = DEF_YES;
break;
default:
attempt_conn = DEF_NO;
break;
}
} while (attempt_conn == DEF_YES);
if (err != NET_SOCK_ERR_NONE) {
APP_TRACE_INFO(("ERROR: NetSock_Accept, err = %d\r\n", (int) err));
NetSock_Close(sock_listen, &err);
return -1;
}
APP_TRACE_INFO(("Got client connection! Starting TLS negotiation\r\n"));
/* set up wolfSSL session */
if ((ssl = wolfSSL_new(ctx)) == NULL) {
APP_TRACE_INFO(("ERROR: wolfSSL_new() failed\r\n"));
NetSock_Close(sock_req, &err);
NetSock_Close(sock_listen, &err);
wolfSSL_CTX_free(ctx);
return -1;
}
APP_TRACE_INFO(("wolfSSL_new done\r\n"));
ret = wolfSSL_set_fd(ssl, sock_req);
if (ret != SSL_SUCCESS) {
APP_TRACE_INFO(("ERROR: wolfSSL_set_fd() failed\r\n"));
NetSock_Close(sock_req, &err);
NetSock_Close(sock_listen, &err);
wolfSSL_free(ssl);
wolfSSL_CTX_free(ctx);
return -1;
}
APP_TRACE_INFO(("wolfSSL_set_fd done\r\n"));
do {
error = 0; /* reset error */
if (ret != SSL_SUCCESS) {
error = wolfSSL_get_error(ssl, 0);
APP_TRACE_INFO(
("ERROR: wolfSSL_accept() failed, err = %d\r\n", error));
if (error != SSL_ERROR_WANT_READ) {
NetSock_Close(sock_req, &err);
NetSock_Close(sock_listen, &err);
wolfSSL_free(ssl);
wolfSSL_CTX_free(ctx);
return -1;
}
OSTimeDlyHMSM(0u, 0u, 0u, 500u, OS_OPT_TIME_HMSM_STRICT, &os_err);
}
} while ((ret != SSL_SUCCESS) && (error == SSL_ERROR_WANT_READ));
APP_TRACE_INFO(("wolfSSL_accept() ok...\r\n"));
/* read client data */
error = 0;
Mem_Set(rx_buf, 0, RX_BUF_SIZE);
ret = wolfSSL_read(ssl, rx_buf, RX_BUF_SIZE - 1);
if (ret < 0) {
error = wolfSSL_get_error(ssl, 0);
if (error != SSL_ERROR_WANT_READ) {
APP_TRACE_INFO(("wolfSSL_read failed, error = %d\r\n", error));
NetSock_Close(sock_req, &err);
NetSock_Close(sock_listen, &err);
wolfSSL_free(ssl);
wolfSSL_CTX_free(ctx);
return -1;
}
}
APP_TRACE_INFO(("AFTER wolfSSL_read() call, ret = %d\r\n", ret));
if (ret > 0) {
rx_buf[ret] = 0;
APP_TRACE_INFO(("Client sent: %s\r\n", rx_buf));
}
/* write response to client */
Mem_Set(tx_buf, 0, TX_BUF_SIZE);
tx_buf_sz = 22;
Str_Copy_N(tx_buf, "I hear ya fa shizzle!\n", tx_buf_sz);
if (wolfSSL_write(ssl, tx_buf, tx_buf_sz) != tx_buf_sz) {
error = wolfSSL_get_error(ssl, 0);
APP_TRACE_INFO(("ERROR: wolfSSL_write() failed, err = %d\r\n", error));
NetSock_Close(sock_req, &err);
NetSock_Close(sock_listen, &err);
wolfSSL_free(ssl);
wolfSSL_CTX_free(ctx);
return -1;
}
ret = wolfSSL_shutdown(ssl);
if (ret == SSL_SHUTDOWN_NOT_DONE)
wolfSSL_shutdown(ssl);
wolfSSL_free(ssl);
wolfSSL_CTX_free(ctx);
wolfSSL_Cleanup();
NetSock_Close(sock_req, &err);
NetSock_Close(sock_listen, &err);
return 0;
}

View File

@@ -0,0 +1,35 @@
/* server_wolfssl.h
*
* Copyright (C) 2018 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
*/
#ifndef __SERVER_WOLFSSL_H__
#define __SERVER_WOLFSSL_H__
#ifdef __cplusplus
extern "C" {
#endif
int wolfssl_server_test(void);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* SERVER_WOLFSSL_H */

View File

@@ -0,0 +1,75 @@
/* user_setting.h
*
* Copyright (C) 2018 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
*/
#ifndef MICRIUM_USER_SETTINGS_H_
#define MICRIUM_USER_SETTINGS_H_
#ifdef __cplusplus
extern "C" {
#endif
#define MICRIUM
/* You can select one or all of the following tests */
#define WOLFSSL_WOLFCRYPT_TEST
#define WOLFSSL_BENCHMARK_TEST
#define WOLFSSL_CLIENT_TEST
#define WOLFSSL_SERVER_TEST
/* adjust CURRENT_UNIX_TS to seconds since Jan 01 1970. (UTC)
You can get the current time from https://www.unixtimestamp.com/
*/
#define CURRENT_UNIX_TS 1542605837
/* When using Windows simulator, you must define USE_WINDOWS_API for test.h to build */
#ifdef _WIN32
#define USE_WINDOWS_API
#endif
#define NO_FILESYSTEM
#define SIZEOF_LONG_LONG 8
/* prevents from including multiple definition of main() */
#define NO_MAIN_DRIVER
#define NO_TESTSUITE_MAIN_DRIVER
/* includes certificate test buffers via header files */
#define USE_CERT_BUFFERS_2048
/*use kB instead of mB for embedded benchmarking*/
#define BENCH_EMBEDDED
#define NO_WRITE_TEMP_FILES
#define XSNPRINTF snprintf
#define HAVE_AESGCM
#define WOLFSSL_SHA512
#define HAVE_ECC
#define HAVE_CURVE25519
#define CURVE25519_SMALL
#define HAVE_ED25519
#define ED25519_SMALL
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif

View File

@@ -0,0 +1,80 @@
/* wolfsslRunTests.c
*
* Copyright (C) 2018 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 <includes.h> /* master includes from Micrium Freescale Kinetis K70*/
#include <wolfssl/ssl.h>
/*
* Description : This function runs wolfssl tests.
* Caller(s) : main() in app.c
* Note(s) : none.
*/
int wolfsslRunTests (void)
{
CLK_ERR err;
CLK_TS_SEC ts_unix_sec;
CPU_BOOLEAN valid;
static int initialized = 0;
if(!initialized) {
Clk_Init(&err);
if (err == CLK_ERR_NONE) {
APP_TRACE_INFO(("Clock module successfully initialized\n"));
} else {
APP_TRACE_INFO(("Clock module initialization failed\n"));
return -1;
}
valid = Clk_GetTS_Unix(&ts_unix_sec);
if (valid == DEF_OK) {
APP_TRACE_INFO(("Timestamp Unix = %u\n", ts_unix_sec));
} else {
APP_TRACE_INFO(("Get TS Unix error\n"));
}
#if defined(CURRENT_UNIX_TS)
valid = Clk_SetTS_Unix(CURRENT_UNIX_TS);
if (valid != DEF_OK) {
APP_TRACE_INFO(("Clk_SetTS_Unix error\n"));
return -1;
}
#endif
initialized = 1;
}
#if defined(WOLFSSL_WOLFCRYPT_TEST)
wolfcrypt_test(NULL);
#endif
#if defined(WOLFSSL_BENCHMARK_TEST)
benchmark_test(NULL);
#endif
#if defined(WOLFSSL_CLIENT_TEST)
wolfssl_client_test();
#endif
#if defined(WOLFSSL_SERVER_TEST)
wolfssl_server_test();
#endif
return 0;
}

View File

@@ -0,0 +1,33 @@
# ESP-IDF port
## Overview
ESP-IDF development framework with wolfSSL by setting *WOLFSSL_ESPIDF* definition
Including the following examples:
simple tls_client/server
crypt test
crypt benchmark
The *user_settings.h* file enables some of the hardened settings.
## Requirements
1. ESP-IDF development framework
[https://docs.espressif.com/projects/esp-idf/en/latest/get-started/]
Note: This expects to use Linux version.
## Setup
1. Run *setup.sh* to deploy files into ESP-IDF tree
2. Find Wolfssl files at /path/to/esp-idf/components/wolfssl/
3. Find Example programs under /path/to/esp-idf/examples/protocols/wolfssl_xxx
4. Uncomment out #define WOLFSSL_ESPIDF in /path/to/wolfssl/wolfssl/wolfcrypt/settings.h
Uncomment out #define WOLFSSL_ESPWROOM32 in /path/to/wolfssl/wolfssl/wolfcrypt/settings.h
## Configuration
1. The *user_settings.h* for each example can be found in /path/to/examples/protocols/wolfssl_xxx/main/include/user_settings.h
## Build examples
1. See README in each example folder
## Support
For question please email [support@wolfssl.com]
Note: This is tested with "Ubuntu 18.04.1 LTS" and ESP32-WROOM-32.

View File

@@ -0,0 +1,6 @@
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(wolfssl_benchmark)

View File

@@ -0,0 +1,11 @@
#
# This is a project Makefile. It is assumed the directory this Makefile resides in is a
# project subdirectory.
#
PROJECT_NAME := wolfssl_benchmark
CFLAGS += -DWOLFSSL_USER_SETTINGS
include $(IDF_PATH)/make/project.mk

View File

@@ -0,0 +1,14 @@
#wolfSSL Example
The Example contains of wolfSSL benchmark program.
1. "make menuconfig" to configure the program.
1-1. Example Configuration ->
BENCH_ARG : argument that you want to use. Default is "-lng 0"
The list of argument can be find in help.
When you want to run the benchmark program
1. "make flash" to compile and load the firmware
2. "make monitor" to see the message
See the README.md file in the upper level 'examples' directory for more information about examples.

View File

@@ -0,0 +1,29 @@
menu "Example Configuration"
config BENCH_ARGV
string "Arguments for benchmark test"
default "-lng 0"
help
-? <num> Help, print this usage
0: English, 1: Japanese
-csv Print terminal output in csv format
-base10 Display bytes as power of 10 (eg 1 kB = 1000 Bytes)
-no_aad No additional authentication data passed.
-dgst_full Full digest operation performed.
-rsa_sign Measure RSA sign/verify instead of encrypt/decrypt.
-<alg> Algorithm to benchmark. Available algorithms include:
cipher aes-cbc aes-gcm chacha20 chacha20-poly1305
digest md5 poly1305 sha sha2 sha224 sha256 sha384 sha512 sha3
sha3-224 sha3-256 sha3-384 sha3-512
mac hmac hmac-md5 hmac-sha hmac-sha224 hmac-sha256 hmac-sha384
hmac-sha512
asym rsa rsa-sz dh ecc-kg ecc
other rng
-lng <num> Display benchmark result by specified language.
0: English, 1: Japanese
<num> Size of block in bytes
e.g -lng 1
e.g sha
endmenu

View File

@@ -0,0 +1,8 @@
#
# Main component makefile.
#
# This Makefile can be left empty. By default, it will take the sources in the
# src/ directory, compile them and link them into lib(subdirectory_name).a
# in the build directory. This behaviour is entirely configurable,
# please read the ESP-IDF documents if you need to do this.
#

View File

@@ -0,0 +1,80 @@
/* helper.c
*
* Copyright (C) 2006-2018 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 <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sdkconfig.h"
#define WOLFSSL_BENCH_ARGV CONFIG_BENCH_ARGV
char* __argv[22];
int construct_argv()
{
int cnt = 0;
int i = 0;
int len = 0;
char *_argv; /* buffer for copying the string */
char *ch; /* char pointer to trace the string */
char buff[16] = { 0 }; /* buffer for a argument copy */
printf("arg:%s\n", CONFIG_BENCH_ARGV);
len = strlen(CONFIG_BENCH_ARGV);
_argv = (char*)malloc(len + 1);
if (!_argv) {
return -1;
}
memset(_argv, 0, len+1);
memcpy(_argv, CONFIG_BENCH_ARGV, len);
_argv[len] = '\0';
ch = _argv;
__argv[cnt] = malloc(10);
sprintf(__argv[cnt], "benchmark");
__argv[9] = '\0';
cnt = 1;
while (*ch != '\0')
{
/* skip white-space */
while (*ch == ' ') { ++ch; }
memset(buff, 0, sizeof(buff));
/* copy each args into buffer */
i = 0;
while ((*ch != ' ') && (*ch != '\0') && (i < 16)) {
buff[i] = *ch;
++i;
++ch;
}
/* copy the string into argv */
__argv[cnt] = (char*)malloc(i + 1);
memset(__argv[cnt], 0, i + 1);
memcpy(__argv[cnt], buff, i + 1);
/* next args */
++cnt;
}
free(_argv);
return (cnt);
}

View File

@@ -0,0 +1,51 @@
/* user_settings.h
*
* Copyright (C) 2006-2018 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
*/
#define BENCH_EMBEDDED
#define USE_CERT_BUFFERS_2048
/* TLS 1.3 */
#define WOLFSSL_TLS13
#define HAVE_TLS_EXTENSIONS
#define WC_RSA_PSS
#define HAVE_HKDF
#define HAVE_FFDHE_2048
#define HAVE_AEAD
#define HAVE_SUPPORTED_CURVES
#define SINGLE_THREADED /* or define RTOS option */
#define NO_FILESYSTEM
#define HAVE_AESGCM
#define WOLFSSL_SHA512
#define HAVE_ECC
#define HAVE_CURVE25519
#define CURVE25519_SMALL
#define HAVE_ED25519
/* debug options */
/* #define DEBUG_WOLFSSL */
/* date/time */
/* if it cannot adjust time in the device, */
/* enable macro below */
/* #define NO_ASN_TIME */
/* #define XTIME time */

View File

@@ -0,0 +1,4 @@
CONFIG_BENCH_ARGV="-lng 0"
CONFIG_MAIN_TASK_STACK_SIZE=5000
CONFIG_FREERTOS_HZ=1000
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=

View File

@@ -0,0 +1,6 @@
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(wolfssl_client)

View File

@@ -0,0 +1,11 @@
#
# This is a project Makefile. It is assumed the directory this Makefile resides in is a
# project subdirectory.
#
PROJECT_NAME := wolfssl_client
CFLAGS += -DWOLFSSL_USER_SETTINGS
include $(IDF_PATH)/make/project.mk

View File

@@ -0,0 +1,19 @@
#wolfssl Example
The Example contains of wolfSSL tls client demo.
1. "make menuconfig" to config the project
1-1. Example Configuration ->
WIFI SSID: your own WIFI, which is connected to the Internet.(default is "myssid")
WIFI Password: WIFI password, and default is "mypassword"
Target host ip address : the host that you want to connect to.(default is 127.0.0.1)
Note: the example program uses 11111 port. If you want to use different port
, you need to modifiy DEFAULT_PORT definition in the code.
When you want to test the wolfSSL client
1. "make falsh monitor" to load the firmware and see the context
2. You can use <wolfssl>/examples/server/server program for test.
e.g. Launch ./examples/server/server -v 4 -b -i
See the README.md file in the upper level 'examples' directory for more information about examples.

View File

@@ -0,0 +1,21 @@
menu "Example Configuration"
config WIFI_SSID
string "WiFi SSID"
default "myssid"
help
SSID (network name) for the example to connect to.
config WIFI_PASSWORD
string "WiFi Password"
default "mypassword"
help
WiFi password (WPA or WPA2) for the example to use.
config TARGET_HOST
string "Target host"
default "127.0.01.1"
help
host address for the example to connect
endmenu

View File

@@ -0,0 +1,151 @@
/* client-tls-callback.c
*
* Copyright (C) 2006-2018 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
*
* 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-1301, USA
*/
/* the usual suspects */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
/* ESP specific */
#include "wifi_connect.h"
/* socket includes */
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <unistd.h>
/* wolfSSL */
#include <wolfssl/options.h>
#include <wolfssl/ssl.h>
#include <wolfssl/certs_test.h>
#ifdef WOLFSSL_TRACK_MEMORY
#include <wolfssl/wolfcrypt/mem_track.h>
#endif
const char *TAG = "tls_client";
void tls_smp_client_task()
{
int ret;
int sockfd;
struct sockaddr_in servAddr;
char buff[256];
size_t len;
/* declare wolfSSL objects */
WOLFSSL_CTX *ctx;
WOLFSSL *ssl;
WOLFSSL_ENTER("tls_smp_client_task");
#ifdef DEBUG_WOLFSSL
WOLFSSL_MSG("Debug ON");
wolfSSL_Debugging_ON();
#endif
/* Initialize wolfSSL */
wolfSSL_Init();
/* Create a socket that uses an internet IPv4 address,
* Sets the socket to be stream based (TCP),
* 0 means choose the default protocol. */
if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
printf("ERROR: failed to create the socket\n");
}
/* Create and initialize WOLFSSL_CTX */
if ((ctx = wolfSSL_CTX_new(wolfSSLv23_client_method())) == NULL) {
printf("ERROR: failed to create WOLFSSL_CTX\n");
}
WOLFSSL_MSG("Loading...cert");
/* Load client certificates into WOLFSSL_CTX */
if ((ret = wolfSSL_CTX_load_verify_buffer(ctx, ca_cert_der_2048,
sizeof_ca_cert_der_2048, WOLFSSL_FILETYPE_ASN1)) != SSL_SUCCESS) {
printf("ERROR: failed to load %d, please check the file.\n",ret);
}
/* Initialize the server address struct with zeros */
memset(&servAddr, 0, sizeof(servAddr));
/* Fill in the server address */
servAddr.sin_family = AF_INET; /* using IPv4 */
servAddr.sin_port = htons(DEFAULT_PORT); /* on DEFAULT_PORT */
/* Get the server IPv4 address from the command line call */
WOLFSSL_MSG("inet_pton");
if ((ret = inet_pton(AF_INET, TLS_SMP_TARGET_HOST,
&servAddr.sin_addr)) != 1) {
printf("ERROR: invalid address ret=%d\n", ret);
}
/* Connect to the server */
sprintf(buff, "Connecting to server....%s(port:%d)", TLS_SMP_TARGET_HOST
, DEFAULT_PORT);
WOLFSSL_MSG(buff);
if ((ret = connect(sockfd, (struct sockaddr *)&servAddr,
sizeof(servAddr))) == -1){
printf("ERROR: failed to connect ret=%d\n", ret);
}
WOLFSSL_MSG("Create a WOLFSSL object");
/* Create a WOLFSSL object */
if ((ssl = wolfSSL_new(ctx)) == NULL) {
printf("ERROR: failed to create WOLFSSL object\n");
}
/* Attach wolfSSL to the socket */
wolfSSL_set_fd(ssl, sockfd);
WOLFSSL_MSG("Connect to wolfSSL on the server side");
/* Connect to wolfSSL on the server side */
if (wolfSSL_connect(ssl) != SSL_SUCCESS) {
printf("ERROR: failed to connect to wolfSSL\n");
}
/* Get a message for the server from stdin */
WOLFSSL_MSG("Message for server: ");
memset(buff, 0, sizeof(buff));
sprintf(buff, "message from client\n");
len = strnlen(buff, sizeof(buff));
/* Send the message to the server */
if (wolfSSL_write(ssl, buff, len) != len) {
printf("ERROR: failed to write\n");
}
/* Read the server data into our buff array */
memset(buff, 0, sizeof(buff));
if (wolfSSL_read(ssl, buff, sizeof(buff) - 1) == -1) {
printf("ERROR: failed to read\n");
}
/* Print to stdout any data the server sends */
WOLFSSL_MSG("Server:");
WOLFSSL_MSG(buff);
/* Cleanup and return */
wolfSSL_free(ssl); /* Free the wolfSSL object */
wolfSSL_CTX_free(ctx); /* Free the wolfSSL context object */
wolfSSL_Cleanup(); /* Cleanup the wolfSSL environment */
close(sockfd); /* Close the connection to the server */
vTaskDelete(NULL);
return; /* Return reporting a success */
}

View File

@@ -0,0 +1,8 @@
#
# Main component makefile.
#
# This Makefile can be left empty. By default, it will take the sources in the
# src/ directory, compile them and link them into lib(subdirectory_name).a
# in the build directory. This behaviour is entirely configurable,
# please read the ESP-IDF documents if you need to do this.
#

View File

@@ -0,0 +1,51 @@
/* user_settings.h
*
* Copyright (C) 2006-2018 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
*/
#define BENCH_EMBEDDED
#define USE_CERT_BUFFERS_2048
/* TLS 1.3 */
#define WOLFSSL_TLS13
#define HAVE_TLS_EXTENSIONS
#define WC_RSA_PSS
#define HAVE_HKDF
#define HAVE_FFDHE_2048
#define HAVE_AEAD
#define HAVE_SUPPORTED_CURVES
#define SINGLE_THREADED /* or define RTOS option */
#define NO_FILESYSTEM
#define HAVE_AESGCM
#define WOLFSSL_SHA512
#define HAVE_ECC
#define HAVE_CURVE25519
#define CURVE25519_SMALL
#define HAVE_ED25519
/* debug options */
/* #define DEBUG_WOLFSSL */
/* date/time */
/* if it cannot adjust time in the device, */
/* enable macro below */
/* #define NO_ASN_TIME */
/* #define XTIME time */

View File

@@ -0,0 +1,38 @@
/* user_settings.h
*
* Copyright (C) 2006-2018 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
*/
#ifndef _TLS_WIFI_H_
#define _TLS_WIFI_H_
#include "esp_log.h"
#include "esp_wifi.h"
#include "esp_event_loop.h"
#define DEFAULT_PORT 11111
#define TLS_SMP_CLIENT_TASK_NAME "tls_client_example"
#define TLS_SMP_CLIENT_TASK_WORDS 10240
#define TLS_SMP_CLIENT_TASK_PRIORITY 8
#define TLS_SMP_WIFI_SSID CONFIG_WIFI_SSID
#define TLS_SMP_WIFI_PASS CONFIG_WIFI_PASSWORD
#define TLS_SMP_TARGET_HOST CONFIG_TARGET_HOST
#endif

View File

@@ -0,0 +1,146 @@
/* wifi_connect.c
*
* Copyright (C) 2006-2018 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
*/
/*ESP specific */
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
#include "wifi_connect.h"
#include "lwip/sockets.h"
#include "lwip/netdb.h"
#include "lwip/apps/sntp.h"
#include "nvs_flash.h"
const static int CONNECTED_BIT = BIT0;
static EventGroupHandle_t wifi_event_group;
/* proto-type */
extern void tls_smp_client_task();
static void tls_smp_client_init();
const static char *TAG = "tls_client";
static EventGroupHandle_t wifi_event_group;
extern void tls_smp_client_task();
static void set_time()
{
/* set dummy wallclock time. */
struct timeval utctime;
struct timezone tz;
struct strftime_buf;
time_t now;
struct tm timeinfo;
char strftime_buf[64];
utctime.tv_sec = 1542008020; /* dummy time: Mon Nov 12 07:33:40 2018 */
utctime.tv_usec = 0;
tz.tz_minuteswest = 0;
tz.tz_dsttime = 0;
settimeofday(&utctime, &tz);
time(&now);
localtime_r(&now, &timeinfo);
strftime(strftime_buf, sizeof(strftime_buf), "%c", &timeinfo);
ESP_LOGI(TAG, "The current date/time is: %s", strftime_buf);
/* wait until wifi connect */
xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT,
false, true, portMAX_DELAY);
/* now we start client tasks. */
tls_smp_client_init();
}
/* create task */
static void tls_smp_client_init(void)
{
int ret;
xTaskHandle _handle;
/* http://esp32.info/docs/esp_idf/html/dd/d3c/group__xTaskCreate.html */
ret = xTaskCreate(tls_smp_client_task,
TLS_SMP_CLIENT_TASK_NAME,
TLS_SMP_CLIENT_TASK_WORDS,
NULL,
TLS_SMP_CLIENT_TASK_PRIORITY,
&_handle);
if (ret != pdPASS) {
ESP_LOGI(TAG, "create thread %s failed", TLS_SMP_CLIENT_TASK_NAME);
}
}
/* event hander for wifi events */
static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
{
switch (event->event_id)
{
case SYSTEM_EVENT_STA_START:
esp_wifi_connect();
break;
case SYSTEM_EVENT_STA_GOT_IP:
ESP_LOGI(TAG, "got ip:%s",
ip4addr_ntoa(&event->event_info.got_ip.ip_info.ip));
/* http://esp32.info/docs/esp_idf/html/dd/d08/group__xEventGroupSetBits.html */
xEventGroupSetBits(wifi_event_group, CONNECTED_BIT);
break;
case SYSTEM_EVENT_STA_DISCONNECTED:
esp_wifi_connect();
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);
break;
default:
break;
}
return ESP_OK;
}
/* entry point */
void app_main(void)
{
ESP_LOGI(TAG, "Start app_main...");
ESP_ERROR_CHECK(nvs_flash_init());
ESP_LOGI(TAG, "Initialize wifi");
/* TCP/IP adapter initialization */
tcpip_adapter_init();
/* */
wifi_event_group = xEventGroupCreate();
ESP_ERROR_CHECK(esp_event_loop_init(wifi_event_handler, NULL));
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
wifi_config_t wifi_config = {
.sta = {
.ssid = TLS_SMP_WIFI_SSID,
.password = TLS_SMP_WIFI_PASS,
},
};
/* WiFi station mode */
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) );
/* Wifi Set the configuration of the ESP32 STA or AP */
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) );
/* Start Wifi */
ESP_ERROR_CHECK(esp_wifi_start() );
ESP_LOGI(TAG, "wifi_init_sta finished.");
ESP_LOGI(TAG, "connect to ap SSID:%s password:%s",
TLS_SMP_WIFI_SSID, TLS_SMP_WIFI_PASS);
ESP_LOGI(TAG, "Set dummy time...");
set_time();
}

View File

@@ -0,0 +1,7 @@
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(tls_server)

View File

@@ -0,0 +1,11 @@
#
# This is a project Makefile. It is assumed the directory this Makefile resides in is a
# project subdirectory.
#
PROJECT_NAME := tls_server
CFLAGS += -DWOLFSSL_USER_SETTINGS
include $(IDF_PATH)/make/project.mk

View File

@@ -0,0 +1,19 @@
#wolfSSL Example
The Example contains a wolfSSL simple server.
1. "make menuconfigure" to configure the project
1-1. Example Configuration ->
WIFI SSID : your own WIFI, which is connected to the Internet.(default is "myssid")
WIFI Password : WIFI password, and default is "mypassword"
When you want to test the wolfSSL simple server demo
1. "make flash" to compile the code and load the firmware
2. "make monitor" to see the context. The assigned IP address can be found in output message.
3. Once the server connects to the wifi, it is waiting for client request.
("Waiting for a connection..." message will be displayed.)
4. You can use <wolfssl>/examples/client to test the server
e.g ./example/client/client -h xx.xx.xx
See the README.md file in the upper level 'examples' directory for more information about examples.

View File

@@ -0,0 +1,15 @@
menu "Example Configuration"
config WIFI_SSID
string "WiFi SSID"
default "myssid"
help
SSID (network name) for the example to connect to.
config WIFI_PASSWORD
string "WiFi Password"
default "mypassword"
help
WiFi password (WPA or WPA2) for the example to use.
endmenu

View File

@@ -0,0 +1,3 @@
#
# Main Makefile. This is basically the same as a component makefile.
#

View File

@@ -0,0 +1,51 @@
/* user_settings.h
*
* Copyright (C) 2006-2018 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
*/
#define BENCH_EMBEDDED
#define USE_CERT_BUFFERS_2048
/* TLS 1.3 */
#define WOLFSSL_TLS13
#define HAVE_TLS_EXTENSIONS
#define WC_RSA_PSS
#define HAVE_HKDF
#define HAVE_FFDHE_2048
#define HAVE_AEAD
#define HAVE_SUPPORTED_CURVES
#define SINGLE_THREADED /* or define RTOS option */
#define NO_FILESYSTEM
#define HAVE_AESGCM
#define WOLFSSL_SHA512
#define HAVE_ECC
#define HAVE_CURVE25519
#define CURVE25519_SMALL
#define HAVE_ED25519
/* debug options */
/* #define DEBUG_WOLFSSL */
/* date/time */
/* if it cannot adjust time in the device, */
/* enable macro below */
/* #define NO_ASN_TIME */
/* #define XTIME time */

View File

@@ -0,0 +1,37 @@
/* wifi_connect.h
*
* Copyright (C) 2006-2018 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
*/
#ifndef _TLS_WIFI_H_
#define _TLS_WIFI_H_
#include "esp_log.h"
#include "esp_wifi.h"
#include "esp_event_loop.h"
#define DEFAULT_PORT 11111
#define TLS_SMP_SERVER_TASK_NAME "tls_sever_example"
#define TLS_SMP_SERVER_TASK_WORDS 10240
#define TLS_SMP_SERVER_TASK_PRIORITY 8
#define TLS_SMP_WIFI_SSID CONFIG_WIFI_SSID
#define TLS_SMP_WIFI_PASS CONFIG_WIFI_PASSWORD
#endif

View File

@@ -0,0 +1,170 @@
/* server-tls-callback.c
*
* Copyright (C) 2006-2018 wolfSSL Inc.
*
* This file is part of wolfSSL. (formerly known as CyaSSL)
*
* 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-1301, USA
*/
/* the usual suspects */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
/* socket includes */
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <unistd.h>
/* wolfSSL */
#include <wolfssl/options.h>
#include <wolfssl/ssl.h>
#include <wolfssl/certs_test.h>
/* ESP specific */
#include "wifi_connect.h"
#ifdef WOLFSSL_TRACK_MEMORY
#include <wolfssl/wolfcrypt/mem_track.h>
#endif
const char *TAG = "tls_server";
void tls_smp_server_task()
{
int sockfd;
int connd;
struct sockaddr_in servAddr;
struct sockaddr_in clientAddr;
socklen_t size = sizeof(clientAddr);
char buff[256];
size_t len;
int shutdown = 0;
int ret;
/* declare wolfSSL objects */
WOLFSSL_CTX* ctx;
WOLFSSL* ssl;
WOLFSSL_ENTER("tls_smp_server_task");
#ifdef DEBUG_WOLFSSL
WOLFSSL_MSG("Debug ON");
wolfSSL_Debugging_ON();
#endif
/* Initialize wolfSSL */
WOLFSSL_MSG("Start wolfSSL_Init()");
wolfSSL_Init();
/* Create a socket that uses an internet IPv4 address,
* Sets the socket to be stream based (TCP),
* 0 means choose the default protocol. */
WOLFSSL_MSG( "start socket())");
if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
printf("ERROR: failed to create the socket");
}
/* Create and initialize WOLFSSL_CTX */
WOLFSSL_MSG("Create and initialize WOLFSSL_CTX");
if ((ctx = wolfSSL_CTX_new(wolfSSLv23_server_method())) == NULL) {
printf("ERROR: failed to create WOLFSSL_CTX");
}
WOLFSSL_MSG("Loading certificate...");
/* Load server certificates into WOLFSSL_CTX */
if ((ret = wolfSSL_CTX_use_certificate_buffer(ctx, server_cert_der_2048,
sizeof_server_cert_der_2048,
WOLFSSL_FILETYPE_ASN1)) != SSL_SUCCESS) {
printf("ERROR: failed to load cert");
}
WOLFSSL_MSG("Loading key info...");
/* Load server key into WOLFSSL_CTX */
if((ret=wolfSSL_CTX_use_PrivateKey_buffer(ctx,
server_key_der_2048, sizeof_server_key_der_2048,
WOLFSSL_FILETYPE_ASN1)) != SSL_SUCCESS) {
printf("ERROR: failed to load privatekey");
}
/* Initialize the server address struct with zeros */
memset(&servAddr, 0, sizeof(servAddr));
/* Fill in the server address */
servAddr.sin_family = AF_INET; /* using IPv4 */
servAddr.sin_port = htons(DEFAULT_PORT); /* on DEFAULT_PORT */
servAddr.sin_addr.s_addr = INADDR_ANY; /* from anywhere */
/* Bind the server socket to our port */
if (bind(sockfd, (struct sockaddr*)&servAddr, sizeof(servAddr)) == -1) {
printf("ERROR: failed to bind");
}
/* Listen for a new connection, allow 5 pending connections */
if (listen(sockfd, 5) == -1) {
printf("ERROR: failed to listen");
}
/* Continue to accept clients until shutdown is issued */
while (!shutdown) {
WOLFSSL_MSG("Waiting for a connection...");
/* Accept client connections */
if ((connd = accept(sockfd, (struct sockaddr*)&clientAddr, &size))
== -1) {
printf("ERROR: failed to accept the connection");
}
/* Create a WOLFSSL object */
if ((ssl = wolfSSL_new(ctx)) == NULL) {
printf("ERROR: failed to create WOLFSSL object");
}
/* Attach wolfSSL to the socket */
wolfSSL_set_fd(ssl, connd);
/* Establish TLS connection */
ret = wolfSSL_accept(ssl);
if (ret != SSL_SUCCESS) {
printf("wolfSSL_accept error %d", wolfSSL_get_error(ssl, ret));
}
WOLFSSL_MSG("Client connected successfully");
/* Read the client data into our buff array */
memset(buff, 0, sizeof(buff));
if (wolfSSL_read(ssl, buff, sizeof(buff)-1) == -1) {
printf("ERROR: failed to read");
}
/* Print to stdout any data the client sends */
WOLFSSL_MSG("Client sends:");
WOLFSSL_MSG(buff);
/* Check for server shutdown command */
if (strncmp(buff, "shutdown", 8) == 0) {
WOLFSSL_MSG("Shutdown command issued!");
shutdown = 1;
}
/* Write our reply into buff */
memset(buff, 0, sizeof(buff));
memcpy(buff, "I hear ya fa shizzle!", sizeof(buff));
len = strnlen(buff, sizeof(buff));
/* Reply back to the client */
if (wolfSSL_write(ssl, buff, len) != len) {
printf("ERROR: failed to write");
}
/* Cleanup after this connection */
wolfSSL_free(ssl); /* Free the wolfSSL object */
close(connd); /* Close the connection to the client */
}
/* Cleanup and return */
wolfSSL_CTX_free(ctx); /* Free the wolfSSL context object */
wolfSSL_Cleanup(); /* Cleanup the wolfSSL environment */
close(sockfd); /* Close the socket listening for clients */
vTaskDelete(NULL);
return; /* Return reporting a success */
}

View File

@@ -0,0 +1,143 @@
/* wifi_connect.c
*
* Copyright (C) 2006-2018 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
*/
/*ESP specific */
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
#include "wifi_connect.h"
#include "lwip/sockets.h"
#include "lwip/netdb.h"
#include "lwip/apps/sntp.h"
#include "nvs_flash.h"
const static int CONNECTED_BIT = BIT0;
static EventGroupHandle_t wifi_event_group;
/* prefix for logging */
const static char *TAG = "tls_server";
/* proto-type difinition */
extern void tls_smp_server_task();
static void tls_smp_server_init();
static void set_time()
{
/* set dummy wallclock time. */
struct timeval utctime;
struct timezone tz;
struct strftime_buf;
time_t now;
struct tm timeinfo;
char strftime_buf[64];
utctime.tv_sec = 1542008020; /* dummy time: Mon Nov 12 07:33:40 2018 */
utctime.tv_usec = 0;
tz.tz_minuteswest = 0;
tz.tz_dsttime = 0;
settimeofday(&utctime, &tz);
time(&now);
localtime_r(&now, &timeinfo);
strftime(strftime_buf, sizeof(strftime_buf), "%c", &timeinfo);
ESP_LOGI(TAG, "The current date/time is: %s", strftime_buf);
/* wait until wifi connect */
xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT,
false, true, portMAX_DELAY);
/* now we start client tasks. */
tls_smp_server_init();
}
/* create task */
static void tls_smp_server_init(void)
{
int ret;
xTaskHandle _handle;
/* http://esp32.info/docs/esp_idf/html/dd/d3c/group__xTaskCreate.html */
ret = xTaskCreate(tls_smp_server_task,
TLS_SMP_SERVER_TASK_NAME,
TLS_SMP_SERVER_TASK_WORDS,
NULL,
TLS_SMP_SERVER_TASK_PRIORITY,
&_handle);
if (ret != pdPASS) {
ESP_LOGI(TAG, "create thread %s failed", TLS_SMP_SERVER_TASK_NAME);
}
}
/* event hander for wifi events */
static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
{
switch (event->event_id)
{
case SYSTEM_EVENT_STA_START:
esp_wifi_connect();
break;
case SYSTEM_EVENT_STA_GOT_IP:
ESP_LOGI(TAG, "got ip:%s",
ip4addr_ntoa(&event->event_info.got_ip.ip_info.ip));
/* http://esp32.info/docs/esp_idf/html/dd/d08/group__xEventGroupSetBits.html */
xEventGroupSetBits(wifi_event_group, CONNECTED_BIT);
break;
case SYSTEM_EVENT_STA_DISCONNECTED:
esp_wifi_connect();
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);
break;
default:
break;
}
return ESP_OK;
}
/* entry point */
void app_main(void)
{
ESP_LOGI(TAG, "Start app_main...");
ESP_ERROR_CHECK(nvs_flash_init());
ESP_LOGI(TAG, "Initialize wifi");
/* TCP/IP adapter initialization */
tcpip_adapter_init();
/* */
wifi_event_group = xEventGroupCreate();
ESP_ERROR_CHECK(esp_event_loop_init(wifi_event_handler, NULL));
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
wifi_config_t wifi_config = {
.sta = {
.ssid = TLS_SMP_WIFI_SSID,
.password = TLS_SMP_WIFI_PASS,
},
};
/* WiFi station mode */
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) );
/* Wifi Set the configuration of the ESP32 STA or AP */
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) );
/* Start Wifi */
ESP_ERROR_CHECK(esp_wifi_start() );
ESP_LOGI(TAG, "wifi_init_sta finished.");
ESP_LOGI(TAG, "connect to ap SSID:%s password:%s",
TLS_SMP_WIFI_SSID, TLS_SMP_WIFI_PASS);
ESP_LOGI(TAG, "Set Dummy time...");
set_time();
}

View File

@@ -0,0 +1,6 @@
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(wolfssl_test)

View File

@@ -0,0 +1,11 @@
#
# This is a project Makefile. It is assumed the directory this Makefile resides in is a
# project subdirectory.
#
PROJECT_NAME := wolfssl_test
CFLAGS += -DWOLFSSL_USER_SETTINGS
include $(IDF_PATH)/make/project.mk

View File

@@ -0,0 +1,10 @@
#wolfSSL Example
The Example contains of wolfSSL test program.
When you want to run the benchmark program
1. "make menuconfig" to configure the program,first
1. "make flash" to compile and load the firemware
2. "make monitor" to see the message
See the README.md file in the upper level 'examples' directory for more information about examples.

View File

@@ -0,0 +1,3 @@
#
# Main Makefile. This is basically the same as a component makefile.
#

View File

@@ -0,0 +1,51 @@
/* user_settings.h
*
* Copyright (C) 2006-2018 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
*/
#define BENCH_EMBEDDED
#define USE_CERT_BUFFERS_2048
/* TLS 1.3 */
#define WOLFSSL_TLS13
#define HAVE_TLS_EXTENSIONS
#define WC_RSA_PSS
#define HAVE_HKDF
#define HAVE_FFDHE_2048
#define HAVE_AEAD
#define HAVE_SUPPORTED_CURVES
#define SINGLE_THREADED /* or define RTOS option */
#define NO_FILESYSTEM
#define HAVE_AESGCM
#define WOLFSSL_SHA512
#define HAVE_ECC
#define HAVE_CURVE25519
#define CURVE25519_SMALL
#define HAVE_ED25519
/* debug options */
/* #define DEBUG_WOLFSSL */
/* date/time */
/* if it cannot adjust time in the device, */
/* enable macro below */
/* #define NO_ASN_TIME */
/* #define XTIME time */

View File

@@ -0,0 +1,2 @@
CONFIG_MAIN_TASK_STACK_SIZE=5000
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=

View File

@@ -0,0 +1,79 @@
cmake_minimum_required(VERSION 3.5)
set(CMAKE_CURRENT_SOURCE_DIR ".")
set(WOLFSSL_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
set(INCLUDE_PATH ${WOLFSSL_ROOT})
set(COMPONENT_SRCS
"src/keys.c"
"src/sniffer.c"
"src/tls.c"
"src/wolfio.c"
"src/crl.c"
"src/internal.c"
"src/ocsp.c"
"src/ssl.c"
"src/tls13.c"
"wolfcrypt/src/aes.c"
"wolfcrypt/src/arc4.c"
"wolfcrypt/src/asm.c"
"wolfcrypt/src/asn.c"
"wolfcrypt/src/blake2b.c"
"wolfcrypt/src/camellia.c"
"wolfcrypt/src/chacha.c"
"wolfcrypt/src/chacha20_poly1305.c"
"wolfcrypt/src/cmac.c"
"wolfcrypt/src/coding.c"
"wolfcrypt/src/compress.c"
"wolfcrypt/src/cpuid.c"
"wolfcrypt/src/cryptodev.c"
"wolfcrypt/src/curve25519.c"
"wolfcrypt/src/des3.c"
"wolfcrypt/src/dh.c"
"wolfcrypt/src/dsa.c"
"wolfcrypt/src/ecc.c"
"wolfcrypt/src/ecc_fp.c"
"wolfcrypt/src/ed25519.c"
"wolfcrypt/src/error.c"
"wolfcrypt/src/fe_low_mem.c"
"wolfcrypt/src/fe_operations.c"
"wolfcrypt/src/ge_low_mem.c"
"wolfcrypt/src/ge_operations.c"
"wolfcrypt/src/hash.c"
"wolfcrypt/src/hc128.c"
"wolfcrypt/src/hmac.c"
"wolfcrypt/src/idea.c"
"wolfcrypt/src/integer.c"
"wolfcrypt/src/logging.c"
"wolfcrypt/src/md2.c"
"wolfcrypt/src/md4.c"
"wolfcrypt/src/md5.c"
"wolfcrypt/src/memory.c"
"wolfcrypt/src/pkcs12.c"
"wolfcrypt/src/pkcs7.c"
"wolfcrypt/src/poly1305.c"
"wolfcrypt/src/pwdbased.c"
"wolfcrypt/src/rabbit.c"
"wolfcrypt/src/random.c"
"wolfcrypt/src/ripemd.c"
"wolfcrypt/src/rsa.c"
"wolfcrypt/src/sha.c"
"wolfcrypt/src/sha256.c"
"wolfcrypt/src/sha3.c"
"wolfcrypt/src/sha512.c"
"wolfcrypt/src/signature.c"
"wolfcrypt/src/sp_arm32.c"
"wolfcrypt/src/sp_arm64.c"
"wolfcrypt/src/sp_c32.c"
"wolfcrypt/src/sp_c64.c"
"wolfcrypt/src/sp_int.c"
"wolfcrypt/src/sp_x86_64.c"
"wolfcrypt/src/srp.c"
"wolfcrypt/src/tfm.c"
"wolfcrypt/src/wc_encrypt.c"
"wolfcrypt/src/wc_port.c"
"wolfcrypt/src/wolfevent.c"
"wolfcrypt/src/wolfmath.c"
)
set(COMPONENT_REQUIRES lwip)
set(COMPONENT_ADD_INCLUDEDIRS ../freertos/include/freertos)
register_component()

View File

@@ -0,0 +1,13 @@
#
# Component Makefile
#
COMPONENT_ADD_INCLUDEDIRS := .
COMPONENT_ADD_INCLUDEDIRS += ../freertos/include/freertos/
COMPONENT_SRCDIRS := src wolfcrypt/src
COMPONENT_OBJEXCLUDE := wolfcrypt/src/aes_asm.o
COMPONENT_OBJEXCLUDE += wolfcrypt/src/evp.o
COMPONENT_OBJEXCLUDE += wolfcrypt/src/misc.o
COMPONENT_OBJEXCLUDE += src/bio.o

106
IDE/Espressif/ESP-IDF/setup.sh Executable file
View File

@@ -0,0 +1,106 @@
#!/bin/bash
# check if IDF_PATH is set
if [ -z "$IDF_PATH" ]; then
echo "Please follows the instruction of ESP-IDF installation and set IDF_PATH."
exit 1
fi
RMDCMD='/bin/rm -rf'
MKDCMD='/bin/mkdir'
CPDCMD='/bin/cp'
SCRIPTDIR=`dirname $0`
SCRIPTDIR=`cd $SCRIPTDIR && pwd -P`
WOLFSSL_ESPIDFDIR=${SCRIPTDIR}
WOLFSSL_ESPIDFDIR=`cd $WOLFSSL_ESPIDFDIR && pwd -P`
BASEDIR=${SCRIPTDIR}/../../../
BASEDIR=`cd ${BASEDIR} && pwd -P`
# echo $WOLFSSL_ESPIDFDIR
WOLFSSLLIB_TRG_DIR=${IDF_PATH}/components/wolfssl
WOLFSSLEXP_TRG_DIR=${IDF_PATH}/examples/protocols
if [ ! -d $IDF_PATH ]; then
echo "ESP-IDF Development Framework doesn't exist.: $IDF_PATH"
exit 1
fi
# Copy files into ESP-IDF development framework
pushd $IDF_PATH > /dev/null
echo "Copy files into $IDF_PATH"
# Remove/Create directories
${RMDCMD} ${WOLFSSLLIB_TRG_DIR}/
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/src
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/wolfcrypt
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/wolfssl
popd > /dev/null # $WOLFSSL_ESPIDFDIR
pushd ${BASEDIR} > /dev/null # WOLFSSL TOP DIR
# copying ... files in src/ into $WOLFSSLLIB_TRG_DIR/src
${CPDCMD} ./src/*.c ${WOLFSSLLIB_TRG_DIR}/src/
${CPDCMD} -r ./wolfcrypt/src/ ${WOLFSSLLIB_TRG_DIR}/wolfcrypt/
${CPDCMD} -r ./wolfcrypt/test ${WOLFSSLLIB_TRG_DIR}/wolfcrypt/
${CPDCMD} -r ./wolfcrypt/benchmark ${WOLFSSLLIB_TRG_DIR}/wolfcrypt/
${CPDCMD} -r ./wolfssl/*.h ${WOLFSSLLIB_TRG_DIR}/wolfssl/
${CPDCMD} -r ./wolfssl/wolfcrypt ${WOLFSSLLIB_TRG_DIR}/wolfssl/
popd > /dev/null #
${CPDCMD} ./libs/CMakeLists.txt ${WOLFSSLLIB_TRG_DIR}/
${CPDCMD} ./libs/component.mk ${WOLFSSLLIB_TRG_DIR}/
pushd ${BASEDIR} > /dev/null # WOLFSSL TOP DIR
# Benchmark program
${RMDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/main/
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/main/include
${CPDCMD} -r ./wolfcrypt/benchmark/benchmark.c ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/main/
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_benchmark/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_benchmark/main/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/main/
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_benchmark/main/include/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/main/include/
# Crypt Test program
${RMDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/main/
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/main/include
${CPDCMD} -r ./wolfcrypt/test/test.c ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/main/
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_test/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_test/main/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/main/
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_test/main/include/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/main/include/
# TLS Client program
${RMDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/main/
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/main/include
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_client/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_client/main/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/main/
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_client/main/include/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/main/include/
# TLS Server program
${RMDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/main/
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/main/include
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_server/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_server/main/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/main/
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_server/main/include/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_server/main/include/
popd > /dev/null #
exit 1

View File

@@ -48,9 +48,6 @@ extern "C" {
/* ------------------------------------------------------------------------- */
/* Math Configuration */
/* ------------------------------------------------------------------------- */
#undef USE_FAST_MATH
#define USE_FAST_MATH
#undef SIZEOF_LONG_LONG
#define SIZEOF_LONG_LONG 8

View File

@@ -81,7 +81,7 @@ $ make
$ make install
```
If you are building for a 32-bit architecture, add `-DTIME_T_NOT_LONG` to the
If you are building for a 32-bit architecture, add `-DTIME_T_NOT_64BIT` to the
list of CFLAGS.
## Example Build Output

View File

@@ -10,6 +10,7 @@
#define NO_WOLFSSL_DIR
#define WOLFSSL_NO_CURRDIR
#define NO_WOLF_C99
#define NO_MULTIBYTE_PRINT
#define XVALIDATEDATE(d, f,t) (0)
#define WOLFSSL_USER_CURRTIME /* for benchmark */

View File

@@ -35,6 +35,7 @@
#define WOLFSSL_CURRTIME_OSTICK /* use OS tich for current_time */
#define WOLFSSL_GMTIME
#define NO_MULTIBYTE_PRINT
// <<< Use Configuration Wizard in Context Menu >>>

View File

@@ -34,10 +34,10 @@
#define WOLFSSL_USER_CURRTIME /* for benchmark */
#define WOLFSSL_CURRTIME_OSTICK /* use OS tich for current_time */
#define WOLFSSL_GMTIME
#define NO_MULTIBYTE_PRINT
// <<< Use Configuration Wizard in Context Menu >>>
// <h>Common options
// <o> MPU<0=>Undefined<1=>STM32F2xx<2=>STM32F4xx<3=>STM32F7xx
#define MDK_CONF_MPU 3

View File

@@ -34,6 +34,7 @@
#define WOLFSSL_USER_CURRTIME /* for benchmark */
#define WOLFSSL_CURRTIME_OSTICK /* use OS tich for current_time */
#define WOLFSSL_GMTIME
#define NO_MULTIBYTE_PRINT
// <<< Use Configuration Wizard in Context Menu >>>

View File

@@ -4,10 +4,12 @@ wolfssl_lib:
Build wolfssl_lib.lib
test:
Get missing files
- create DUMMY project
- copy all files under DUMMY project except DUMMY.*
- uncomment "Use SIM I/O" lines in resetprg.c
- set heap size in sbrk.h
- set stack size in stacksct.h
Build test wolfCrypt
- For getting BSP files, create "bsp" folder under "Projects".
- Create "DUMMY" project under "bsp" with your MPU name property
- close "DUMMY" project, and open "test" project
- change MPU name property of the project
- uncomment "Use SIM I/O" lines in "bsp/resetprg.c"
- set heap size in "bsp/sbrk.h"
- set stack size in "bsp/stacksct.h"
Build "test" wolfCrypt

View File

@@ -22,27 +22,35 @@
#define NO_MAIN_DRIVER
#define BENCH_EMBEDDED
#define NO_WRITEV
#define WOLFSSL_USER_IO
#define NO_DEV_RANDOM
#define USE_CERT_BUFFERS_2048
#define WOLFSSL_USER_CURRTIME
#define SIZEOF_LONG_LONG 8
#define NO_WOLFSSL_DIR
#define WOLFSSL_NO_CURRDIR
#define NO_FILESYSTEM
#define WOLFSSL_LOG_PRINTF
/* #define DEBUG_WOLFSSL */
#define OPENSSL_EXTRA
#define NO_WOLFSSL_STUB
#define NO_DYNAMIC_ARRAY /* for compilers not allowed dynamic size array */
#define WOLFSSL_SMALL_STACK
#define WOLFSSL_DH_CONST
#define TFM_TIMING_RESISTANT
#define ECC_TIMING_RESISTANT
#define WC_RSA_BLINDING
#define HAVE_TLS_EXTENSIONS
#define HAVE_SUPPORTED_CURVES
#define WOLFSSL_USER_IO
//#define WOLFSSL_USER_KEYFILES /* To be defined key and cert files in user_settings.h */
//#define WOLFSSL_NO_ABORT /* No abort during the test except exception occured */
//#define DEBUG_WOLFSSL
#define OPENSSL_EXTRA
#define USER_TIME
#define XTIME time
#define HAVE_TIME_T_TYPE
#define USE_WOLF_SUSECONDS_T
#define USE_WOLF_TIMEVAL_T
@@ -50,19 +58,39 @@
#define WOLFSSL_GENSEED_FORTEST /* Wardning: define your own seed gen */
#define TFM_TIMING_RESISTANT
#define ECC_TIMING_RESISTANT
#define WC_RSA_BLINDING
#define SINGLE_THREADED /* or define RTOS option */
/* #define WOLFSSL_CMSIS_RTOS */
/*#define WOLFSSL_CMSIS_RTOS */
/* #define NO_DH */
#define NO_RC4
#define HAVE_AESGCM
#define WOLFSSL_SHA512
#define WOLFSSL_SHA384
#define HAVE_ECC
#define HAVE_CURVE25519
#define CURVE25519_SMALL
#define HAVE_ED25519
#define NO_OLD_SHA256_NAMES
#define HAVE_CRL
#define HAVE_OCSP
#define HAVE_CERTIFICATE_STATUS_REQUEST
//#define WOLFSSL_KEY_GEN
#define SHOW_GEN
#define WOLFSSL_KEEP_STORE_CERTS
#define WOLFSSL_CIPHER_INTERNALNAME
#define WOLFSSL_GETENV_RANDFILE "ABCDEFG"
#define WOLFSSL_GETENV_HOME "home"
#define CloseSocket(s) {}
#define StartTCP()
#define NO_FILESYSTEM
#define XFILE FILE*
#define XBADFILE NULL
//#define WOLFSSL_USER_KEYFILES /* Substitute key and cert files in test.h with user definitions */
int strncasecmp(const char *s1, const char *s2, unsigned int sz);
/* #define NO_WOLFSSL_STUB */

View File

@@ -19,7 +19,16 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
typedef unsigned long time_t;
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/ssl.h>
#include <wolfssl/wolfcrypt/types.h>
#include <wolfssl/wolfcrypt/error-crypt.h>
#include <stdio.h>
#define YEAR 2018
#define MON 5
@@ -34,8 +43,20 @@ time_t time(time_t *t)
#include <ctype.h>
int strncasecmp(const char *s1, const char * s2, unsigned int sz)
{
for( ; sz>0; sz--)
if(toupper(s1++) != toupper(s2++))
return 1;
return 0;
for( ; sz>0; sz--, s1++, s2++){
if(toupper(*s1) < toupper(*s2)){
return -1;
}
if(toupper(*s1) > toupper(*s2)){
return 1;
}
}
return 0;
}
void abort(void)
{
while(1);
}

View File

@@ -10,3 +10,10 @@ EXTRA_DIST+= IDE/Renesas/cs+/Projects/common/wolfssl_dummy.c
EXTRA_DIST+= IDE/Renesas/cs+/Projects/common/strings.h
EXTRA_DIST+= IDE/Renesas/cs+/Projects/common/unistd.h
EXTRA_DIST+= IDE/Renesas/cs+/Projects/common/user_settings.h
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/README_en.txt
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/README_jp.txt
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/wolf_client.c
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/wolf_server.c
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/wolf_main.c
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/wolf_demo.h

View File

@@ -0,0 +1,83 @@
wolfSSL/AlphaProject Boad demo setup Guide
This demo is tested with Renesas CS+ v6.01<EFBFBD>AAP-RX71M-0A, wolfSSL 3.15.3.
Setup process:
1. Download software
- Unzip AlphaProject firmware
- Unzip wolfssl under the same directory
2. Set up wolfSSL
- open wolfssl\IDE\Renesas\cs+\Projec/wolfssl\lib.mtpj with CS+ and build
- open t4_demo.mtpj and build. This create demo program library.
3. Set up AlphaProject
- The demo uses ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\
ap_rx71m_0a_ether_sample_cs.mtpj
- Open and edit ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\AP_RX71M_0A.c
insert wolfSSL_init() in echo_srv_init().
===
sci_init();
can_init();
echo_srv_init();
wolfSSL_init(); <- insert this line
===
- Modify stack and heap size in ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\r_config
Line 120#pragma stacksize su=0x2000
Line 139 #define BSP_CFG_HEAP_BYTES (0xa000)
<EFBFBD>@- Modify IP address ib Sample\ap_rx71m_0a_ether_sample_cs\src\r_t4_rx\src\config_tcpudp.c
<EFBFBD>@as needed
<EFBFBD>@
===
#define MY_IP_ADDR0 192,168,1,200 /* Local IP address */
#define GATEWAY_ADDR0 192,168,1,254 /* Gateway address (invalid if all 0s) */
#define SUBNET_MASK0 255,255,255,0
===
- Add project properties of linking library in ap_rx71m_0a_ether_sample_cs.mtpj
wolfssl\IDE\Renesas\cs+\Projects\wolfssl_lib\DefaultBuild\wolfssl_lib.lib
wolfssl\IDE\Renesas\cs+\Projects\t4_demo\DefaultBuild\t4_demo.lib
- Build the project and start execut. You see message on the console prompting command.
===
wolfSSL Demo
t: test, b: benchmark, s: server, or c <IP addr> <Port>: client
$
===
Command can be executed only once. You need to reset and restart MPU for following command.
Command instruction:
t: Crypt algorithm test
b: benchmark
s: simple server acceptint at port 50000
c: simple client. Specify IP address and port as following.
c <IP Addr> <Port Num>
4. Testing TLS Connection
You can use wolfssl/examples/server and client on your PC for TLS peer test.
PC side<64>F
$ ./examples/server/server -b -d
Board side<64>F
> c <IP Addr> 11111
Board side<64>F
> s
PC side<64>F
$ ./examples/client/client -h <IP Addr> -p 50000
---
If you have any question, please contact support@wolfssl.com.
wolfSSL Inc.

View File

@@ -0,0 +1,115 @@
wolfSSL/AlphaProjectボードデモ セットアップガイド
このデモはRenesas CS+ v6.01、AP-RX71M-0A, wolfSSL 3.15.3 でテストしています。
セットアップ手順:
1.ソフトウェアの入手
 - APボード付属のソフトウェア一式を適当なフォルダー下に解凍します。
 - 同じフォルダー下にwolfssl一式を解凍します。
wolfSSLのセットアップ
 - CS+にてwolfssl\IDE\Renesas\cs+\Project下のwolfssl\lib.mtpjを開き
  wolfSSLライブラリーのビルドをします。
 - 同じフォルダの下のt4_demo.mtpjを開き、デモプログラムのビルドをします。
 このプログラムもライブラリー形式でビルドされます。
 
AlphaProject側のセットアップ
 デモはap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_csフォルダ下の
 ap_rx71m_0a_ether_sample_cs.mtpjプロジェクトを利用します。
 
 - ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\srcフォルダ下の
 AP_RX71M_0A.cファイルを開き、
 行目のecho_srv_init()の下にwolfSSL_init()を挿入します。
===
sci_init();
can_init();
echo_srv_init();
wolfSSL_init(); <- この行を挿入
===
 - ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\r_configファイル
 を開き、スタックサイズとヒープサイズを以下のように設定します。
 
 120行目 #pragma stacksize su=0x2000
 139行目 #define BSP_CFG_HEAP_BYTES (0xa000)
 - IPアドレスのデフォルト値は以下のようになっています。
 必要があれば、Sample\ap_rx71m_0a_ether_sample_cs\src\r_t4_rx\src\config_tcpudp.c
 内の139行目からの定義を変更します。
 
===
#define MY_IP_ADDR0 192,168,1,200 /* Local IP address */
#define GATEWAY_ADDR0 192,168,1,254 /* Gateway address (invalid if all 0s) */
#define SUBNET_MASK0 255,255,255,0 /* Subnet mask */
===
 - CS+でap_rx71m_0a_ether_sample_cs.mtpjプロジェクトを開き、wolfSSLとデモライブラリを
 登録します。CC-RX(ビルドツール)->リンク・オプションタブ->使用する以下の二つのファイル
 を登録します。
 wolfssl\IDE\Renesas\cs+\Projects\wolfssl_lib\DefaultBuild\wolfssl_lib.lib
 wolfssl\IDE\Renesas\cs+\Projects\t4_demo\DefaultBuild\t4_demo.lib
 - プロジェクトのビルド、ターゲットへのダウンロードをしたのち、表示->デバッグ・コンソール
 からコンソールを表示させます。実行を開始するとコンソールに以下の表示が出力されます。
 
===
 wolfSSL Demo
t: test, b: benchmark, s: server, or c <IP addr> <Port>: client
$
===
tコマンド各暗号化アルゴリズムの簡単なテストを実行します。所要のアルゴリズムが
 組み込まれているか確認することができます。組み込むアルゴリズムはビルドオプション
 で変更することができます。詳しくはユーザマニュアルを参照してください。
bコマンド各暗号アルゴリズムごとの簡単なベンチマークを実行します。
sコマンド簡単なTLSサーバを起動します。起動するとビルド時のIPアドレス、
 ポート50000にてTLS接続を待ちます。
cコマンド簡単なTLSクライアントを起動します。起動すると第一アーギュメントで指定された
 IPアドレス、第二アーギュメントで指定されたポートに対してTLS接続します。
いずれのコマンドも回のみ実行します。繰り返し実行したい場合は、MPUをリセットして
再起動します。
4.対向テスト
 デモのs、cコマンドを使って、他の機器と簡単な対向テストをすることができます。
 UbuntuなどのGCC, make環境、WindowsのVisual Studioなどで
 対向テスト用のサーバ、クライアントをビルドすることができます。
 GCC,makeコマンド環境では、ダウンロード解凍したwolfsslのディレクトリ下で以下の
 コマンドを発行すると、ライブラリ、テスト用のクライアント、サーバなど一式がビルド
 されます。
 
 $ ./configure
 $ make check
 
 その後、以下のような指定でクライアントまたはサーバを起動して、ボード上の
 デモと対向テストすることができます。
 
 PC側
 $ ./examples/server/server -b -d
 ボード側:
  > c <IPアドレス> 11111
 ボード側:
  > s
 PC側 
 $ ./examples/client/client -h <IPアドレス> -p 50000
 
 
 WindowsのVisual Studioでは、ダウンロード解凍したwolfsslフォルダ下のwolfssl64.sln
 を開き、ソリューションをビルドします。Debugフォルダ下にビルドされるclient.exeと
 server.exeを利用します。
 
PC側
 Debug> .\server -b -d
 ボード側:
  > c <IPアドレス> 11111
 ボード側:
  > s
 PC側
 Debug> .\client -h <IPアドレス> -p 50000
以上、

View File

@@ -0,0 +1,192 @@
/* wolf_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 <stdio.h>
#include <string.h>
#include "r_t4_itcpip.h"
#include "wolfssl/wolfcrypt/settings.h"
#include "wolfssl/ssl.h"
#include "wolfssl/certs_test.h"
#include "wolf_demo.h"
ER t4_tcp_callback(ID cepid, FN fncd , VP p_parblk);
static int my_IORecv(WOLFSSL* ssl, char* buff, int sz, void* ctx)
{
int ret;
ID cepid;
if(ctx != NULL)cepid = *(ID *)ctx;
else return WOLFSSL_CBIO_ERR_GENERAL;
ret = tcp_rcv_dat(cepid, buff, sz, TMO_FEVR);
if(ret > 0)return ret;
else return WOLFSSL_CBIO_ERR_GENERAL;
}
static int my_IOSend(WOLFSSL* ssl, char* buff, int sz, void* ctx)
{
int ret;
ID cepid;
if(ctx != NULL)cepid = *(ID *)ctx;
else return WOLFSSL_CBIO_ERR_GENERAL;
ret = tcp_snd_dat(cepid, buff, sz, TMO_FEVR);
if(ret == sz)return ret;
else return WOLFSSL_CBIO_ERR_GENERAL;
}
static int getIPaddr(char *arg)
{
int a1, a2, a3, a4;
if(sscanf(arg, "%d.%d.%d.%d", &a1, &a2, &a3, &a4) == 4)
return (a1 << 24) | (a2 << 16) | (a3 << 8) | a4;
else return 0;
}
static int getPort(char *arg)
{
int port;
if(sscanf(arg, "%d", &port) == 1)
return port;
else return 0;
}
WOLFSSL_CTX *wolfSSL_TLS_client_init()
{
WOLFSSL_CTX* ctx;
#ifndef NO_FILESYSTEM
#ifdef USE_ECC_CERT
char *cert = "./certs/ca-ecc-cert.pem";
#else
char *cert = "./certs/ca-cert.pem";
#endif
#else
#ifdef USE_ECC_CERT
const unsigned char *cert = ca_ecc_der_256;
#define SIZEOF_CERT sizeof_ca_ecc_der_256
#else
const unsigned char *cert = ca_cert_der_2048;
#define SIZEOF_CERT sizeof_ca_cert_der_2048
#endif
#endif
wolfSSL_Init();
#ifdef DEBUG_WOLFSSL
wolfSSL_Debugging_ON();
#endif
/* Create and initialize WOLFSSL_CTX */
if ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method_ex((void *)NULL))) == NULL) {
printf("ERROR: failed to create WOLFSSL_CTX\n");
return NULL;
}
#if !defined(NO_FILESYSTEM)
if (wolfSSL_CTX_load_verify_locations(ctx, cert, 0) != SSL_SUCCESS) {
printf("ERROR: can't load \"%s\"\n", cert);
return NULL;
}
#else
if (wolfSSL_CTX_load_verify_buffer(ctx, cert, SIZEOF_CERT, SSL_FILETYPE_ASN1) != SSL_SUCCESS){
printf("ERROR: can't load certificate data\n");
return NULL;
}
#endif
/* Register callbacks */
wolfSSL_SetIORecv(ctx, my_IORecv);
wolfSSL_SetIOSend(ctx, my_IOSend);
return (void *)ctx;
}
void wolfSSL_TLS_client(void *v_ctx, func_args *args)
{
ID cepid = 1;
ER ercd;
int ret;
WOLFSSL_CTX *ctx = (WOLFSSL_CTX *)v_ctx;
WOLFSSL *ssl;
#define BUFF_SIZE 256
static const char sendBuff[]= "Hello Server\n" ;
char rcvBuff[BUFF_SIZE] = {0};
static T_IPV4EP my_addr = { 0, 0 };
T_IPV4EP dst_addr;
if(args->argc >= 2){
if((dst_addr.ipaddr = getIPaddr(args->argv[1])) == 0){
printf("ERROR: IP address\n");
return;
}
if((dst_addr.portno = getPort(args->argv[2])) == 0){
printf("ERROR: IP address\n");
return;
}
}
if((ercd = tcp_con_cep(cepid, &my_addr, &dst_addr, TMO_FEVR)) != E_OK) {
printf("ERROR TCP Connect: %d\n", ercd);
return;
}
if((ssl = wolfSSL_new(ctx)) == NULL) {
printf("ERROR wolfSSL_new: %d\n", wolfSSL_get_error(ssl, 0));
return;
}
/* set callback context */
wolfSSL_SetIOReadCtx(ssl, (void *)&cepid);
wolfSSL_SetIOWriteCtx(ssl, (void *)&cepid);
if(wolfSSL_connect(ssl) != SSL_SUCCESS) {
printf("ERROR SSL connect: %d\n", wolfSSL_get_error(ssl, 0));
return;
}
if (wolfSSL_write(ssl, sendBuff, strlen(sendBuff)) != strlen(sendBuff)) {
printf("ERROR SSL write: %d\n", wolfSSL_get_error(ssl, 0));
return;
}
if ((ret=wolfSSL_read(ssl, rcvBuff, BUFF_SIZE)) < 0) {
printf("ERROR SSL read: %d\n", wolfSSL_get_error(ssl, 0));
return;
}
rcvBuff[ret] = '\0' ;
printf("Recieved: %s\n", rcvBuff);
/* frees all data before client termination */
wolfSSL_free(ssl);
wolfSSL_CTX_free(ctx);
wolfSSL_Cleanup();
tcp_sht_cep(cepid);
tcp_cls_cep(cepid, TMO_FEVR);
return;
}

View File

@@ -0,0 +1,18 @@
typedef struct func_args
{
int argc;
char **argv;
int return_code;
} func_args;
void wolfSSL_init(void) ;
void wolfSSL_main(void) ;
WOLFSSL_CTX *wolfSSL_TLS_server_init(void);
WOLFSSL_CTX *wolfSSL_TLS_client_init(void);
void benchmark_test(void *args);
void wolfcrypt_test(void *args);
void wolfSSL_TLS_client(void *ctx, func_args *args);
void wolfSSL_TLS_server(void *ctx, func_args *args);

View File

@@ -0,0 +1,125 @@
/* wolf_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 "user_settings.h"
#include "wolfssl/ssl.h"
#include <stdio.h>
#include <stdint.h>
#include "wolf_demo.h"
static WOLFSSL_CTX *wolfSSL_sv_ctx;
static WOLFSSL_CTX *wolfSSL_cl_ctx;
static long tick;
static void timeTick(void)
{
tick++;
}
#define FREQ 10000 /* Hz */
double current_time(int reset)
{
if(reset) tick = 0 ;
return ((double)tick/FREQ) ;
}
#define ARG_SZ 256
static char argBuff[ARG_SZ];
static int get_arg(func_args *args)
{
int i;
char *arg = argBuff;
args->argc = 0;
for(i=0; i<ARG_SZ; i++) {
*arg = getchar();
switch(*arg){
case '\n':
*arg = '\0';
return args->argc;
case ' ':
*arg++ = '\0';
while(*arg++ == ' '); /* Skip space */
args->argv[++args->argc] = arg;
break;
default:
arg++;
}
}
return args->argc ;
}
void wolfSSL_init()
{
uint32_t channel;
R_CMT_CreatePeriodic(FREQ, &timeTick, &channel);
wolfSSL_sv_ctx = wolfSSL_TLS_server_init();
wolfSSL_cl_ctx = wolfSSL_TLS_client_init();
wolfSSL_main();
}
void wolfSSL_main()
{
int c;
func_args args = {0};
printf("wolfSSL Demo\nt: test, b: benchmark, s: server, or c <IP addr> <Port>: client\n$ ");
c = getchar();
switch(c) {
case 't':
get_arg(&args);
printf("Start wolfCrypt Test\n");
wolfcrypt_test(&args);
printf("End wolfCrypt Test\n");
break;
case 'b':
get_arg(&args);
printf("Start wolfCrypt Benchmark\n");
benchmark_test(NULL);
printf("End wolfCrypt Benchmark\n");
break;
case 'c':
if(get_arg(&args) < 0)
break;
printf("Start TLS Client(%s, %s)\n", args.argv[1], args.argv[2]);
wolfSSL_TLS_client(wolfSSL_cl_ctx, &args);
printf("End TLS Client\n");
break;
case 's':
if(get_arg(&args) < 0)
break;
printf("Start TLS Server\n");
wolfSSL_TLS_server(wolfSSL_sv_ctx, &args);
printf("End TLS Server\n");
break;
default:
printf("Command Error\n");
}
}

View File

@@ -0,0 +1,173 @@
/* wolf_server.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 <stdio.h>
#include <string.h>
#include "r_t4_itcpip.h"
#include "wolfssl/wolfcrypt/settings.h"
#include "wolfssl/ssl.h"
#include "wolfssl/certs_test.h"
#include "wolf_demo.h"
static int my_IORecv(WOLFSSL* ssl, char* buff, int sz, void* ctx)
{
int ret;
ID cepid;
if(ctx != NULL)cepid = *(ID *)ctx;
else return WOLFSSL_CBIO_ERR_GENERAL;
ret = tcp_rcv_dat(cepid, buff, sz, TMO_FEVR);
if(ret == sz)return ret;
else return WOLFSSL_CBIO_ERR_GENERAL;
}
static int my_IOSend(WOLFSSL* ssl, char* buff, int sz, void* ctx)
{
int ret;
ID cepid;
if(ctx != NULL)cepid = *(ID *)ctx;
else return WOLFSSL_CBIO_ERR_GENERAL;
ret = tcp_snd_dat(cepid, buff, sz, TMO_FEVR);
if(ret == sz)return ret;
else return WOLFSSL_CBIO_ERR_GENERAL;
}
WOLFSSL_CTX *wolfSSL_TLS_server_init()
{
int ret;
WOLFSSL_CTX* ctx;
#ifndef NO_FILESYSTEM
#ifdef USE_ECC_CERT
char *cert = "./certs/server-ecc-cert.pem";
char *key = "./certs/server-ecc-key.pem";
#else
char *cert = "./certs/server-cert.pem";
char *key = "./certs/server-key.pem";
#endif
#else
#ifdef USE_ECC_CERT
char *cert = serv_ecc_der_256;
int sizeof_cert = sizeof_serv_ecc_der_256;
char *cert = serv_ecc_key_der_256;
int sizeof_key = sizeof_serv_ecc_key_der_256;
#else
const unsigned char *cert = server_cert_der_2048;
#define sizeof_cert sizeof_server_cert_der_2048
const unsigned char *key = server_key_der_2048;
#define sizeof_key sizeof_server_key_der_2048
#endif
#endif
wolfSSL_Init();
#ifdef DEBUG_WOLFSSL
wolfSSL_Debugging_ON();
#endif
/* Create and initialize WOLFSSL_CTX */
if ((ctx = wolfSSL_CTX_new(wolfSSLv23_server_method_ex((void *)NULL))) == NULL) {
printf("ERROR: failed to create WOLFSSL_CTX\n");
return NULL;
}
#if !defined(NO_FILESYSTEM)
ret = wolfSSL_CTX_use_certificate_file(ctx, cert, 0);
#else
ret = wolfSSL_CTX_use_certificate_buffer(ctx, cert, sizeof_cert, SSL_FILETYPE_ASN1);
#endif
if (ret != SSL_SUCCESS) {
printf("Error %d loading server-cert!\n", ret);
return NULL;
}
/* Load server key into WOLFSSL_CTX */
#if !defined(NO_FILESYSTEM)
ret = wolfSSL_CTX_use_PrivateKey_file(ctx, key, 0);
#else
ret = wolfSSL_CTX_use_PrivateKey_buffer(ctx, key, sizeof_key, SSL_FILETYPE_ASN1);
#endif
if (ret != SSL_SUCCESS) {
printf("Error %d loading server-key!\n", ret);
return NULL;
}
/* Register callbacks */
wolfSSL_SetIORecv(ctx, my_IORecv);
wolfSSL_SetIOSend(ctx, my_IOSend);
return ctx;
}
void wolfSSL_TLS_server(void *v_ctx, func_args *args)
{
ID cepid = 1;
ID repid = 1;
ER ercd;
WOLFSSL_CTX *ctx = (WOLFSSL_CTX *)v_ctx;
(void) args;
WOLFSSL *ssl;
int len;
#define BUFF_SIZE 256
char buff[BUFF_SIZE];
T_IPV4EP dst_addr = {0, 0};
if((ercd = tcp_acp_cep(cepid, repid, &dst_addr, TMO_FEVR)) != E_OK) {
printf("ERROR TCP Accept: %d\n", ercd);
return;
}
if((ssl = wolfSSL_new(ctx)) == NULL) {
printf("ERROR: failed wolfSSL_new\n");
return;
}
wolfSSL_SetIOReadCtx(ssl, (void *)&cepid);
wolfSSL_SetIOWriteCtx(ssl, (void *)&cepid);
if (wolfSSL_accept(ssl) < 0) {
printf("ERROR: SSL Accept(%d)\n", wolfSSL_get_error(ssl, 0));
return;
}
if ((len = wolfSSL_read(ssl, buff, sizeof(buff) - 1)) < 0) {
printf("ERROR: SSL Read(%d)\n", wolfSSL_get_error(ssl, 0));
return;
}
buff[len] = '\0';
printf("Recieved: %s\n", buff);
if (wolfSSL_write(ssl, buff, len) != len) {
printf("ERROR: SSL Wirte(%d)\n", wolfSSL_get_error(ssl, 0));
return;
}
wolfSSL_free(ssl);
tcp_sht_cep(cepid);
}

View File

@@ -10,31 +10,16 @@
<Property>fb98844b-2c27-4275-9804-f6e63e204da0</Property>
<ActiveProjectGuid>22bd583d-ee58-4c8e-8924-5337fd34b2b3</ActiveProjectGuid>
</Instance>
<Instance Guid="8ba268e2-1638-4188-87fc-9165a8cd11e7">
<Name>dbsct.c</Name>
<Type>File</Type>
<RelativePath>dbsct.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<Instance Guid="1e626b57-3633-42b2-ba5f-87f5e41d554a">
<Name>bsp</Name>
<Type>Category</Type>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
<Property>c1430910-c62b-40a9-8083-907feee08a05</Property>
</Instance>
<Instance Guid="924462d3-0861-4baf-b323-c25be1e91380">
<Name>intprg.c</Name>
<Instance Guid="3935a5fa-59a8-40a4-8f21-f56f418ce3a3">
<Name>test.c</Name>
<Type>File</Type>
<RelativePath>intprg.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
</Instance>
<Instance Guid="f665a87e-34c4-40a6-9ce5-f9fffe993cf1">
<Name>resetprg.c</Name>
<Type>File</Type>
<RelativePath>resetprg.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
</Instance>
<Instance Guid="80a4d598-6931-4ad5-bf89-5b184e8bcb07">
<Name>sbrk.c</Name>
<Type>File</Type>
<RelativePath>sbrk.c</RelativePath>
<RelativePath>..\..\..\..\..\wolfcrypt\test\test.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
</Instance>
@@ -45,55 +30,6 @@
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
</Instance>
<Instance Guid="e3f84555-8ea7-4c19-9746-f36c31a8d08d">
<Name>vecttbl.c</Name>
<Type>File</Type>
<RelativePath>vecttbl.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
</Instance>
<Instance Guid="2e2adfb7-575c-4f6a-ba85-9bae985801f8">
<Name>iodefine.h</Name>
<Type>File</Type>
<RelativePath>iodefine.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
</Instance>
<Instance Guid="206997d6-3993-4419-b7ea-eb33a744ba9c">
<Name>sbrk.h</Name>
<Type>File</Type>
<RelativePath>sbrk.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
</Instance>
<Instance Guid="03b1981e-eea5-433c-b4d4-0546bc9c8cdd">
<Name>stacksct.h</Name>
<Type>File</Type>
<RelativePath>stacksct.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
</Instance>
<Instance Guid="bacd2a2e-e3f3-45b5-a04b-63f43c58b79d">
<Name>typedefine.h</Name>
<Type>File</Type>
<RelativePath>typedefine.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
</Instance>
<Instance Guid="a5ee4099-25c8-44a7-95d6-2797644437c9">
<Name>vect.h</Name>
<Type>File</Type>
<RelativePath>vect.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
</Instance>
<Instance Guid="3935a5fa-59a8-40a4-8f21-f56f418ce3a3">
<Name>test.c</Name>
<Type>File</Type>
<RelativePath>..\..\..\..\..\wolfcrypt\test\test.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
</Instance>
<Instance Guid="cc854f0a-653c-4d49-ad45-0df17f62765b">
<Name>wolfssl_dummy.c</Name>
<Type>File</Type>
@@ -101,27 +37,6 @@
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
</Instance>
<Instance Guid="edf9134c-ea23-4afe-9dfb-ba54df0f2e45">
<Name>lowsrc.c</Name>
<Type>File</Type>
<RelativePath>lowsrc.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
</Instance>
<Instance Guid="4385a751-e97b-46d6-b9ab-ac55b25b17dc">
<Name>lowlvl.src</Name>
<Type>File</Type>
<RelativePath>lowlvl.src</RelativePath>
<TreeImageGuid>f654126d-e7ad-426d-be34-8455271d959b</TreeImageGuid>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
</Instance>
<Instance Guid="f4e309eb-8626-47bb-9bdc-b2ada574f9da">
<Name>unistd.h</Name>
<Type>File</Type>
<RelativePath>..\common\unistd.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
</Instance>
<Instance Guid="0a937f6c-b35b-4ff1-b2f4-9abc7258bb42">
<Name>user_settings.h</Name>
<Type>File</Type>
@@ -129,6 +44,104 @@
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>12d9e600-88ab-4da9-95ad-6813d38e0973</ParentItem>
</Instance>
<Instance Guid="ecdc0105-42e8-490b-a5f4-dbef62521ce3">
<Name>dbsct.c</Name>
<Type>File</Type>
<RelativePath>..\bsp\dbsct.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
</Instance>
<Instance Guid="38d8908f-460f-45be-83f0-771791c86bca">
<Name>hwsetup.c</Name>
<Type>File</Type>
<RelativePath>..\bsp\hwsetup.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
</Instance>
<Instance Guid="ad43352b-89de-44c3-ab21-f8c3a662dee3">
<Name>intprg.c</Name>
<Type>File</Type>
<RelativePath>..\bsp\intprg.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
</Instance>
<Instance Guid="cb2f9b7a-3e74-4d3f-b86a-5b03236b2e6e">
<Name>iodefine.h</Name>
<Type>File</Type>
<RelativePath>..\bsp\iodefine.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
</Instance>
<Instance Guid="2e12fadb-ba8f-4ede-a450-c2c2956cf93a">
<Name>lowlvl.src</Name>
<Type>File</Type>
<RelativePath>..\bsp\lowlvl.src</RelativePath>
<TreeImageGuid>f654126d-e7ad-426d-be34-8455271d959b</TreeImageGuid>
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
</Instance>
<Instance Guid="28ec7225-91c8-4957-b715-ce2fa298b8d3">
<Name>lowsrc.c</Name>
<Type>File</Type>
<RelativePath>..\bsp\lowsrc.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
</Instance>
<Instance Guid="49bd22e0-ff27-4cf2-b12b-7dacd3576b91">
<Name>lowsrc.h</Name>
<Type>File</Type>
<RelativePath>..\bsp\lowsrc.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
</Instance>
<Instance Guid="30ea2319-abc7-43b0-b197-234093a1ef8c">
<Name>resetprg.c</Name>
<Type>File</Type>
<RelativePath>..\bsp\resetprg.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
</Instance>
<Instance Guid="3ce36679-d436-4df9-b7e0-ba69d2319971">
<Name>sbrk.c</Name>
<Type>File</Type>
<RelativePath>..\bsp\sbrk.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
</Instance>
<Instance Guid="4ad9215c-6d52-4f20-969e-ff09f8f3a53a">
<Name>sbrk.h</Name>
<Type>File</Type>
<RelativePath>..\bsp\sbrk.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
</Instance>
<Instance Guid="f8102b49-fd5c-4e89-a864-d3251faed23b">
<Name>stacksct.h</Name>
<Type>File</Type>
<RelativePath>..\bsp\stacksct.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
</Instance>
<Instance Guid="a51ca6fb-bbd1-4294-b661-d9df34cd3e64">
<Name>typedefine.h</Name>
<Type>File</Type>
<RelativePath>..\bsp\typedefine.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
</Instance>
<Instance Guid="ee36a29e-31b3-4306-b2d0-9fec843308fb">
<Name>vect.h</Name>
<Type>File</Type>
<RelativePath>..\bsp\vect.h</RelativePath>
<TreeImageGuid>03cad1e8-2eb3-4cde-a8a3-982423631122</TreeImageGuid>
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
</Instance>
<Instance Guid="49e27495-6de7-42eb-b336-691c7499424b">
<Name>vecttbl.c</Name>
<Type>File</Type>
<RelativePath>..\bsp\vecttbl.c</RelativePath>
<TreeImageGuid>941832c1-fc3b-4e1b-94e8-01ea17128b42</TreeImageGuid>
<ParentItem>1e626b57-3633-42b2-ba5f-87f5e41d554a</ParentItem>
</Instance>
</Class>
<Class Guid="fb98844b-2c27-4275-9804-f6e63e204da0">
<Instance Guid="fb98844b-2c27-4275-9804-f6e63e204da0">
@@ -136,6 +149,11 @@
<MemoCount>0</MemoCount>
</Instance>
</Class>
<Class Guid="78a5c5cd-76cb-4bcc-a031-3020011fbc9a">
<Instance Guid="c1430910-c62b-40a9-8083-907feee08a05">
<MemoCount>0</MemoCount>
</Instance>
</Class>
<Class Guid="8fb9c1f6-d351-4d10-8d99-bf5b3015b84c">
<Instance Guid="00000000-0000-0000-0000-000000000000">
<UsingPlatformGuid>d249e3b7-1c98-499d-ac0e-829eb0dc07f4</UsingPlatformGuid>
@@ -152,13 +170,13 @@
<DataFormatVersion>1.0</DataFormatVersion>
</Instance>
<Instance Guid="2a81c37a-5015-44c2-9f40-e58b669eec75">
<DeviceName>R5F565N9FxLJ</DeviceName>
<DeviceName>R5F571MLDxFC</DeviceName>
<MemoCount>0</MemoCount>
</Instance>
</Class>
<Class Guid="873c9a58-9bc5-439a-b476-78629a4553ed">
<Instance Guid="873c9a58-9bc5-439a-b476-78629a4553ed">
<ProjectDeviceChangedCounter>0</ProjectDeviceChangedCounter>
<ProjectDeviceChangedCounter>2</ProjectDeviceChangedCounter>
<ProjectInitialDeviceName>R5F565N9FxLJ</ProjectInitialDeviceName>
</Instance>
</Class>
@@ -174,28 +192,30 @@
<BuildMode0>RABlAGYAYQB1AGwAdABCAHUAaQBsAGQA</BuildMode0>
<BatchBuildFlag0>False</BatchBuildFlag0>
<CurrentBuildMode>DefaultBuild</CurrentBuildMode>
<SourceItemGuid0>8ba268e2-1638-4188-87fc-9165a8cd11e7</SourceItemGuid0>
<SourceItemGuid0>3935a5fa-59a8-40a4-8f21-f56f418ce3a3</SourceItemGuid0>
<SourceItemType0>CSource</SourceItemType0>
<SourceItemGuid1>924462d3-0861-4baf-b323-c25be1e91380</SourceItemGuid1>
<SourceItemGuid1>9ce51d13-dee2-4fe6-b026-5eb59375af30</SourceItemGuid1>
<SourceItemType1>CSource</SourceItemType1>
<SourceItemGuid2>f665a87e-34c4-40a6-9ce5-f9fffe993cf1</SourceItemGuid2>
<SourceItemGuid2>cc854f0a-653c-4d49-ad45-0df17f62765b</SourceItemGuid2>
<SourceItemType2>CSource</SourceItemType2>
<SourceItemGuid3>80a4d598-6931-4ad5-bf89-5b184e8bcb07</SourceItemGuid3>
<SourceItemGuid3>ecdc0105-42e8-490b-a5f4-dbef62521ce3</SourceItemGuid3>
<SourceItemType3>CSource</SourceItemType3>
<SourceItemGuid4>9ce51d13-dee2-4fe6-b026-5eb59375af30</SourceItemGuid4>
<SourceItemGuid4>38d8908f-460f-45be-83f0-771791c86bca</SourceItemGuid4>
<SourceItemType4>CSource</SourceItemType4>
<SourceItemGuid5>e3f84555-8ea7-4c19-9746-f36c31a8d08d</SourceItemGuid5>
<SourceItemGuid5>ad43352b-89de-44c3-ab21-f8c3a662dee3</SourceItemGuid5>
<SourceItemType5>CSource</SourceItemType5>
<SourceItemGuid6>3935a5fa-59a8-40a4-8f21-f56f418ce3a3</SourceItemGuid6>
<SourceItemType6>CSource</SourceItemType6>
<SourceItemGuid7>cc854f0a-653c-4d49-ad45-0df17f62765b</SourceItemGuid7>
<SourceItemGuid6>2e12fadb-ba8f-4ede-a450-c2c2956cf93a</SourceItemGuid6>
<SourceItemType6>AsmSource</SourceItemType6>
<SourceItemGuid7>28ec7225-91c8-4957-b715-ce2fa298b8d3</SourceItemGuid7>
<SourceItemType7>CSource</SourceItemType7>
<SourceItemGuid8>edf9134c-ea23-4afe-9dfb-ba54df0f2e45</SourceItemGuid8>
<SourceItemGuid8>30ea2319-abc7-43b0-b197-234093a1ef8c</SourceItemGuid8>
<SourceItemType8>CSource</SourceItemType8>
<SourceItemGuid9>4385a751-e97b-46d6-b9ab-ac55b25b17dc</SourceItemGuid9>
<SourceItemType9>AsmSource</SourceItemType9>
<SourceItemCount>10</SourceItemCount>
<LastDeviceChangedCounter>0</LastDeviceChangedCounter>
<SourceItemGuid9>3ce36679-d436-4df9-b7e0-ba69d2319971</SourceItemGuid9>
<SourceItemType9>CSource</SourceItemType9>
<SourceItemGuid10>49e27495-6de7-42eb-b336-691c7499424b</SourceItemGuid10>
<SourceItemType10>CSource</SourceItemType10>
<SourceItemCount>11</SourceItemCount>
<LastDeviceChangedCounter>2</LastDeviceChangedCounter>
</Instance>
<Instance Guid="9e208646-ccba-4100-a676-29b1efe6545f">
<AsmOptionInclude-DefaultValue />
@@ -278,7 +298,7 @@
<GeneralOptionPatch-DefaultValue>None</GeneralOptionPatch-DefaultValue>
<GeneralOptionSaveAcc-DefaultValue>False</GeneralOptionSaveAcc-DefaultValue>
<IsLockedByUser>False</IsLockedByUser>
<TimeTagModified--0>-8586768138329950975</TimeTagModified--0>
<TimeTagModified--0>-8586657613297042146</TimeTagModified--0>
<BuildMode-0>DefaultBuild</BuildMode-0>
<Memo-0 />
<OutputMessageFormat-0>%TargetFiles%</OutputMessageFormat-0>
@@ -376,6 +396,7 @@
<COptionShowExpansions-DefaultValue>False</COptionShowExpansions-DefaultValue>
<COptionCommandLine-DefaultValue>-isa=rxv2
-fpu
-include=..\bsp
-include=..\common
-include=..\..\..\..\..
-include=..\wolfssl_lib
@@ -450,7 +471,7 @@
<COptionFloatOrder-DefaultValue>False</COptionFloatOrder-DefaultValue>
<COptionIncode-DefaultValue>Sjis</COptionIncode-DefaultValue>
<IsLockedByUser>False</IsLockedByUser>
<TimeTagModified--0>-8586767489570851217</TimeTagModified--0>
<TimeTagModified--0>-8586657641844903702</TimeTagModified--0>
<COptionLangC-0>C99</COptionLangC-0>
<COptionListfile-0>False</COptionListfile-0>
<COptionLogo-0>False</COptionLogo-0>
@@ -469,7 +490,8 @@
<COptionXcref-0>False</COptionXcref-0>
<COptionControlFlowIntegrity-0>None</COptionControlFlowIntegrity-0>
<COptionDebug-0>True</COptionDebug-0>
<COptionInclude-0>..\common
<COptionInclude-0>..\bsp
..\common
..\..\..\..\..
..\wolfssl_lib
</COptionInclude-0>
@@ -491,6 +513,7 @@
<COptionShowExpansions-0>False</COptionShowExpansions-0>
<COptionCommandLine-0>-isa=rxv2
-fpu
-include=..\bsp
-include=..\common
-include=..\..\..\..\..
-include=..\wolfssl_lib
@@ -703,7 +726,7 @@ D_2=R_2
-exit
</LinkOptionCommandLine-DefaultValue>
<IsLockedByUser>False</IsLockedByUser>
<TimeTagModified--0>-8586768128523424353</TimeTagModified--0>
<TimeTagModified--0>-8586657622167475000</TimeTagModified--0>
<LinkOptionCpu-0>False</LinkOptionCpu-0>
<LinkOptionForm-0>Absolute</LinkOptionForm-0>
<LinkOptionFormConvert-0>Stype</LinkOptionFormConvert-0>
@@ -1085,23 +1108,15 @@ D_2=R_2
</Instance>
<Instance Guid="8ba268e2-1638-4188-87fc-9165a8cd11e7">
<LinkOrder-0>0</LinkOrder-0>
<ItemAddTime>636604222525456322</ItemAddTime>
<ItemAddTimeCount>0</ItemAddTimeCount>
</Instance>
<Instance Guid="924462d3-0861-4baf-b323-c25be1e91380">
<LinkOrder-0>1</LinkOrder-0>
<ItemAddTime>636604222525456322</ItemAddTime>
<ItemAddTimeCount>1</ItemAddTimeCount>
</Instance>
<Instance Guid="f665a87e-34c4-40a6-9ce5-f9fffe993cf1">
<LinkOrder-0>2</LinkOrder-0>
<ItemAddTime>636604222525456322</ItemAddTime>
<ItemAddTimeCount>2</ItemAddTimeCount>
</Instance>
<Instance Guid="80a4d598-6931-4ad5-bf89-5b184e8bcb07">
<LinkOrder-0>3</LinkOrder-0>
<ItemAddTime>636604222525456322</ItemAddTime>
<ItemAddTimeCount>3</ItemAddTimeCount>
</Instance>
<Instance Guid="9ce51d13-dee2-4fe6-b026-5eb59375af30">
<LinkOrder-0>4</LinkOrder-0>
@@ -1110,96 +1125,122 @@ D_2=R_2
</Instance>
<Instance Guid="e3f84555-8ea7-4c19-9746-f36c31a8d08d">
<LinkOrder-0>5</LinkOrder-0>
<ItemAddTime>636604222525456322</ItemAddTime>
<ItemAddTimeCount>5</ItemAddTimeCount>
</Instance>
<Instance Guid="2e2adfb7-575c-4f6a-ba85-9bae985801f8">
<ItemAddTime>636604222525456322</ItemAddTime>
<ItemAddTimeCount>6</ItemAddTimeCount>
</Instance>
<Instance Guid="206997d6-3993-4419-b7ea-eb33a744ba9c">
<ItemAddTime>636604222525456322</ItemAddTime>
<ItemAddTimeCount>7</ItemAddTimeCount>
</Instance>
<Instance Guid="03b1981e-eea5-433c-b4d4-0546bc9c8cdd">
<ItemAddTime>636604222525456322</ItemAddTime>
<ItemAddTimeCount>8</ItemAddTimeCount>
</Instance>
<Instance Guid="bacd2a2e-e3f3-45b5-a04b-63f43c58b79d">
<ItemAddTime>636604222525456322</ItemAddTime>
<ItemAddTimeCount>9</ItemAddTimeCount>
</Instance>
<Instance Guid="a5ee4099-25c8-44a7-95d6-2797644437c9">
<ItemAddTime>636604222525456322</ItemAddTime>
<ItemAddTimeCount>10</ItemAddTimeCount>
</Instance>
<Instance Guid="3935a5fa-59a8-40a4-8f21-f56f418ce3a3">
<ItemAddTime>636604222907020637</ItemAddTime>
<ItemAddTimeCount>0</ItemAddTimeCount>
</Instance>
<Instance Guid="edf9134c-ea23-4afe-9dfb-ba54df0f2e45">
<ItemAddTime>636604233142621806</ItemAddTime>
<ItemAddTimeCount>0</ItemAddTimeCount>
</Instance>
<Instance Guid="cc854f0a-653c-4d49-ad45-0df17f62765b">
<ItemAddTime>636604231267559837</ItemAddTime>
<ItemAddTimeCount>1</ItemAddTimeCount>
</Instance>
<Instance Guid="4385a751-e97b-46d6-b9ab-ac55b25b17dc">
<ItemAddTime>636604237551510311</ItemAddTime>
<ItemAddTimeCount>0</ItemAddTimeCount>
</Instance>
<Instance Guid="0a937f6c-b35b-4ff1-b2f4-9abc7258bb42">
<ItemAddTime>636604904407738135</ItemAddTime>
<ItemAddTimeCount>0</ItemAddTimeCount>
</Instance>
<Instance Guid="f4e309eb-8626-47bb-9bdc-b2ada574f9da">
<ItemAddTime>636604337733963935</ItemAddTime>
<Instance Guid="ecdc0105-42e8-490b-a5f4-dbef62521ce3">
<ItemAddTime>636714747864289133</ItemAddTime>
<ItemAddTimeCount>0</ItemAddTimeCount>
</Instance>
<Instance Guid="38d8908f-460f-45be-83f0-771791c86bca">
<ItemAddTime>636714747864289133</ItemAddTime>
<ItemAddTimeCount>1</ItemAddTimeCount>
</Instance>
<Instance Guid="ad43352b-89de-44c3-ab21-f8c3a662dee3">
<ItemAddTime>636714747864289133</ItemAddTime>
<ItemAddTimeCount>2</ItemAddTimeCount>
</Instance>
<Instance Guid="cb2f9b7a-3e74-4d3f-b86a-5b03236b2e6e">
<ItemAddTime>636714747864289133</ItemAddTime>
<ItemAddTimeCount>3</ItemAddTimeCount>
</Instance>
<Instance Guid="2e12fadb-ba8f-4ede-a450-c2c2956cf93a">
<ItemAddTime>636714747864289133</ItemAddTime>
<ItemAddTimeCount>4</ItemAddTimeCount>
</Instance>
<Instance Guid="28ec7225-91c8-4957-b715-ce2fa298b8d3">
<ItemAddTime>636714747864289133</ItemAddTime>
<ItemAddTimeCount>5</ItemAddTimeCount>
</Instance>
<Instance Guid="49bd22e0-ff27-4cf2-b12b-7dacd3576b91">
<ItemAddTime>636714747864289133</ItemAddTime>
<ItemAddTimeCount>6</ItemAddTimeCount>
</Instance>
<Instance Guid="30ea2319-abc7-43b0-b197-234093a1ef8c">
<ItemAddTime>636714747864289133</ItemAddTime>
<ItemAddTimeCount>7</ItemAddTimeCount>
</Instance>
<Instance Guid="3ce36679-d436-4df9-b7e0-ba69d2319971">
<ItemAddTime>636714747864289133</ItemAddTime>
<ItemAddTimeCount>8</ItemAddTimeCount>
</Instance>
<Instance Guid="4ad9215c-6d52-4f20-969e-ff09f8f3a53a">
<ItemAddTime>636714747864289133</ItemAddTime>
<ItemAddTimeCount>9</ItemAddTimeCount>
</Instance>
<Instance Guid="f8102b49-fd5c-4e89-a864-d3251faed23b">
<ItemAddTime>636714747864289133</ItemAddTime>
<ItemAddTimeCount>10</ItemAddTimeCount>
</Instance>
<Instance Guid="a51ca6fb-bbd1-4294-b661-d9df34cd3e64">
<ItemAddTime>636714747864289133</ItemAddTime>
<ItemAddTimeCount>11</ItemAddTimeCount>
</Instance>
<Instance Guid="ee36a29e-31b3-4306-b2d0-9fec843308fb">
<ItemAddTime>636714747864289133</ItemAddTime>
<ItemAddTimeCount>12</ItemAddTimeCount>
</Instance>
<Instance Guid="49e27495-6de7-42eb-b336-691c7499424b">
<ItemAddTime>636714747864289133</ItemAddTime>
<ItemAddTimeCount>13</ItemAddTimeCount>
</Instance>
<Instance Guid="a7be515f-f007-45ed-9059-4e1500c0f74d">
<TimeTagModified-SourceItem0--0>-8586768138329319486</TimeTagModified-SourceItem0--0>
<TimeTagModified-SourceItem0--0>-8586768137947755171</TimeTagModified-SourceItem0--0>
<SourceItem0-IsLockedByUser>False</SourceItem0-IsLockedByUser>
<SourceItem0-BuildingTarget-0>True</SourceItem0-BuildingTarget-0>
<SourceItem0-IndividualCompileOption-0>False</SourceItem0-IndividualCompileOption-0>
<TimeTagModified-SourceItem1--0>-8586768138329319486</TimeTagModified-SourceItem1--0>
<TimeTagModified-SourceItem1--0>-8586768137318965490</TimeTagModified-SourceItem1--0>
<SourceItem1-IsLockedByUser>False</SourceItem1-IsLockedByUser>
<SourceItem1-BuildingTarget-0>True</SourceItem1-BuildingTarget-0>
<SourceItem1-IndividualCompileOption-0>False</SourceItem1-IndividualCompileOption-0>
<TimeTagModified-SourceItem2--0>-8586768138329319486</TimeTagModified-SourceItem2--0>
<TimeTagModified-SourceItem2--0>-8586768129587215971</TimeTagModified-SourceItem2--0>
<SourceItem2-IsLockedByUser>False</SourceItem2-IsLockedByUser>
<SourceItem2-BuildingTarget-0>True</SourceItem2-BuildingTarget-0>
<SourceItem2-IndividualCompileOption-0>False</SourceItem2-IndividualCompileOption-0>
<TimeTagModified-SourceItem3--0>-8586768138329319486</TimeTagModified-SourceItem3--0>
<TimeTagModified-SourceItem3--0>-8586657612990486675</TimeTagModified-SourceItem3--0>
<SourceItem3-IsLockedByUser>False</SourceItem3-IsLockedByUser>
<SourceItem3-BuildingTarget-0>True</SourceItem3-BuildingTarget-0>
<SourceItem3-IndividualCompileOption-0>False</SourceItem3-IndividualCompileOption-0>
<TimeTagModified-SourceItem4--0>-8586768137318965490</TimeTagModified-SourceItem4--0>
<TimeTagModified-SourceItem4--0>-8586657612990486675</TimeTagModified-SourceItem4--0>
<SourceItem4-IsLockedByUser>False</SourceItem4-IsLockedByUser>
<SourceItem4-BuildingTarget-0>True</SourceItem4-BuildingTarget-0>
<SourceItem4-IndividualCompileOption-0>False</SourceItem4-IndividualCompileOption-0>
<TimeTagModified-SourceItem5--0>-8586768138329319486</TimeTagModified-SourceItem5--0>
<TimeTagModified-SourceItem5--0>-8586657612990486675</TimeTagModified-SourceItem5--0>
<SourceItem5-IsLockedByUser>False</SourceItem5-IsLockedByUser>
<SourceItem5-BuildingTarget-0>True</SourceItem5-BuildingTarget-0>
<SourceItem5-IndividualCompileOption-0>False</SourceItem5-IndividualCompileOption-0>
<TimeTagModified-SourceItem6--0>-8586768137947755171</TimeTagModified-SourceItem6--0>
<SourceItem6-IsLockedByUser>False</SourceItem6-IsLockedByUser>
<SourceItem6-BuildingTarget-0>True</SourceItem6-BuildingTarget-0>
<SourceItem6-IndividualCompileOption-0>False</SourceItem6-IndividualCompileOption-0>
<TimeTagModified-SourceItem7--0>-8586768129587215971</TimeTagModified-SourceItem7--0>
<TimeTagModified-SourceItem7--0>-8586657612990486675</TimeTagModified-SourceItem7--0>
<SourceItem7-IsLockedByUser>False</SourceItem7-IsLockedByUser>
<SourceItem7-BuildingTarget-0>True</SourceItem7-BuildingTarget-0>
<SourceItem7-IndividualCompileOption-0>False</SourceItem7-IndividualCompileOption-0>
<TimeTagModified-SourceItem8--0>-8586768127712154002</TimeTagModified-SourceItem8--0>
<TimeTagModified-SourceItem8--0>-8586657612990486675</TimeTagModified-SourceItem8--0>
<SourceItem8-IsLockedByUser>False</SourceItem8-IsLockedByUser>
<SourceItem8-BuildingTarget-0>True</SourceItem8-BuildingTarget-0>
<SourceItem8-IndividualCompileOption-0>False</SourceItem8-IndividualCompileOption-0>
</Instance>
<Instance Guid="c20a78d9-8038-46fe-9b87-bc2fa2aa9bdc">
<TimeTagModified-SourceItem9--0>-8586768123303255465</TimeTagModified-SourceItem9--0>
<TimeTagModified-SourceItem9--0>-8586657612990486675</TimeTagModified-SourceItem9--0>
<SourceItem9-IsLockedByUser>False</SourceItem9-IsLockedByUser>
<SourceItem9-BuildingTarget-0>True</SourceItem9-BuildingTarget-0>
<SourceItem9-IndividualAssembleOption-0>False</SourceItem9-IndividualAssembleOption-0>
<SourceItem9-IndividualCompileOption-0>False</SourceItem9-IndividualCompileOption-0>
<TimeTagModified-SourceItem10--0>-8586657612990486675</TimeTagModified-SourceItem10--0>
<SourceItem10-IsLockedByUser>False</SourceItem10-IsLockedByUser>
<SourceItem10-BuildingTarget-0>True</SourceItem10-BuildingTarget-0>
<SourceItem10-IndividualCompileOption-0>False</SourceItem10-IndividualCompileOption-0>
</Instance>
<Instance Guid="c20a78d9-8038-46fe-9b87-bc2fa2aa9bdc">
<TimeTagModified-SourceItem6--0>-8586657612990486675</TimeTagModified-SourceItem6--0>
<SourceItem6-IsLockedByUser>False</SourceItem6-IsLockedByUser>
<SourceItem6-BuildingTarget-0>True</SourceItem6-BuildingTarget-0>
<SourceItem6-IndividualAssembleOption-0>False</SourceItem6-IndividualAssembleOption-0>
</Instance>
</Class>
<Class Guid="44fa27c9-0aa0-4297-bd3b-2c5c5bdb8881">
@@ -1245,10 +1286,10 @@ D_2=R_2
</Class>
<Class Guid="e4df8d71-236e-4af2-aaea-56345a08da25">
<Instance Guid="9e76d4e8-0b8f-4e7c-91b7-a4c442bcf2e7">
<DeviceChangedCounter>0</DeviceChangedCounter>
<DeviceName>R5F565N9FxLJ</DeviceName>
<DeviceChangedCounter>2</DeviceChangedCounter>
<DeviceName>R5F571MLDxFC</DeviceName>
<DebuggerProperty-EssentialProperty-Endian-CpuEndian>Little</DebuggerProperty-EssentialProperty-Endian-CpuEndian>
<DebuggerProperty-EssentialProperty-Clock-SystemClockFrequency>120</DebuggerProperty-EssentialProperty-Clock-SystemClockFrequency>
<DebuggerProperty-EssentialProperty-Clock-SystemClockFrequency>240</DebuggerProperty-EssentialProperty-Clock-SystemClockFrequency>
<DebuggerProperty-EssentialProperty-PeripheralFunctionSimulation-RegisterPeripheral-Length>3</DebuggerProperty-EssentialProperty-PeripheralFunctionSimulation-RegisterPeripheral-Length>
<DebuggerProperty-EssentialProperty-PeripheralFunctionSimulation-RegisterPeripheral-Item0-Name>CMT</DebuggerProperty-EssentialProperty-PeripheralFunctionSimulation-RegisterPeripheral-Item0-Name>
<DebuggerProperty-EssentialProperty-PeripheralFunctionSimulation-RegisterPeripheral-Item0-IsUse>False</DebuggerProperty-EssentialProperty-PeripheralFunctionSimulation-RegisterPeripheral-Item0-IsUse>
@@ -1283,37 +1324,37 @@ D_2=R_2
<DebuggerProperty-DownloadProperty-None-DefaultDownloadItemSupported>True</DebuggerProperty-DownloadProperty-None-DefaultDownloadItemSupported>
<DebuggerProperty-OptionalProperty-Register-UpdateDisplayInExecutionForPC>No</DebuggerProperty-OptionalProperty-Register-UpdateDisplayInExecutionForPC>
<DebuggerProperty-OptionalProperty-Register-UpdateIntervalForPC>500</DebuggerProperty-OptionalProperty-Register-UpdateIntervalForPC>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-Length>19</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-Length>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-Length>17</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-Length>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-MapType>InternalRam</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-StartAddress>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-EndAddress>262143</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-EndAddress>524287</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-IsReadOnly>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-HasChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem0-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-MapType>NonMap</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-StartAddress>262144</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-EndAddress>524287</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-StartAddress>524288</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-EndAddress>540671</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-IsReadOnly>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-HasChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem1-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-StartAddress>524288</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-EndAddress>540671</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-MapType>NonMap</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-StartAddress>540672</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-EndAddress>548863</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-IsReadOnly>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-HasChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem2-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-MapType>NonMap</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-StartAddress>540672</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-EndAddress>548863</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-StartAddress>548864</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-EndAddress>557055</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-IsReadOnly>
@@ -1321,35 +1362,35 @@ D_2=R_2
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem3-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-StartAddress>548864</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-EndAddress>557055</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-StartAddress>557056</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-EndAddress>655359</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-IsReadOnly>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-HasChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-Endian>Big</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem4-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-StartAddress>557056</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-EndAddress>655359</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-StartAddress>655360</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-EndAddress>671743</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-IsReadOnly>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-HasChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-Endian>Big</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-StartAddress>655360</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-EndAddress>671743</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem5-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-MapType>NonMap</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-StartAddress>671744</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-EndAddress>679935</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-IsReadOnly>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-HasChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem6-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-MapType>InternalRam</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-StartAddress>671744</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-EndAddress>679935</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-StartAddress>679936</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-EndAddress>786431</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-IsReadOnly>
@@ -1357,26 +1398,26 @@ D_2=R_2
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem7-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-StartAddress>679936</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-EndAddress>786431</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-StartAddress>786432</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-EndAddress>917503</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-IsReadOnly>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-HasChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-Endian>Big</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem8-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-StartAddress>786432</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-EndAddress>917503</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-StartAddress>917504</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-EndAddress>1048575</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-IsReadOnly>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-HasChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-Endian>Big</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-StartAddress>917504</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-EndAddress>1048575</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem9-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-MapType>InternalRom</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-StartAddress>1048576</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-EndAddress>1114111</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-IsReadOnly>
@@ -1384,77 +1425,59 @@ D_2=R_2
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem10-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-MapType>NonMap</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-StartAddress>1048576</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-EndAddress>8380415</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-StartAddress>1114112</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-EndAddress>1179711</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-IsReadOnly>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-HasChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem11-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-StartAddress>8380416</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-EndAddress>8388607</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-MapType>InternalRam</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-StartAddress>1179712</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-EndAddress>1179759</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-IsReadOnly>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-HasChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-Endian>Big</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem12-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-MapType>NonMap</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-StartAddress>8388608</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-EndAddress>4269759743</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-StartAddress>1179760</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-EndAddress>8380415</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-IsReadOnly>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-HasChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem13-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-MapType>InternalRam</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-StartAddress>4269759744</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-EndAddress>4269759871</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-MapType>Sfr</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-StartAddress>8380416</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-EndAddress>8388607</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-IsReadOnly>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-HasChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-Endian>Big</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem14-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-MapType>NonMap</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-StartAddress>4269759872</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-EndAddress>4269768047</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-StartAddress>8388608</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-EndAddress>4290772991</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-IsReadOnly>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-HasChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem15-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-MapType>InternalRam</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-StartAddress>4269768048</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-EndAddress>4269768095</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-MapType>InternalRom</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-StartAddress>4290772992</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-EndAddress>4294967295</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-IsReadOnly>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-HasChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem16-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-MapType>NonMap</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-StartAddress>4269768096</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-EndAddress>4293918719</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-IsReadOnly>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-HasChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem17-Endian>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-MapType>InternalRom</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-MapType>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-StartAddress>4293918720</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-StartAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-EndAddress>4294967295</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-EndAddress>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-ChipSelect>0</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-ChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-AccessSize>8</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-AccessSize>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-IsReadOnly>True</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-IsReadOnly>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-HasChipSelect>False</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-HasChipSelect>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-FieldInformation>None</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-FieldInformation>
<DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-Endian>Little</DebuggerProperty-OptionalProperty-Memory-MemoryMappings-MemoryMapItem18-Endian>
<DebuggerProperty-OptionalProperty-AccessMemory-UpdateDisplayInExecution>Yes</DebuggerProperty-OptionalProperty-AccessMemory-UpdateDisplayInExecution>
<DebuggerProperty-OptionalProperty-AccessMemory-UpdateInterval>500</DebuggerProperty-OptionalProperty-AccessMemory-UpdateInterval>
<DebuggerProperty-OptionalProperty-Trace-UseTrace>No</DebuggerProperty-OptionalProperty-Trace-UseTrace>

View File

@@ -45,9 +45,11 @@ void wolfcrypt_test(func_args args);
void main(void)
{
func_args args = { 1 };
printf("Start wolfCrypt Test\n");
wolfcrypt_test(args);
printf("End wolfCrypt Test\n");
}
#ifdef __cplusplus

View File

@@ -545,13 +545,13 @@
<DataFormatVersion>1.0</DataFormatVersion>
</Instance>
<Instance Guid="2a81c37a-5015-44c2-9f40-e58b669eec75">
<DeviceName>R5F565N7BxFB</DeviceName>
<DeviceName>R5F571MLDxFC</DeviceName>
<MemoCount>0</MemoCount>
</Instance>
</Class>
<Class Guid="873c9a58-9bc5-439a-b476-78629a4553ed">
<Instance Guid="873c9a58-9bc5-439a-b476-78629a4553ed">
<ProjectDeviceChangedCounter>0</ProjectDeviceChangedCounter>
<ProjectDeviceChangedCounter>1</ProjectDeviceChangedCounter>
<ProjectInitialDeviceName>R5F565N7BxFB</ProjectInitialDeviceName>
</Instance>
</Class>
@@ -704,7 +704,7 @@
<SourceItemGuid67>d1a109cd-a5af-4f79-8bef-7acd6d46c8db</SourceItemGuid67>
<SourceItemType67>CSource</SourceItemType67>
<SourceItemCount>68</SourceItemCount>
<LastDeviceChangedCounter>0</LastDeviceChangedCounter>
<LastDeviceChangedCounter>1</LastDeviceChangedCounter>
</Instance>
<Instance Guid="9e208646-ccba-4100-a676-29b1efe6545f">
<AsmOptionInclude-DefaultValue />
@@ -787,7 +787,7 @@
<GeneralOptionPatch-DefaultValue>None</GeneralOptionPatch-DefaultValue>
<GeneralOptionSaveAcc-DefaultValue>False</GeneralOptionSaveAcc-DefaultValue>
<IsLockedByUser>False</IsLockedByUser>
<TimeTagModified--0>-8586796872818991641</TimeTagModified--0>
<TimeTagModified--0>-8586657078646268366</TimeTagModified--0>
<BuildMode-0>DefaultBuild</BuildMode-0>
<Memo-0 />
<OutputMessageFormat-0>%TargetFiles%</OutputMessageFormat-0>

View File

@@ -42,6 +42,9 @@
#define WOLFSSL_VALIDATE_ECC_IMPORT
#define WOLFSSL_VALIDATE_FFC_IMPORT
#define HAVE_FFDHE_Q
#define WOLFSSL_AESNI
#define HAVE_INTEL_RDSEED
#define FORCE_FAILURE_RDSEED
#endif /* FIPS v2 */
#else
/* Enables blinding mode, to prevent timing attacks */

View File

@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
52114C8721B5A7320022ADA1 /* sp_c64.c in Sources */ = {isa = PBXBuildFile; fileRef = 52114C8621B5A7320022ADA1 /* sp_c64.c */; };
A47546261FD90492005176B9 /* tls_bench.c in Sources */ = {isa = PBXBuildFile; fileRef = A47546251FD90492005176B9 /* tls_bench.c */; };
A4ADF82F1FCE0BD300A06E90 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF82E1FCE0BD300A06E90 /* AppDelegate.m */; };
A4ADF8321FCE0BD300A06E90 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8311FCE0BD300A06E90 /* ViewController.m */; };
@@ -49,7 +50,6 @@
A4ADF8F81FCE0C5600A06E90 /* fe_low_mem.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF89C1FCE0C4F00A06E90 /* fe_low_mem.c */; };
A4ADF8FA1FCE0C5600A06E90 /* pkcs12.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF89E1FCE0C4F00A06E90 /* pkcs12.c */; };
A4ADF8FC1FCE0C5600A06E90 /* asm.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8A01FCE0C4F00A06E90 /* asm.c */; };
A4ADF8FD1FCE0C5600A06E90 /* misc.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8A11FCE0C5000A06E90 /* misc.c */; };
A4ADF8FE1FCE0C5600A06E90 /* integer.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8A21FCE0C5000A06E90 /* integer.c */; };
A4ADF9001FCE0C5600A06E90 /* poly1305.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8A41FCE0C5000A06E90 /* poly1305.c */; };
A4ADF9011FCE0C5600A06E90 /* md2.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8A51FCE0C5000A06E90 /* md2.c */; };
@@ -67,12 +67,10 @@
A4ADF9131FCE0C5600A06E90 /* signature.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8B71FCE0C5200A06E90 /* signature.c */; };
A4ADF9141FCE0C5600A06E90 /* wolfmath.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8B81FCE0C5200A06E90 /* wolfmath.c */; };
A4ADF9161FCE0C5600A06E90 /* fe_operations.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8BA1FCE0C5300A06E90 /* fe_operations.c */; };
A4ADF91A1FCE0C5600A06E90 /* sp.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8BE1FCE0C5300A06E90 /* sp.c */; };
A4ADF91B1FCE0C5600A06E90 /* srp.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8BF1FCE0C5300A06E90 /* srp.c */; };
A4ADF91C1FCE0C5600A06E90 /* pwdbased.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8C01FCE0C5300A06E90 /* pwdbased.c */; };
A4ADF91D1FCE0C5600A06E90 /* cpuid.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8C11FCE0C5300A06E90 /* cpuid.c */; };
A4ADF91E1FCE0C5600A06E90 /* asn.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8C21FCE0C5300A06E90 /* asn.c */; };
A4ADF91F1FCE0C5600A06E90 /* async.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8C31FCE0C5400A06E90 /* async.c */; };
A4ADF9231FCE0C5600A06E90 /* camellia.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8C71FCE0C5400A06E90 /* camellia.c */; };
A4ADF9261FCE0C5600A06E90 /* chacha.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8CA1FCE0C5500A06E90 /* chacha.c */; };
A4ADF9271FCE0C5600A06E90 /* ed25519.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8CB1FCE0C5500A06E90 /* ed25519.c */; };
@@ -86,6 +84,7 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
52114C8621B5A7320022ADA1 /* sp_c64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sp_c64.c; path = ../../../wolfcrypt/src/sp_c64.c; sourceTree = "<group>"; };
A47546241FD9042D005176B9 /* user_settings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = user_settings.h; path = ../user_settings.h; sourceTree = "<group>"; };
A47546251FD90492005176B9 /* tls_bench.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tls_bench.c; path = ../../../examples/benchmark/tls_bench.c; sourceTree = "<group>"; };
A4ADF82A1FCE0BD300A06E90 /* wolfBench.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = wolfBench.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -133,7 +132,6 @@
A4ADF89C1FCE0C4F00A06E90 /* fe_low_mem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = fe_low_mem.c; path = ../../../wolfcrypt/src/fe_low_mem.c; sourceTree = "<group>"; };
A4ADF89E1FCE0C4F00A06E90 /* pkcs12.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pkcs12.c; path = ../../../wolfcrypt/src/pkcs12.c; sourceTree = "<group>"; };
A4ADF8A01FCE0C4F00A06E90 /* asm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = asm.c; path = ../../../wolfcrypt/src/asm.c; sourceTree = "<group>"; };
A4ADF8A11FCE0C5000A06E90 /* misc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = misc.c; path = ../../../wolfcrypt/src/misc.c; sourceTree = "<group>"; };
A4ADF8A21FCE0C5000A06E90 /* integer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = integer.c; path = ../../../wolfcrypt/src/integer.c; sourceTree = "<group>"; };
A4ADF8A41FCE0C5000A06E90 /* poly1305.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = poly1305.c; path = ../../../wolfcrypt/src/poly1305.c; sourceTree = "<group>"; };
A4ADF8A51FCE0C5000A06E90 /* md2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md2.c; path = ../../../wolfcrypt/src/md2.c; sourceTree = "<group>"; };
@@ -151,12 +149,10 @@
A4ADF8B71FCE0C5200A06E90 /* signature.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = signature.c; path = ../../../wolfcrypt/src/signature.c; sourceTree = "<group>"; };
A4ADF8B81FCE0C5200A06E90 /* wolfmath.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wolfmath.c; path = ../../../wolfcrypt/src/wolfmath.c; sourceTree = "<group>"; };
A4ADF8BA1FCE0C5300A06E90 /* fe_operations.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = fe_operations.c; path = ../../../wolfcrypt/src/fe_operations.c; sourceTree = "<group>"; };
A4ADF8BE1FCE0C5300A06E90 /* sp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sp.c; path = ../../../wolfcrypt/src/sp.c; sourceTree = "<group>"; };
A4ADF8BF1FCE0C5300A06E90 /* srp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srp.c; path = ../../../wolfcrypt/src/srp.c; sourceTree = "<group>"; };
A4ADF8C01FCE0C5300A06E90 /* pwdbased.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pwdbased.c; path = ../../../wolfcrypt/src/pwdbased.c; sourceTree = "<group>"; };
A4ADF8C11FCE0C5300A06E90 /* cpuid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cpuid.c; path = ../../../wolfcrypt/src/cpuid.c; sourceTree = "<group>"; };
A4ADF8C21FCE0C5300A06E90 /* asn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = asn.c; path = ../../../wolfcrypt/src/asn.c; sourceTree = "<group>"; };
A4ADF8C31FCE0C5400A06E90 /* async.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = async.c; path = ../../../../wolfAsyncCrypt/wolfcrypt/src/async.c; sourceTree = "<group>"; };
A4ADF8C71FCE0C5400A06E90 /* camellia.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = camellia.c; path = ../../../wolfcrypt/src/camellia.c; sourceTree = "<group>"; };
A4ADF8CA1FCE0C5500A06E90 /* chacha.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = chacha.c; path = ../../../wolfcrypt/src/chacha.c; sourceTree = "<group>"; };
A4ADF8CB1FCE0C5500A06E90 /* ed25519.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ed25519.c; path = ../../../wolfcrypt/src/ed25519.c; sourceTree = "<group>"; };
@@ -243,7 +239,6 @@
A4ADF8921FCE0C4E00A06E90 /* arc4.c */,
A4ADF8A01FCE0C4F00A06E90 /* asm.c */,
A4ADF8C21FCE0C5300A06E90 /* asn.c */,
A4ADF8C31FCE0C5400A06E90 /* async.c */,
A4ADF8B11FCE0C5100A06E90 /* blake2b.c */,
A4ADF8C71FCE0C5400A06E90 /* camellia.c */,
A4ADF8CA1FCE0C5500A06E90 /* chacha.c */,
@@ -274,7 +269,6 @@
A4ADF87C1FCE0C4D00A06E90 /* md4.c */,
A4ADF8791FCE0C4D00A06E90 /* md5.c */,
A4ADF8941FCE0C4E00A06E90 /* memory.c */,
A4ADF8A11FCE0C5000A06E90 /* misc.c */,
A4ADF8981FCE0C4F00A06E90 /* pkcs7.c */,
A4ADF89E1FCE0C4F00A06E90 /* pkcs12.c */,
A4ADF8A41FCE0C5000A06E90 /* poly1305.c */,
@@ -288,7 +282,7 @@
A4ADF8831FCE0C4D00A06E90 /* sha256.c */,
A4ADF8AE1FCE0C5100A06E90 /* sha512.c */,
A4ADF8B71FCE0C5200A06E90 /* signature.c */,
A4ADF8BE1FCE0C5300A06E90 /* sp.c */,
52114C8621B5A7320022ADA1 /* sp_c64.c */,
A4ADF8BF1FCE0C5300A06E90 /* srp.c */,
A4ADF8881FCE0C4D00A06E90 /* tfm.c */,
A4ADF8AA1FCE0C5000A06E90 /* wc_encrypt.c */,
@@ -342,7 +336,7 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0910;
ORGANIZATIONNAME = "David Garske";
ORGANIZATIONNAME = "wolfSSL Inc";
TargetAttributes = {
A4ADF8291FCE0BD300A06E90 = {
CreatedOnToolsVersion = 9.1;
@@ -393,7 +387,6 @@
A4ADF9141FCE0C5600A06E90 /* wolfmath.c in Sources */,
A4ADF8FC1FCE0C5600A06E90 /* asm.c in Sources */,
A4ADF8721FCE0C1C00A06E90 /* crl.c in Sources */,
A4ADF91F1FCE0C5600A06E90 /* async.c in Sources */,
A4ADF91B1FCE0C5600A06E90 /* srp.c in Sources */,
A4ADF9101FCE0C5600A06E90 /* rabbit.c in Sources */,
A4ADF9091FCE0C5600A06E90 /* idea.c in Sources */,
@@ -420,13 +413,13 @@
A4DFEC101FD4CB8500A7BB33 /* armv8-sha256.c in Sources */,
A4ADF83D1FCE0BD300A06E90 /* main.m in Sources */,
A4ADF9271FCE0C5600A06E90 /* ed25519.c in Sources */,
5231117421B5AF430054CC79 /* async.c in Sources */,
A4ADF8D11FCE0C5600A06E90 /* hmac.c in Sources */,
A4ADF8F01FCE0C5600A06E90 /* memory.c in Sources */,
A4ADF82F1FCE0BD300A06E90 /* AppDelegate.m in Sources */,
A4ADF8D31FCE0C5600A06E90 /* random.c in Sources */,
A4ADF9131FCE0C5600A06E90 /* signature.c in Sources */,
A4DFEC3C1FD6B9CC00A7BB33 /* test.c in Sources */,
A4ADF8FD1FCE0C5600A06E90 /* misc.c in Sources */,
A4ADF9261FCE0C5600A06E90 /* chacha.c in Sources */,
A4ADF8DD1FCE0C5600A06E90 /* error.c in Sources */,
A4ADF90A1FCE0C5600A06E90 /* sha512.c in Sources */,
@@ -435,6 +428,7 @@
A4ADF92A1FCE0C5600A06E90 /* coding.c in Sources */,
A4ADF8741FCE0C1C00A06E90 /* ssl.c in Sources */,
A4ADF9051FCE0C5600A06E90 /* cmac.c in Sources */,
52114C8721B5A7320022ADA1 /* sp_c64.c in Sources */,
A4ADF8F41FCE0C5600A06E90 /* pkcs7.c in Sources */,
A4ADF90B1FCE0C5600A06E90 /* logging.c in Sources */,
A4ADF8E01FCE0C5600A06E90 /* ecc_fp.c in Sources */,
@@ -458,7 +452,6 @@
A4ADF8D71FCE0C5600A06E90 /* wolfevent.c in Sources */,
A4DFEC0D1FD4CAA300A7BB33 /* benchmark.c in Sources */,
A4ADF91D1FCE0C5600A06E90 /* cpuid.c in Sources */,
A4ADF91A1FCE0C5600A06E90 /* sp.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@@ -54,6 +54,15 @@ device build. Both are debug builds.
You can make an archive for a device, as well. That is a release build.
## Known issues:
When building for older i386 architectures and using tfm.c there are specific
CFLAGS required to expose the necessary registers for inline assembly in tfm.c.
An example script has been provided "build-for-i386.sh" that targets the watchos
by default. If using SDK iphonesimulator10.1 or older you can change the SDK
variable in that script however newer versions of the SDK no longer support
i386 for the iphones.
# Installing libwolfssl.a
Simply drag the file libwolfssl_XXX_.a and the directory `include` and drop it into

16
IDE/XCODE/build-for-i386.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
WORKSPACE=$(eval "pwd")
PROJ=wolfssl.xcodeproj
CONFIG=Release
SCHEME=wolfssl_ios
ARCH=i386
SDK=watchsimulator5.1
CONF_BUILD_DIR=${WORKSPACE}/simulator
xcodebuild clean build -project ${PROJ} -configuration ${CONFIG} \
-scheme ${SCHEME} -arch ${ARCH} -sdk ${SDK} \
BITCODE_GENERATION_MODE=bitcode \
OTHER_CFLAGS="-fembed-bitcode -O3 -fomit-frame-pointer" \
CONFIGURATION_BUILD_DIR=${CONF_BUILD_DIR} \
-quiet

View File

@@ -16,6 +16,9 @@
#undef NO_MAIN_DRIVER
#define NO_MAIN_DRIVER
/* 128-bit type */
#define HAVE___UINT128_T
/* fast math */
#define USE_FAST_MATH
#define HAVE_ECC

View File

@@ -1066,12 +1066,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 52B1347216F3C9E800C07B32 /* Build configuration list for PBXNativeTarget "wolfssl_fips_ios" */;
buildPhases = (
52B1344916F3C9E800C07B32 /* Sources */,
52B1344A16F3C9E800C07B32 /* Frameworks */,
52B1344B16F3C9E800C07B32 /* CopyFiles */,
521646C11A8A7B380062516A /* CopyFiles */,
521646C21A8A7B3B0062516A /* CopyFiles */,
521646C31A8A7B3D0062516A /* CopyFiles */,
52B1344916F3C9E800C07B32 /* Sources */,
);
buildRules = (
);
@@ -1313,7 +1313,7 @@
52B1347316F3C9E800C07B32 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_LINK_OBJC_RUNTIME = NO;
DSTROOT = /tmp/wolfssl_ios.dst;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
@@ -1321,6 +1321,7 @@
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
HAVE_FIPS,
CYASSL_USER_SETTINGS,
WOLFSSL_USER_SETTINGS,
);
HEADER_SEARCH_PATHS = (
@@ -1340,13 +1341,14 @@
52B1347416F3C9E800C07B32 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_LINK_OBJC_RUNTIME = NO;
DSTROOT = /tmp/wolfssl_ios.dst;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREFIX_HEADER = "";
GCC_PREPROCESSOR_DEFINITIONS = (
HAVE_FIPS,
CYASSL_USER_SETTINGS,
WOLFSSL_USER_SETTINGS,
);
HEADER_SEARCH_PATHS = (
@@ -1374,6 +1376,7 @@
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
HAVE_FIPS,
CYASSL_USER_SETTINGS,
WOLFSSL_USER_SETTINGS,
);
HEADER_SEARCH_PATHS = (
@@ -1401,6 +1404,7 @@
GCC_PREFIX_HEADER = "";
GCC_PREPROCESSOR_DEFINITIONS = (
HAVE_FIPS,
CYASSL_USER_SETTINGS,
WOLFSSL_USER_SETTINGS,
);
HEADER_SEARCH_PATHS = (

View File

@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Benchmark/wolfBench.xcodeproj">
</FileRef>
<FileRef
location = "group:wolfssl-FIPS.xcodeproj">
</FileRef>
<FileRef
location = "group:wolfssl_testsuite.xcodeproj">
</FileRef>
<FileRef
location = "group:/Users/davidgarske/GitHub/wolfssl/IDE/XCODE/wolfcrypt_testbench.xcodeproj">
</FileRef>
<FileRef
location = "group:wolfssl.xcodeproj">
</FileRef>

View File

@@ -20,4 +20,4 @@ include IDE/mynewt/include.am
include IDE/Renesas/cs+/Projects/include.am
include IDE/Renesas/e2studio/Projects/include.am
EXTRA_DIST+= IDE/IAR-EWARM IDE/MDK-ARM IDE/MDK5-ARM IDE/MYSQL IDE/LPCXPRESSO IDE/HEXIWEAR
EXTRA_DIST+= IDE/IAR-EWARM IDE/MDK-ARM IDE/MDK5-ARM IDE/MYSQL IDE/LPCXPRESSO IDE/HEXIWEAR IDE/Espressif

16
INSTALL
View File

@@ -54,7 +54,21 @@
Please see the README in IDE/VS-ARM.
Use the Visual Studio solution IDE/VS-ARM/wolfssl.sln.
11. Porting to a new platform
11. Building for Yocto Project or OpenEmbedded
Please see the README in the "meta-wolfssl" repository. This repository
holds wolfSSL's Yocto and OpenEmbedded layer, which contains recipes
for wolfSSL, wolfSSH, wolfMQTT, wolfTPM, wolfCrypt examples, and OSS
project bbappend files.
https://github.com/wolfssl/meta-wolfssl
The wolfSSL recipe can also be found in the OpenEmbedded
"meta-openembedded/meta-networking/recipes-connectivity" layer:
https://github.com/openembedded/meta-openembedded
12. 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

View File

@@ -39,10 +39,30 @@ CLEANFILES+= cert.der \
othercert.der \
othercert.pem \
pkcs7cert.der \
pkcs7authEnvelopedDataAES128GCM.der \
pkcs7authEnvelopedDataAES128GCM_ECDH_SHA1KDF.der \
pkcs7authEnvelopedDataAES128GCM_KEKRI.der \
pkcs7authEnvelopedDataAES128GCM_ORI.der \
pkcs7authEnvelopedDataAES128GCM_PWRI.der \
pkcs7authEnvelopedDataAES192GCM.der \
pkcs7authEnvelopedDataAES256GCM.der \
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF.der \
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_authAttribs.der \
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_bothAttribs.der \
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_fw_bothAttribs.der \
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA256KDF_unauthAttribs.der \
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA512KDF.der \
pkcs7authEnvelopedDataAES256GCM_ECDH_SHA512KDF_ukm.der \
pkcs7authEnvelopedDataAES256GCM_firmwarePkgData.der \
pkcs7authEnvelopedDataAES256GCM_IANDS.der \
pkcs7authEnvelopedDataAES256GCM_SKID.der \
pkcs7compressedData_data_zlib.der \
pkcs7compressedData_firmwarePkgData_zlib.der \
pkcs7encryptedDataAES128CBC.der \
pkcs7encryptedDataAES192CBC.der \
pkcs7encryptedDataAES256CBC_attribs.der \
pkcs7encryptedDataAES256CBC.der \
pkcs7encryptedDataAES256CBC_firmwarePkgData.der \
pkcs7encryptedDataAES256CBC_multi_attribs.der \
pkcs7encryptedDataDES3.der \
pkcs7encryptedDataDES.der \
@@ -53,20 +73,52 @@ CLEANFILES+= cert.der \
pkcs7envelopedDataAES256CBC_ECDH_SHA512KDF_ukm.der \
pkcs7envelopedDataDES3.der \
pkcs7envelopedDataAES128CBC.der \
pkcs7envelopedDataAES128CBC_KEKRI.der \
pkcs7envelopedDataAES128CBC_PWRI.der \
pkcs7envelopedDataAES128CBC_ORI.der \
pkcs7envelopedDataAES192CBC.der \
pkcs7envelopedDataAES256CBC.der \
pkcs7envelopedDataAES256CBC_IANDS.der \
pkcs7envelopedDataAES256CBC_SKID.der \
pkcs7signedData_RSA_SHA.der \
pkcs7signedData_RSA_SHA_noattr.der \
pkcs7signedData_RSA_SHA224.der \
pkcs7signedData_RSA_SHA256.der \
pkcs7signedData_RSA_SHA256_firmwarePkgData.der \
pkcs7signedData_RSA_SHA256_custom_contentType.der \
pkcs7signedData_RSA_SHA256_with_ca_cert.der \
pkcs7signedData_RSA_SHA256_SKID.der \
pkcs7signedData_RSA_SHA256_detachedSig.der \
pkcs7signedData_RSA_SHA384.der \
pkcs7signedData_RSA_SHA512.der \
pkcs7signedData_ECDSA_SHA.der \
pkcs7signedData_ECDSA_SHA_noattr.der \
pkcs7signedData_ECDSA_SHA224.der \
pkcs7signedData_ECDSA_SHA256.der \
pkcs7signedData_ECDSA_SHA256_firmwarePkgData.der \
pkcs7signedData_ECDSA_SHA256_custom_contentType.der \
pkcs7signedData_ECDSA_SHA256_SKID.der \
pkcs7signedData_ECDSA_SHA384.der \
pkcs7signedData_ECDSA_SHA512.der
pkcs7signedData_ECDSA_SHA512.der \
pkcs7signedFirmwarePkgData_ECDSA_SHA256.der \
pkcs7signedFirmwarePkgData_ECDSA_SHA256_SKID.der \
pkcs7signedFirmwarePkgData_ECDSA_SHA256_noattr.der \
pkcs7signedFirmwarePkgData_RSA_SHA256.der \
pkcs7signedFirmwarePkgData_RSA_SHA256_SKID.der \
pkcs7signedFirmwarePkgData_RSA_SHA256_noattr.der \
pkcs7signedFirmwarePkgData_RSA_SHA256_with_ca_cert.der \
pkcs7signedCompressedFirmwarePkgData_ECDSA_SHA256.der \
pkcs7signedCompressedFirmwarePkgData_ECDSA_SHA256_noattr.der \
pkcs7signedCompressedFirmwarePkgData_RSA_SHA256.der \
pkcs7signedCompressedFirmwarePkgData_RSA_SHA256_noattr.der \
pkcs7signedEncryptedFirmwarePkgData_RSA_SHA256.der \
pkcs7signedEncryptedFirmwarePkgData_RSA_SHA256_noattr.der \
pkcs7signedEncryptedFirmwarePkgData_ECDSA_SHA256.der \
pkcs7signedEncryptedFirmwarePkgData_ECDSA_SHA256_noattr.der \
pkcs7signedEncryptedCompressedFirmwarePkgData_ECDSA_SHA256.der \
pkcs7signedEncryptedCompressedFirmwarePkgData_ECDSA_SHA256_noattr.der \
pkcs7signedEncryptedCompressedFirmwarePkgData_RSA_SHA256.der \
pkcs7signedEncryptedCompressedFirmwarePkgData_RSA_SHA256_noattr.der
exampledir = $(docdir)/example
dist_example_DATA=
@@ -91,6 +143,7 @@ EXTRA_DIST+= INSTALL
EXTRA_DIST+= IPP
EXTRA_DIST+= .cproject
EXTRA_DIST+= .project
EXTRA_DIST+= resource.h wolfssl.rc
include wrapper/include.am
include cyassl/include.am

101
README
View File

@@ -73,46 +73,81 @@ should be used for the enum name.
*** end Notes ***
********* wolfSSL Release 3.15.3 (6/20/2018)
********* wolfSSL Release 3.15.5 (11/07/2018)
Release 3.15.3 of wolfSSL embedded TLS has bug fixes and new features including:
- ECDSA blinding added for hardening against side channel attacks
- Fix for compatibility layer build with no server and no client defined
- Use of optimized Intel assembly instructions on compatible AMD processor
- wolfCrypt Nucleus port additions
- Fix added for MatchDomainName and additional tests added
- Fixes for building with WOLFSSL_ATECC508A defined
- Fix for verifying a PKCS7 file in BER format with indefinite size
This release of wolfSSL fixes 2 security vulnerability fixes.
Medium level fix for PRIME + PROBE attack combined with a variant of Lucky 13.
Constant time hardening was done to avoid potential cache-based side channel
attacks when verifying the MAC on a TLS packet. CBC cipher suites are
susceptible on systems where an attacker could gain access and run a parallel
program for inspecting caching. Only wolfSSL users that are using TLS/DTLS CBC
cipher suites need to update. Users that have only AEAD and stream cipher suites
set, or have built with WOLFSSL_MAX_STRENGTH (--enable-maxstrength), are not
vulnerable. Thanks to Eyal Ronen, Kenny Paterson, and Adi Shamir for the report.
Medium level fix for a ECDSA side channel attack. wolfSSL is one of over a dozen
vendors mentioned in the recent Technical Advisory “ROHNP” by author Ryan
Keegan. Only wolfSSL users with long term ECDSA private keys using our fastmath
or normal math libraries on systems where attackers can get access to the
machine using the ECDSA key need to update. An attacker gaining access to the
system could mount a memory cache side channel attack that could recover the key
within a few thousand signatures. wolfSSL users that are not using ECDSA private
keys, that are using the single precision math library, or that are using ECDSA
offloading do not need to update. (blog with more information
https://www.wolfssl.com/wolfssh-and-rohnp/)
Release 3.15.5 of wolfSSL embedded TLS has bug fixes and new features including:
- Fixes for GCC-8 warnings with strings
- Additional compatibility APIs added, including functions like wolfSSL_X509_CA_num and wolfSSL_PEM_read_X509_CRL
- Fixes for OCSP use with NGINX port
- Renamed the macro INLINE to WC_INLINE for inline functions
- Doxygen updates and formatting for documentation generation
- Added support for the STM32L4 with AES/SHA hardware acceleration
- Adds checking for critical extension with certificate Auth ID and the macro WOLFSSL_ALLOW_CRIT_SKID to override the check
- Added public key callbacks to ConfirmSignature function to expand public key callback support
- Added ECC and Curve25519 key generation callback support
- Fix for memory management with wolfSSL_BN_hex2bn function
- Added support for dynamic allocation of PKCS7 structure using wc_PKCS7_New and wc_PKCS7_Free
- Port to apache mynewt added in the directory wolfssl-3.15.5/IDE/mynewt/*
- OCSP stapling in TLS 1.3 additions
- Port for ASIO added with --enable-asio configure flag
- Contiki port added with macro WOLFSSL_CONTIKI
- Memory free optimizations with adding in earlier frees where possible
- Made modifications to the primality testing so that the Miller-Rabin tests check against up to 40 random numbers rather than a fixed list of small primes
- Certificate validation time generation updated
- Fixes for MQX classic 4.0 with IAR-EWARM
- Fix for assembly optimized version of Curve25519
- Make SOCKET_PEER_CLOSED_E consistent between read and write cases
- Relocate compatibility layer functions for OpenSSH port update
- Update to Intel® SGX port, files included by Windows version and macros defined when using WOLFSSL_SGX
- Updates to Nucleus version supported
- Stack size reduction with smallstack build
- Updates to Rowley-Crossworks settings for CMSIS 4
- Added reference STSAFE-A100 public key callbacks for TLS support
- Added reference ATECC508A/ATECC608A public key callbacks for TLS support
- Updated support for latest CryptoAuthLib (10/25/2018)
- Added a wolfSSL static library project for Atollic TrueSTUDIO
- Flag to disable AES-CBC and have only AEAD cipher suites with TLS
- AF_ALG and cryptodev-linux crypto support added
- Update to IO callbacks with use of WOLFSSL_BIO
- Additional support for parsing certificate subject OIDs (businessCategory, jurisdiction of incorporation country, and jurisdiction of incorporation state)
- Added wc_ecc_ecport_ex and wc_export_inti API's for ECC hex string exporting
- Updates to XCODE build with wolfSSL
- Fix for guard on when to include sys/time.h header
- Updates and enhancements to the GCC-ARM example
- Fix for PKCS8 padding with encryption
- Updates for wolfcrypt JNI wrapper
- ALT_ECC_SIZE use with SP math
- PIC32MZ hardware acceleration buffer alignment fixes
- Renesas e2studio project files added
- Renesas RX example project added
- Fix for DH algorithm when using SP math with ARM assembly
- Fixes and enhancements for NXP K82 support
- Benchmark enhancements to print in CSV format and in Japanese
- Support for PKCS#11 added with --enable-pkcs11
- Fixes for asynchronous crypto use with TLS 1.3
- TLS 1.3 only build, allows for disabling TLS 1.2 and earlier protocols
- Fix for GCC warnings in function wolfSSL_ASN1_TIME_adj
- Added --enable-asn=nocrypt for certificate only parsing support
- Added support for parsing PIV format certificates with the function wc_ParseCertPIV and macro WOLFSSL_CERT_PIV
- Added APIs to support GZIP
- Updates to support Lighttpd
- Version resource added for Windows DLL builds
- Increased code coverage with additional testing
- Added support for constructed OCTET_STRING with PKCS#7 signed data
- Added DTLS either (server/client) side initialization setting
- Minor fixes for building with MINGW32 compiler
- Added support for generic ECC PEM header/footer with PKCS8 parsing
- Added Japanese output to example server and client with “-1 1” flag
- Added USE_ECDSA_KEYSZ_HASH_ALGO macro for building to use digest sizes that match ephemeral key size
- Expand PKCS#7 CMS support with KEKRI, PWRI and ORI
- Streaming capability for PKCS#7 decoding and sign verify added
See INSTALL file for build instructions.
More info can be found on-line at http://wolfssl.com/wolfSSL/Docs.html
*** Resources ***

View File

@@ -58,24 +58,75 @@ hash function. Instead the name WC_SHA, WC_SHA256, WC_SHA384 and WC_SHA512
should be used for the enum name.
```
# wolfSSL Release 3.15.3 (6/20/2018)
# wolfSSL Release 3.15.5 (11/07/2018)
Release 3.15.3 of wolfSSL embedded TLS has bug fixes and new features including:
Release 3.15.5 of wolfSSL embedded TLS has bug fixes and new features including:
* ECDSA blinding added for hardening against side channel attacks
* Fix for compatibility layer build with no server and no client defined
* Use of optimized Intel assembly instructions on compatible AMD processor
* wolfCrypt Nucleus port additions
* Fix added for MatchDomainName and additional tests added
* Fixes for building with WOLFSSL_ATECC508A defined
* Fix for verifying a PKCS7 file in BER format with indefinite size
This release of wolfSSL fixes 2 security vulnerability fixes.
Medium level fix for PRIME + PROBE attack combined with a variant of Lucky 13. Constant time hardening was done to avoid potential cache-based side channel attacks when verifying the MAC on a TLS packet. CBC cipher suites are susceptible on systems where an attacker could gain access and run a parallel program for inspecting caching. Only wolfSSL users that are using TLS/DTLS CBC cipher suites need to update. Users that have only AEAD and stream cipher suites set, or have built with WOLFSSL_MAX_STRENGTH (--enable-maxstrength), are not vulnerable. Thanks to Eyal Ronen, Kenny Paterson, and Adi Shamir for the report.
Medium level fix for a ECDSA side channel attack. wolfSSL is one of over a dozen vendors mentioned in the recent Technical Advisory “ROHNP” by author Ryan Keegan. Only wolfSSL users with long term ECDSA private keys using our fastmath or normal math libraries on systems where attackers can get access to the machine using the ECDSA key need to update. An attacker gaining access to the system could mount a memory cache side channel attack that could recover the key within a few thousand signatures. wolfSSL users that are not using ECDSA private keys, that are using the single precision math library, or that are using ECDSA offloading do not need to update. (blog with more information https://www.wolfssl.com/wolfssh-and-rohnp/)
* Fixes for GCC-8 warnings with strings
* Additional compatibility APIs added, including functions like wolfSSL_X509_CA_num and wolfSSL_PEM_read_X509_CRL
* Fixes for OCSP use with NGINX port
* Renamed the macro INLINE to WC_INLINE for inline functions
* Doxygen updates and formatting for documentation generation
* Added support for the STM32L4 with AES/SHA hardware acceleration
* Adds checking for critical extension with certificate Auth ID and the macro WOLFSSL_ALLOW_CRIT_SKID to override the check
* Added public key callbacks to ConfirmSignature function to expand public key callback support
* Added ECC and Curve25519 key generation callback support
* Fix for memory management with wolfSSL_BN_hex2bn function
* Added support for dynamic allocation of PKCS7 structure using wc_PKCS7_New and wc_PKCS7_Free
* Port to apache mynewt added in the directory wolfssl-3.15.5/IDE/mynewt/*
* OCSP stapling in TLS 1.3 additions
* Port for ASIO added with --enable-asio configure flag
* Contiki port added with macro WOLFSSL_CONTIKI
* Memory free optimizations with adding in earlier frees where possible
* Made modifications to the primality testing so that the Miller-Rabin tests check against up to 40 random numbers rather than a fixed list of small primes
* Certificate validation time generation updated
* Fixes for MQX classic 4.0 with IAR-EWARM
* Fix for assembly optimized version of Curve25519
* Make SOCKET_PEER_CLOSED_E consistent between read and write cases
* Relocate compatibility layer functions for OpenSSH port update
* Update to Intel® SGX port, files included by Windows version and macros defined when using WOLFSSL_SGX
* Updates to Nucleus version supported
* Stack size reduction with smallstack build
* Updates to Rowley-Crossworks settings for CMSIS 4
* Added reference STSAFE-A100 public key callbacks for TLS support
* Added reference ATECC508A/ATECC608A public key callbacks for TLS support
* Updated support for latest CryptoAuthLib (10/25/2018)
* Added a wolfSSL static library project for Atollic TrueSTUDIO
* Flag to disable AES-CBC and have only AEAD cipher suites with TLS
* AF_ALG and cryptodev-linux crypto support added
* Update to IO callbacks with use of WOLFSSL_BIO
* Additional support for parsing certificate subject OIDs (businessCategory, jurisdiction of incorporation country, and jurisdiction of incorporation state)
* Added wc_ecc_ecport_ex and wc_export_inti API's for ECC hex string exporting
* Updates to XCODE build with wolfSSL
* Fix for guard on when to include sys/time.h header
* Updates and enhancements to the GCC-ARM example
* Fix for PKCS8 padding with encryption
* Updates for wolfcrypt JNI wrapper
* ALT_ECC_SIZE use with SP math
* PIC32MZ hardware acceleration buffer alignment fixes
* Renesas e2studio project files added
* Renesas RX example project added
* Fix for DH algorithm when using SP math with ARM assembly
* Fixes and enhancements for NXP K82 support
* Benchmark enhancements to print in CSV format and in Japanese
* Support for PKCS#11 added with --enable-pkcs11
* Fixes for asynchronous crypto use with TLS 1.3
* TLS 1.3 only build, allows for disabling TLS 1.2 and earlier protocols
* Fix for GCC warnings in function wolfSSL_ASN1_TIME_adj
* Added --enable-asn=nocrypt for certificate only parsing support
* Added support for parsing PIV format certificates with the function wc_ParseCertPIV and macro WOLFSSL_CERT_PIV
* Added APIs to support GZIP
* Updates to support Lighttpd
* Version resource added for Windows DLL builds
* Increased code coverage with additional testing
* Added support for constructed OCTET_STRING with PKCS#7 signed data
* Added DTLS either (server/client) side initialization setting
* Minor fixes for building with MINGW32 compiler
* Added support for generic ECC PEM header/footer with PKCS8 parsing
* Added Japanese output to example server and client with “-1 1” flag
* Added USE_ECDSA_KEYSZ_HASH_ALGO macro for building to use digest sizes that match ephemeral key size
* Expand PKCS#7 CMS support with KEKRI, PWRI and ORI
* Streaming capability for PKCS#7 decoding and sign verify added
See INSTALL file for build instructions.

View File

@@ -31,7 +31,7 @@ then
echo "\n\nUsing existing async repo\n\n"
else
# make a clone of the wolfAsyncCrypt repository
git clone $ASYNC_REPO async
git clone --depth 1 $ASYNC_REPO async
[ $? -ne 0 ] && echo "\n\nCouldn't checkout the wolfAsyncCrypt repository\n\n" && exit 1
fi

Binary file not shown.

View File

@@ -0,0 +1,18 @@
-----BEGIN CERTIFICATE-----
MIIC7jCCAnOgAwIBAgICEAEwCgYIKoZIzj0EAwMwgZcxCzAJBgNVBAYTAlVTMRMw
EQYDVQQIDApXYXNoaW5ndG9uMRAwDgYDVQQHDAdTZWF0dGxlMRAwDgYDVQQKDAd3
b2xmU1NMMRQwEgYDVQQLDAtEZXZlbG9wbWVudDEYMBYGA1UEAwwPd3d3LndvbGZz
c2wuY29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tMB4XDTE4MTAx
OTEzNDEwMloXDTQ4MTAxMTEzNDEwMlowgZYxCzAJBgNVBAYTAlVTMRMwEQYDVQQI
DApXYXNoaW5ndG9uMRAwDgYDVQQHDAdTZWF0dGxlMRAwDgYDVQQKDAdFbGlwdGlj
MRMwEQYDVQQLDApFQ0MzODRDbGl0MRgwFgYDVQQDDA93d3cud29sZnNzbC5jb20x
HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20wdjAQBgcqhkjOPQIBBgUr
gQQAIgNiAARmxAg9ZqehFdRTCiOzrQvOj8j0mB2m2LJuIhH6ue+ZwPopPkgA+f7C
pkobpxKoa5BMHLusXW4OYs5wIPdDd9iXx3TTaP6J7HfLGS+JSh13+ZdLZgJopWKv
lYHL4yQ264WjgZAwgY0wCQYDVR0TBAIwADARBglghkgBhvhCAQEEBAMCBaAwHQYD
VR0OBBYEFB7y0Bv4/KXLP9yK9ZcqQlOwQvnUMB8GA1UdIwQYMBaAFKvgwyZMGNRy
u9KEjJwKBZKAElNSMA4GA1UdDwEB/wQEAwIF4DAdBgNVHSUEFjAUBggrBgEFBQcD
AgYIKwYBBQUHAwQwCgYIKoZIzj0EAwMDaQAwZgIxAPQNeML87vVHHBRaob0yBP0Q
K4wxvwQEuyes/XSEHupNYfSvcK24YuLVm2mrx+3NyAIxAIn8dyiX85tuunv89xNC
XIkXUHZlvK60fMYi9PBucuYhdy7UO22IRrRncuURVs3oJQ==
-----END CERTIFICATE-----

BIN
certs/client-ecc384-key.der Normal file

Binary file not shown.

View File

@@ -0,0 +1,6 @@
-----BEGIN PRIVATE KEY-----
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDB1nVO7/TbLqFdjldpO
TH23WVi/DIOkNaLUNEpfkh3gbrWk1AQ2OgnmrBSgMI8FN5ahZANiAARmxAg9Zqeh
FdRTCiOzrQvOj8j0mB2m2LJuIhH6ue+ZwPopPkgA+f7CpkobpxKoa5BMHLusXW4O
Ys5wIPdDd9iXx3TTaP6J7HfLGS+JSh13+ZdLZgJopWKvlYHL4yQ264U=
-----END PRIVATE KEY-----

View File

@@ -1,25 +1,39 @@
#!/bin/bash
# gencrls, crl config already done, see taoCerts.txt for setup
check_result(){
if [ $1 -ne 0 ]; then
echo "Step failed, Abort"
exit 1
else
echo "Step Succeeded!"
fi
}
function setup_files() {
setup_files() {
#set up the file system for updating the crls
echo "setting up the file system for generating the crls..."
echo ""
touch ./index.txt
touch ./crlnumber
echo "01" >> crlnumber
touch ./blank.index.txt
mkdir demoCA
touch ./demoCA/index.txt
mkdir demoCA || exit 1
touch ./demoCA/index.txt || exit 1
touch ./index.txt || exit 1
touch ../crl/index.txt || exit 1
touch ./crlnumber || exit 1
touch ../crl/crlnumber || exit 1
echo "01" >> crlnumber || exit 1
echo "01" >> ../crl/crlnumber || exit 1
touch ./blank.index.txt || exit 1
touch ./demoCA/index.txt.attr || exit 1
touch ../crl/index.txt.attr || exit 1
}
function cleanup_files() {
rm blank.index.txt
rm index.*
rm crlnumber*
rm -r demoCA
cleanup_files() {
rm blank.index.txt || exit 1
rm index.* || exit 1
rm crlnumber* || exit 1
rm -rf demoCA || exit 1
echo "Removed ../wolfssl.cnf, blank.index.txt, index.*, crlnumber*, demoCA/"
echo " ../crl/index.txt"
echo ""
exit 0
}
@@ -30,31 +44,49 @@ setup_files
# caCrl
# revoke server-revoked-cert.pem
echo "Step 1"
openssl ca -config ../renewcerts/wolfssl.cnf -gencrl -crldays 1000 -out crl2.pem -keyfile ../client-key.pem -cert ../client-cert.pem
check_result $?
echo "Step 2"
openssl ca -config ../renewcerts/wolfssl.cnf -revoke ../server-revoked-cert.pem -keyfile ../ca-key.pem -cert ../ca-cert.pem
check_result $?
echo "Step 3"
openssl ca -config ../renewcerts/wolfssl.cnf -gencrl -crldays 1000 -out crl.pem -keyfile ../ca-key.pem -cert ../ca-cert.pem
check_result $?
# metadata
echo "Step 4"
openssl crl -in crl.pem -text > tmp
check_result $?
mv tmp crl.pem
# install (only needed if working outside wolfssl)
#cp crl.pem ~/wolfssl/certs/crl/crl.pem
# crl2 create
echo "Step 5"
openssl crl -in crl.pem -text > tmp
check_result $?
echo "Step 6"
openssl crl -in crl2.pem -text >> tmp
check_result $?
mv tmp crl2.pem
# caCrl server revoked
echo "Step 7"
openssl ca -config ../renewcerts/wolfssl.cnf -revoke ../server-cert.pem -keyfile ../ca-key.pem -cert ../ca-cert.pem
check_result $?
# caCrl server revoked generation
echo "Step 8"
openssl ca -config ../renewcerts/wolfssl.cnf -gencrl -crldays 1000 -out crl.revoked -keyfile ../ca-key.pem -cert ../ca-cert.pem
check_result $?
# metadata
echo "Step 9"
openssl crl -in crl.revoked -text > tmp
check_result $?
mv tmp crl.revoked
# install (only needed if working outside wolfssl)
#cp crl.revoked ~/wolfssl/certs/crl/crl.revoked
@@ -64,58 +96,85 @@ mv tmp crl.revoked
cp blank.index.txt demoCA/index.txt
# caEccCrl
echo "Step 10"
openssl ca -config ../renewcerts/wolfssl.cnf -revoke ../server-revoked-cert.pem -keyfile ../ca-ecc-key.pem -cert ../ca-ecc-cert.pem
check_result $?
echo "Step 11"
openssl ca -config ../renewcerts/wolfssl.cnf -gencrl -crldays 1000 -out caEccCrl.pem -keyfile ../ca-ecc-key.pem -cert ../ca-ecc-cert.pem
check_result $?
# metadata
echo "Step 12"
openssl crl -in caEccCrl.pem -text > tmp
check_result $?
mv tmp caEccCrl.pem
# install (only needed if working outside wolfssl)
#cp caEccCrl.pem ~/wolfssl/certs/crl/caEccCrl.pem
# caEcc384Crl
openssl ca -config ../renewcerts/wolfssl.cnf -revoke ../server-revoked-cert.pem -keyfile ../ca-ecc384-key.pem -cert ../ca-ecc384-cert.pem
# server-revoked-cert.pem is already revoked in Step 10
#openssl ca -config ../renewcerts/wolfssl.cnf -revoke ../server-revoked-cert.pem -keyfile ../ca-ecc384-key.pem -cert ../ca-ecc384-cert.pem
echo "Step 13"
openssl ca -config ../renewcerts/wolfssl.cnf -gencrl -crldays 1000 -out caEcc384Crl.pem -keyfile ../ca-ecc384-key.pem -cert ../ca-ecc384-cert.pem
check_result $?
# metadata
echo "Step 14"
openssl crl -in caEcc384Crl.pem -text > tmp
check_result $?
mv tmp caEcc384Crl.pem
# install (only needed if working outside wolfssl)
#cp caEcc384Crl.pem ~/wolfssl/certs/crl/caEcc384Crl.pem
# cliCrl
echo "Step 15"
openssl ca -config ../renewcerts/wolfssl.cnf -gencrl -crldays 1000 -out cliCrl.pem -keyfile ../client-key.pem -cert ../client-cert.pem
check_result $?
# metadata
echo "Step 16"
openssl crl -in cliCrl.pem -text > tmp
check_result $?
mv tmp cliCrl.pem
# install (only needed if working outside wolfssl)
#cp cliCrl.pem ~/wolfssl/certs/crl/cliCrl.pem
# eccCliCRL
echo "Step 17"
openssl ca -config ../renewcerts/wolfssl.cnf -gencrl -crldays 1000 -out eccCliCRL.pem -keyfile ../ecc-client-key.pem -cert ../client-ecc-cert.pem
check_result $?
# metadata
echo "Step 18"
openssl crl -in eccCliCRL.pem -text > tmp
check_result $?
mv tmp eccCliCRL.pem
# install (only needed if working outside wolfssl)
#cp eccCliCRL.pem ~/wolfssl/certs/crl/eccCliCRL.pem
# eccSrvCRL
echo "Step 19"
openssl ca -config ../renewcerts/wolfssl.cnf -gencrl -crldays 1000 -out eccSrvCRL.pem -keyfile ../ecc-key.pem -cert ../server-ecc.pem
check_result $?
# metadata
echo "Step 20"
openssl crl -in eccSrvCRL.pem -text > tmp
check_result $?
mv tmp eccSrvCRL.pem
# install (only needed if working outside wolfssl)
#cp eccSrvCRL.pem ~/wolfssl/certs/crl/eccSrvCRL.pem
# caEccCrl
openssl ca -config ../ecc/wolfssl.cnf -gencrl -crldays 1000 -out caEccCrl.pem -keyfile ../ca-ecc-key.pem -cert ../ca-ecc-cert.pem
echo "Step 21"
openssl ca -config ./wolfssl.cnf -gencrl -crldays 1000 -out caEccCrl.pem -keyfile ../ca-ecc-key.pem -cert ../ca-ecc-cert.pem
check_result $?
# ca-ecc384-cert
openssl ca -config ../ecc/wolfssl.cnf -gencrl -crldays 1000 -out caEcc384Crl.pem -keyfile ../ca-ecc384-key.pem -cert ../ca-ecc384-cert.pem
echo "Step 22"
openssl ca -config ./wolfssl.cnf -gencrl -crldays 1000 -out caEcc384Crl.pem -keyfile ../ca-ecc384-key.pem -cert ../ca-ecc384-cert.pem
check_result $?
exit 0

View File

@@ -9,7 +9,8 @@ EXTRA_DIST += \
certs/crl/eccCliCRL.pem \
certs/crl/crl2.pem \
certs/crl/caEccCrl.pem \
certs/crl/caEcc384Crl.pem
certs/crl/caEcc384Crl.pem \
certs/crl/wolfssl.cnf
EXTRA_DIST += \
certs/crl/crl.revoked

View File

@@ -1,38 +1,38 @@
Certificate Revocation List (CRL):
Version 2 (0x1)
Signature Algorithm: sha1WithRSAEncryption
Signature Algorithm: sha256WithRSAEncryption
Issuer: /C=US/ST=Montana/L=Bozeman/OU=Engineering/CN=www.nomatch.com/emailAddress=info@wolfssl.com
Last Update: Jun 13 16:02:51 2018 GMT
Next Update: Mar 9 16:02:51 2021 GMT
Last Update: Sep 19 21:21:24 2018 GMT
Next Update: Jun 15 21:21:24 2021 GMT
CRL extensions:
X509v3 CRL Number:
1
No Revoked Certificates.
Signature Algorithm: sha1WithRSAEncryption
60:64:8d:80:20:c1:5e:48:cc:61:ba:31:b1:59:13:21:8c:d0:
ff:a3:ed:70:b0:ba:04:67:df:bb:f0:aa:db:71:85:2d:c3:ae:
ab:79:a0:83:68:df:70:f5:85:1a:8e:7c:6d:91:89:a3:af:ae:
4f:72:05:37:d9:aa:76:a5:86:10:0a:89:7a:d9:06:6a:6b:43:
51:8c:b3:ce:28:79:0c:70:d0:9a:f7:89:a5:ff:5f:4a:08:2f:
ca:3c:83:3e:d2:74:c1:02:37:f9:5d:e8:10:d2:7a:d1:df:b7:
13:40:34:2c:c5:61:71:d7:24:79:46:26:f7:b7:6f:b5:05:8a:
96:d6:a8:89:73:e6:ac:5b:96:df:be:08:6d:2b:2e:da:00:c8:
dc:11:54:c2:b9:f5:80:21:79:98:12:5d:91:bb:54:61:d8:d0:
c1:42:3d:9c:24:d5:11:0e:33:ea:3e:84:66:6e:65:2c:59:c5:
c9:b8:7b:e8:b3:ce:fc:66:d8:cc:68:98:55:9a:ff:54:fe:b0:
74:1f:d7:cc:af:f8:76:b9:ed:cf:46:07:2e:74:0e:50:b9:e9:
46:28:22:82:d7:2b:3c:81:81:e8:12:f1:5c:6e:88:ac:c7:c5:
3c:1d:46:95:ff:9e:fe:7f:38:6c:a6:4d:ac:75:86:d4:4c:8a:
75:e9:a2:88
Signature Algorithm: sha256WithRSAEncryption
01:b3:58:8d:bf:27:46:70:f1:cc:29:71:24:0b:ba:e3:fc:d4:
c8:30:09:3a:5e:e5:61:c7:d2:02:61:63:ba:e1:06:25:eb:4e:
04:77:dc:31:4d:59:84:63:ee:09:5d:41:dd:07:8f:07:15:71:
79:cb:6c:67:a9:e5:53:01:7d:98:b0:d0:a2:36:7a:8c:bf:51:
84:78:0e:b3:d8:ef:7c:b7:9e:de:c0:09:46:3d:43:e0:9d:a1:
d7:77:d2:a6:28:f7:9e:92:82:ba:a9:cc:a8:d0:2b:f8:09:9b:
fd:e4:2d:e6:d4:d5:60:2e:31:48:e8:55:3f:54:e9:f4:c4:78:
4d:0a:43:9d:3a:2e:44:9a:e7:63:25:73:e7:c4:fb:71:2b:0d:
3e:ad:e6:95:7d:60:95:4f:f6:cf:a7:52:59:e0:4b:f2:51:46:
0a:0c:9c:2e:2d:55:ae:57:76:a7:4b:8e:48:53:87:f7:e3:3c:
44:9b:70:17:96:c4:dc:f0:d1:43:a8:5e:59:5c:2d:4d:88:e6:
07:20:e4:75:09:dd:c4:9a:46:5c:c5:1f:20:f8:8a:dc:07:3d:
f2:31:11:cd:43:d8:72:c7:8b:83:78:c1:e3:a5:bc:8e:87:2b:
be:fd:66:0f:ab:4b:82:df:9e:71:e8:de:69:4c:c0:93:e6:9f:
9c:78:b0:05
-----BEGIN X509 CRL-----
MIIB3DCBxQIBATANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UEBhMCVVMxEDAOBgNV
MIIB3DCBxQIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCVVMxEDAOBgNV
BAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xFDASBgNVBAsMC0VuZ2luZWVy
aW5nMRgwFgYDVQQDDA93d3cubm9tYXRjaC5jb20xHzAdBgkqhkiG9w0BCQEWEGlu
Zm9Ad29sZnNzbC5jb20XDTE4MDYxMzE2MDI1MVoXDTIxMDMwOTE2MDI1MVqgDjAM
MAoGA1UdFAQDAgEBMA0GCSqGSIb3DQEBBQUAA4IBAQBgZI2AIMFeSMxhujGxWRMh
jND/o+1wsLoEZ9+78KrbcYUtw66reaCDaN9w9YUajnxtkYmjr65PcgU32ap2pYYQ
Col62QZqa0NRjLPOKHkMcNCa94ml/19KCC/KPIM+0nTBAjf5XegQ0nrR37cTQDQs
xWFx1yR5Rib3t2+1BYqW1qiJc+asW5bfvghtKy7aAMjcEVTCufWAIXmYEl2Ru1Rh
2NDBQj2cJNURDjPqPoRmbmUsWcXJuHvos878ZtjMaJhVmv9U/rB0H9fMr/h2ue3P
RgcudA5QuelGKCKC1ys8gYHoEvFcboisx8U8HUaV/57+fzhspk2sdYbUTIp16aKI
Zm9Ad29sZnNzbC5jb20XDTE4MDkxOTIxMjEyNFoXDTIxMDYxNTIxMjEyNFqgDjAM
MAoGA1UdFAQDAgEBMA0GCSqGSIb3DQEBCwUAA4IBAQABs1iNvydGcPHMKXEkC7rj
/NTIMAk6XuVhx9ICYWO64QYl604Ed9wxTVmEY+4JXUHdB48HFXF5y2xnqeVTAX2Y
sNCiNnqMv1GEeA6z2O98t57ewAlGPUPgnaHXd9KmKPeekoK6qcyo0Cv4CZv95C3m
1NVgLjFI6FU/VOn0xHhNCkOdOi5EmudjJXPnxPtxKw0+reaVfWCVT/bPp1JZ4Evy
UUYKDJwuLVWuV3anS45IU4f34zxEm3AXlsTc8NFDqF5ZXC1NiOYHIOR1Cd3EmkZc
xR8g+IrcBz3yMRHNQ9hyx4uDeMHjpbyOhyu+/WYPq0uC355x6N5pTMCT5p+ceLAF
-----END X509 CRL-----

View File

@@ -1,38 +1,38 @@
Certificate Revocation List (CRL):
Version 2 (0x1)
Signature Algorithm: sha1WithRSAEncryption
Signature Algorithm: sha256WithRSAEncryption
Issuer: /C=US/ST=Montana/L=Bozeman/OU=Engineering/CN=www.nomatch.com/emailAddress=info@wolfssl.com
Last Update: Jun 12 23:10:47 2018 GMT
Next Update: Mar 8 23:10:47 2021 GMT
Last Update: Sep 19 21:21:24 2018 GMT
Next Update: Jun 15 21:21:24 2021 GMT
CRL extensions:
X509v3 CRL Number:
1
No Revoked Certificates.
Signature Algorithm: sha1WithRSAEncryption
16:c2:f1:59:3a:bb:50:6c:b0:f8:c4:e8:29:ac:cc:33:a7:e8:
bb:12:88:0b:9b:a0:2f:bf:39:d7:97:c9:9c:17:60:e5:31:5f:
9f:5d:ce:70:ff:1e:aa:6f:5a:72:8c:29:a3:70:3a:bb:33:e5:
2a:c8:61:03:96:3e:96:81:7c:fb:0d:5c:b7:67:b0:44:90:a7:
24:63:9b:df:80:ec:8c:3a:0b:8c:16:2e:09:09:9e:fd:f8:0d:
fa:a5:63:a3:d4:6a:28:10:ab:57:3a:59:e7:1f:84:e5:30:ad:
17:fd:f7:15:c2:75:e8:18:46:c3:5d:2c:4e:6f:ec:bd:8c:fa:
8f:00:9e:4a:1c:c3:0d:cf:2e:24:9a:fc:13:9c:76:91:ac:e0:
87:dd:fa:37:7a:24:72:35:1a:97:56:2f:13:0e:75:11:cd:e2:
41:dd:12:b0:63:2f:01:52:af:dd:63:5d:59:7c:16:ed:a4:bb:
89:d2:42:27:7f:69:c5:09:0c:db:8a:d7:0e:4b:70:ea:1f:17:
68:a5:ac:86:66:25:1c:d4:89:47:8e:64:4f:08:30:35:5e:69:
11:53:21:e9:c6:bd:16:ec:84:51:69:2b:bd:4a:de:65:f1:be:
5d:32:b2:fd:85:0d:d0:47:60:c0:fc:56:d8:d6:7e:05:d2:ac:
0c:44:1f:c7
Signature Algorithm: sha256WithRSAEncryption
01:b3:58:8d:bf:27:46:70:f1:cc:29:71:24:0b:ba:e3:fc:d4:
c8:30:09:3a:5e:e5:61:c7:d2:02:61:63:ba:e1:06:25:eb:4e:
04:77:dc:31:4d:59:84:63:ee:09:5d:41:dd:07:8f:07:15:71:
79:cb:6c:67:a9:e5:53:01:7d:98:b0:d0:a2:36:7a:8c:bf:51:
84:78:0e:b3:d8:ef:7c:b7:9e:de:c0:09:46:3d:43:e0:9d:a1:
d7:77:d2:a6:28:f7:9e:92:82:ba:a9:cc:a8:d0:2b:f8:09:9b:
fd:e4:2d:e6:d4:d5:60:2e:31:48:e8:55:3f:54:e9:f4:c4:78:
4d:0a:43:9d:3a:2e:44:9a:e7:63:25:73:e7:c4:fb:71:2b:0d:
3e:ad:e6:95:7d:60:95:4f:f6:cf:a7:52:59:e0:4b:f2:51:46:
0a:0c:9c:2e:2d:55:ae:57:76:a7:4b:8e:48:53:87:f7:e3:3c:
44:9b:70:17:96:c4:dc:f0:d1:43:a8:5e:59:5c:2d:4d:88:e6:
07:20:e4:75:09:dd:c4:9a:46:5c:c5:1f:20:f8:8a:dc:07:3d:
f2:31:11:cd:43:d8:72:c7:8b:83:78:c1:e3:a5:bc:8e:87:2b:
be:fd:66:0f:ab:4b:82:df:9e:71:e8:de:69:4c:c0:93:e6:9f:
9c:78:b0:05
-----BEGIN X509 CRL-----
MIIB3DCBxQIBATANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UEBhMCVVMxEDAOBgNV
MIIB3DCBxQIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCVVMxEDAOBgNV
BAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xFDASBgNVBAsMC0VuZ2luZWVy
aW5nMRgwFgYDVQQDDA93d3cubm9tYXRjaC5jb20xHzAdBgkqhkiG9w0BCQEWEGlu
Zm9Ad29sZnNzbC5jb20XDTE4MDYxMjIzMTA0N1oXDTIxMDMwODIzMTA0N1qgDjAM
MAoGA1UdFAQDAgEBMA0GCSqGSIb3DQEBBQUAA4IBAQAWwvFZOrtQbLD4xOgprMwz
p+i7EogLm6AvvznXl8mcF2DlMV+fXc5w/x6qb1pyjCmjcDq7M+UqyGEDlj6WgXz7
DVy3Z7BEkKckY5vfgOyMOguMFi4JCZ79+A36pWOj1GooEKtXOlnnH4TlMK0X/fcV
wnXoGEbDXSxOb+y9jPqPAJ5KHMMNzy4kmvwTnHaRrOCH3fo3eiRyNRqXVi8TDnUR
zeJB3RKwYy8BUq/dY11ZfBbtpLuJ0kInf2nFCQzbitcOS3DqHxdopayGZiUc1IlH
jmRPCDA1XmkRUyHpxr0W7IRRaSu9St5l8b5dMrL9hQ3QR2DA/FbY1n4F0qwMRB/H
Zm9Ad29sZnNzbC5jb20XDTE4MDkxOTIxMjEyNFoXDTIxMDYxNTIxMjEyNFqgDjAM
MAoGA1UdFAQDAgEBMA0GCSqGSIb3DQEBCwUAA4IBAQABs1iNvydGcPHMKXEkC7rj
/NTIMAk6XuVhx9ICYWO64QYl604Ed9wxTVmEY+4JXUHdB48HFXF5y2xnqeVTAX2Y
sNCiNnqMv1GEeA6z2O98t57ewAlGPUPgnaHXd9KmKPeekoK6qcyo0Cv4CZv95C3m
1NVgLjFI6FU/VOn0xHhNCkOdOi5EmudjJXPnxPtxKw0+reaVfWCVT/bPp1JZ4Evy
UUYKDJwuLVWuV3anS45IU4f34zxEm3AXlsTc8NFDqF5ZXC1NiOYHIOR1Cd3EmkZc
xR8g+IrcBz3yMRHNQ9hyx4uDeMHjpbyOhyu+/WYPq0uC355x6N5pTMCT5p+ceLAF
-----END X509 CRL-----

View File

@@ -1,38 +1,38 @@
Certificate Revocation List (CRL):
Version 2 (0x1)
Signature Algorithm: sha1WithRSAEncryption
Signature Algorithm: sha256WithRSAEncryption
Issuer: /C=US/ST=Montana/L=Bozeman/OU=Engineering/CN=localhost/emailAddress=info@wolfssl.com
Last Update: Jun 13 16:02:51 2018 GMT
Next Update: Mar 9 16:02:51 2021 GMT
Last Update: Sep 19 21:21:24 2018 GMT
Next Update: Jun 15 21:21:24 2021 GMT
CRL extensions:
X509v3 CRL Number:
1
No Revoked Certificates.
Signature Algorithm: sha1WithRSAEncryption
b9:a1:1b:20:dd:23:b2:20:e4:b5:97:84:21:44:e6:f1:98:0b:
6b:30:22:d2:85:8e:11:19:17:e9:8a:0c:4d:cd:12:61:b0:a1:
62:a0:4a:58:05:e2:b7:ba:50:86:41:8e:46:ae:c5:8a:36:7c:
c8:ea:94:f3:30:53:46:2b:0f:1c:b3:d0:01:f1:ad:47:e1:a8:
18:65:e1:b2:32:8d:4d:31:32:f3:54:92:39:e3:f2:cc:2d:a1:
90:f2:51:79:69:c7:f8:28:ac:53:a9:c2:49:a7:d3:b7:cc:cb:
ac:6f:7d:d5:e5:8e:a1:8f:a6:51:8a:e9:b2:43:e6:5b:7e:e8:
dd:19:a0:00:ba:a3:71:ce:33:a2:bb:77:9c:6d:75:89:fd:1a:
19:da:0a:b4:6a:12:36:e9:cf:e3:83:e1:33:be:41:5b:72:45:
21:11:69:90:aa:72:f7:09:50:cb:d2:d5:df:63:da:7d:0b:29:
5e:c1:cf:cc:d5:11:07:40:92:04:6a:3b:8e:0a:7a:5f:12:f3:
36:d5:fd:af:84:5f:4c:bd:a1:b4:b1:f4:db:d1:03:5a:38:22:
bc:17:7a:ff:39:78:4a:c0:c7:b3:f3:3c:02:84:cd:93:30:5b:
aa:94:11:32:b8:6f:d3:54:7f:16:e8:b4:d7:54:1b:65:2e:7b:
d1:70:bb:e9
Signature Algorithm: sha256WithRSAEncryption
2c:f5:7a:4f:67:06:9b:f2:56:8c:e1:00:05:70:60:5b:60:51:
ad:65:7e:10:69:c9:84:98:b6:66:33:18:ba:f8:86:f9:23:e3:
ac:42:53:1d:27:5d:28:6a:d7:1c:a2:28:4d:02:01:c4:23:c1:
b8:ac:d3:ba:e1:75:d0:2e:ad:98:78:39:f2:c1:6b:7b:4b:78:
f2:f6:49:6f:92:2e:59:91:e9:de:7f:ef:62:5e:77:df:1c:a9:
1a:d5:b8:63:1f:53:0e:b7:28:f8:5e:61:11:1b:b4:dd:9c:85:
77:45:7d:31:fc:61:ab:55:f9:8d:50:ce:56:a0:ff:c0:a8:60:
b5:7a:ec:f1:6a:c8:94:be:89:41:47:a2:22:d9:9d:8e:f7:36:
d2:6f:bc:ce:04:3d:b7:9d:5c:82:37:59:9f:67:15:78:a0:a7:
c1:2f:01:d5:f0:ac:0f:34:21:d7:16:c8:dc:b1:af:60:e0:b1:
de:88:6f:d9:e5:32:c2:63:01:79:e6:10:ef:30:ef:c2:c6:08:
89:cc:21:76:b8:ee:18:bc:88:66:7a:88:89:b4:ba:d9:02:00:
92:73:6a:b5:84:ec:0c:9c:fc:d1:c1:0f:f2:e2:18:30:a6:be:
1d:99:8b:16:26:65:fd:fe:15:48:16:1d:68:0b:1e:b4:a0:0d:
ec:93:cb:a2
-----BEGIN X509 CRL-----
MIIB1TCBvgIBATANBgkqhkiG9w0BAQUFADB8MQswCQYDVQQGEwJVUzEQMA4GA1UE
MIIB1TCBvgIBATANBgkqhkiG9w0BAQsFADB8MQswCQYDVQQGEwJVUzEQMA4GA1UE
CAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjEUMBIGA1UECwwLRW5naW5lZXJp
bmcxEjAQBgNVBAMMCWxvY2FsaG9zdDEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xm
c3NsLmNvbRcNMTgwNjEzMTYwMjUxWhcNMjEwMzA5MTYwMjUxWqAOMAwwCgYDVR0U
BAMCAQEwDQYJKoZIhvcNAQEFBQADggEBALmhGyDdI7Ig5LWXhCFE5vGYC2swItKF
jhEZF+mKDE3NEmGwoWKgSlgF4re6UIZBjkauxYo2fMjqlPMwU0YrDxyz0AHxrUfh
qBhl4bIyjU0xMvNUkjnj8swtoZDyUXlpx/gorFOpwkmn07fMy6xvfdXljqGPplGK
6bJD5lt+6N0ZoAC6o3HOM6K7d5xtdYn9GhnaCrRqEjbpz+OD4TO+QVtyRSERaZCq
cvcJUMvS1d9j2n0LKV7Bz8zVEQdAkgRqO44Kel8S8zbV/a+EX0y9obSx9NvRA1o4
IrwXev85eErAx7PzPAKEzZMwW6qUETK4b9NUfxbotNdUG2Uue9Fwu+k=
c3NsLmNvbRcNMTgwOTE5MjEyMTI0WhcNMjEwNjE1MjEyMTI0WqAOMAwwCgYDVR0U
BAMCAQEwDQYJKoZIhvcNAQELBQADggEBACz1ek9nBpvyVozhAAVwYFtgUa1lfhBp
yYSYtmYzGLr4hvkj46xCUx0nXShq1xyiKE0CAcQjwbis07rhddAurZh4OfLBa3tL
ePL2SW+SLlmR6d5/72Jed98cqRrVuGMfUw63KPheYREbtN2chXdFfTH8YatV+Y1Q
zlag/8CoYLV67PFqyJS+iUFHoiLZnY73NtJvvM4EPbedXII3WZ9nFXigp8EvAdXw
rA80IdcWyNyxr2Dgsd6Ib9nlMsJjAXnmEO8w78LGCInMIXa47hi8iGZ6iIm0utkC
AJJzarWE7Ayc/NHBD/LiGDCmvh2ZixYmZf3+FUgWHWgLHrSgDeyTy6I=
-----END X509 CRL-----

View File

@@ -1,38 +1,38 @@
Certificate Revocation List (CRL):
Version 2 (0x1)
Signature Algorithm: sha1WithRSAEncryption
Signature Algorithm: sha256WithRSAEncryption
Issuer: /C=US/ST=Montana/L=Bozeman/OU=Engineering/CN=*localhost/emailAddress=info@wolfssl.com
Last Update: Jun 12 23:10:47 2018 GMT
Next Update: Mar 8 23:10:47 2021 GMT
Last Update: Sep 19 21:21:24 2018 GMT
Next Update: Jun 15 21:21:24 2021 GMT
CRL extensions:
X509v3 CRL Number:
1
No Revoked Certificates.
Signature Algorithm: sha1WithRSAEncryption
79:7e:bd:34:d2:3d:f5:91:b1:79:de:50:c2:26:d5:8e:05:f7:
30:26:bd:2f:dd:6a:a1:cf:15:91:fd:95:30:a7:04:5a:65:33:
e4:fb:63:79:dd:6e:63:bd:d1:55:bd:c8:22:3c:c2:6a:40:38:
75:85:6a:e1:24:a3:99:e3:13:30:c2:cb:15:cc:50:4b:03:87:
b8:90:9c:e8:95:2a:62:1f:ed:33:30:a8:04:9f:67:b7:4c:bd:
31:b3:19:59:18:9c:6d:64:c2:22:d4:8d:8e:7e:98:c2:39:b0:
28:35:ed:8f:37:6b:03:57:3b:ef:e8:28:26:8a:f0:de:8a:21:
e8:c3:d9:68:2e:ee:cb:cb:89:4f:af:4d:37:ad:98:64:38:6e:
d8:87:fb:3b:0b:b6:a5:58:da:5e:f2:81:a1:18:90:d6:1b:f7:
8a:1b:11:3a:6d:55:0c:09:4d:cd:ea:43:01:a4:92:05:50:7e:
b4:1a:8f:54:b2:cb:4c:94:09:e0:85:cc:29:22:e4:5b:29:ee:
65:91:e3:4a:f9:64:19:40:25:17:27:a1:91:2b:2e:18:6d:2a:
26:9a:e3:82:05:a6:0b:67:24:a1:dc:d4:29:ad:47:f0:89:28:
65:da:fe:fc:62:86:47:05:51:54:08:dc:b3:e5:99:48:d6:da:
52:be:85:7c
Signature Algorithm: sha256WithRSAEncryption
0f:0e:30:ee:50:7a:50:b0:8d:06:74:9a:67:0b:3f:44:c1:13:
58:4e:87:0c:0c:8d:89:44:6e:29:f2:14:0c:5e:57:65:88:fb:
b9:56:a7:99:71:3d:12:16:25:d1:38:19:9d:76:41:e6:e0:37:
0e:0a:52:93:26:19:c3:9d:27:10:29:d4:30:5f:1a:9f:9f:0a:
2e:c0:3a:7c:07:f0:fe:c4:ad:7b:84:a8:2e:e5:06:a9:8d:dd:
b2:2b:bf:e8:ac:e8:d8:30:2b:eb:5f:67:ca:4a:b8:d5:be:7b:
37:0d:04:ef:ad:9d:5d:9c:a3:02:5c:cd:97:4a:78:7c:16:2b:
7d:90:b5:8a:ef:3d:68:53:72:5b:21:92:8b:a3:48:72:f8:f3:
6a:c0:10:93:0f:de:43:d0:7a:b0:f6:13:e9:96:64:5d:d9:a7:
11:e5:ea:72:09:5e:be:a0:6b:54:e8:fb:23:b7:58:a4:a0:88:
d9:cc:22:25:9a:1a:1a:83:40:99:97:05:0f:7f:e6:a9:ee:1a:
a2:6a:4d:f2:60:f3:46:5d:95:3a:03:a6:8a:a0:79:16:f7:3c:
1f:16:29:02:7b:c8:bb:98:d9:ed:b0:a3:fb:4a:2a:9e:00:0a:
cf:42:94:fa:14:73:4f:26:ed:a2:97:8d:a5:86:0f:72:e9:7b:
06:da:35:08
-----BEGIN X509 CRL-----
MIIB1jCBvwIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJVUzEQMA4GA1UE
MIIB1jCBvwIBATANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQGEwJVUzEQMA4GA1UE
CAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjEUMBIGA1UECwwLRW5naW5lZXJp
bmcxEzARBgNVBAMMCipsb2NhbGhvc3QxHzAdBgkqhkiG9w0BCQEWEGluZm9Ad29s
ZnNzbC5jb20XDTE4MDYxMjIzMTA0N1oXDTIxMDMwODIzMTA0N1qgDjAMMAoGA1Ud
FAQDAgEBMA0GCSqGSIb3DQEBBQUAA4IBAQB5fr000j31kbF53lDCJtWOBfcwJr0v
3WqhzxWR/ZUwpwRaZTPk+2N53W5jvdFVvcgiPMJqQDh1hWrhJKOZ4xMwwssVzFBL
A4e4kJzolSpiH+0zMKgEn2e3TL0xsxlZGJxtZMIi1I2OfpjCObAoNe2PN2sDVzvv
6CgmivDeiiHow9loLu7Ly4lPr003rZhkOG7Yh/s7C7alWNpe8oGhGJDWG/eKGxE6
bVUMCU3N6kMBpJIFUH60Go9UsstMlAnghcwpIuRbKe5lkeNK+WQZQCUXJ6GRKy4Y
bSommuOCBaYLZySh3NQprUfwiShl2v78YoZHBVFUCNyz5ZlI1tpSvoV8
ZnNzbC5jb20XDTE4MDkxOTIxMjEyNFoXDTIxMDYxNTIxMjEyNFqgDjAMMAoGA1Ud
FAQDAgEBMA0GCSqGSIb3DQEBCwUAA4IBAQAPDjDuUHpQsI0GdJpnCz9EwRNYTocM
DI2JRG4p8hQMXldliPu5VqeZcT0SFiXROBmddkHm4DcOClKTJhnDnScQKdQwXxqf
nwouwDp8B/D+xK17hKgu5Qapjd2yK7/orOjYMCvrX2fKSrjVvns3DQTvrZ1dnKMC
XM2XSnh8Fit9kLWK7z1oU3JbIZKLo0hy+PNqwBCTD95D0Hqw9hPplmRd2acR5epy
CV6+oGtU6Psjt1ikoIjZzCIlmhoag0CZlwUPf+ap7hqiak3yYPNGXZU6A6aKoHkW
9zwfFikCe8i7mNntsKP7SiqeAArPQpT6FHNPJu2il42lhg9y6XsG2jUI
-----END X509 CRL-----

110
certs/crl/wolfssl.cnf Normal file
View File

@@ -0,0 +1,110 @@
[ ca ]
# `man ca`
default_ca = CA_default
[ CA_default ]
# Directory and file locations relevant to where the script is executing
dir = .
certs = $dir/../
new_certs_dir = $dir/../
database = $dir/../crl/index.txt
serial = $dir/../crl/serial
# This should come from the system disregard local pathing
RANDFILE = $dir/private/.rand
# The root key and root certificate.
private_key = $dir/../ca-ecc-key.pem
certificate = $dir/../ca-ecc-cert.pem
# For certificate revocation lists.
crlnumber = $dir/../crl/crlnumber
crl_extensions = crl_ext
default_crl_days = 1000
# SHA-1 is deprecated, so use SHA-2 instead.
default_md = sha256
name_opt = ca_default
cert_opt = ca_default
default_days = 3650
preserve = no
policy = policy_loose
[ policy_strict ]
# The root CA should only sign intermediate certificates that match.
# See the POLICY FORMAT section of `man ca`.
countryName = match
stateOrProvinceName = match
organizationName = match
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
[ policy_loose ]
# Allow the intermediate CA to sign a more diverse range of certificates.
# See the POLICY FORMAT section of the `ca` man page.
countryName = optional
stateOrProvinceName = optional
localityName = optional
organizationName = optional
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
[ req ]
# Options for the `req` tool (`man req`).
default_bits = 2048
distinguished_name = req_distinguished_name
string_mask = utf8only
# SHA-1 is deprecated, so use SHA-2 instead.
default_md = sha256
# Extension to add when the -x509 option is used.
x509_extensions = v3_ca
[ req_distinguished_name ]
countryName = US
stateOrProvinceName = Washington
localityName = Seattle
0.organizationName = wolfSSL
organizationalUnitName = Development
commonName = www.wolfssl.com
emailAddress = info@wolfssl.com
[ v3_ca ]
# Extensions for a typical CA (`man x509v3_config`).
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer
basicConstraints = critical, CA:true
keyUsage = critical, digitalSignature, cRLSign, keyCertSign
[ v3_intermediate_ca ]
# Extensions for a typical intermediate CA (`man x509v3_config`).
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer
basicConstraints = critical, CA:true, pathlen:0
keyUsage = critical, digitalSignature, cRLSign, keyCertSign
[ usr_cert ]
# Extensions for client certificates (`man x509v3_config`).
basicConstraints = CA:FALSE
nsCertType = client, email
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid,issuer
keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment
extendedKeyUsage = clientAuth, emailProtection
[ server_cert ]
# Extensions for server certificates (`man x509v3_config`).
basicConstraints = CA:FALSE
nsCertType = server
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid,issuer:always
keyUsage = critical, digitalSignature, keyEncipherment, keyAgreement
extendedKeyUsage = serverAuth
[ crl_ext ]
# Extension for CRLs (`man x509v3_config`).
authorityKeyIdentifier=keyid:always

BIN
certs/ecc-keyPkcs8.der Normal file

Binary file not shown.

BIN
certs/ecc-keyPkcs8Enc.der Normal file

Binary file not shown.

View File

@@ -0,0 +1,4 @@
-----BEGIN EC PRIVATE KEY-----
MEECAQAwEwYHKoZIzj0CAQYIKoZIzj0DAQcEJzAlAgEBBCBFtmkCc5xshaE4W3Lo
6MesxAONUzUE+mwo3DSN4agJjA==
-----END EC PRIVATE KEY-----

View File

@@ -13,21 +13,17 @@ echo 2000 > ./certs/ecc/crlnumber
# generate ECC 256-bit CA
openssl ecparam -out ./certs/ca-ecc-key.par -name prime256v1
openssl req -config ./certs/ecc/wolfssl.cnf -extensions v3_ca -x509 -nodes -newkey ec:./certs/ca-ecc-key.par -keyout ./certs/ca-ecc-key.pem -out ./certs/ca-ecc-cert.pem -sha256 -days 7300 -batch -subj "/C=US/ST=Washington/L=Seattle/O=wolfSSL/OU=Development/CN=www.wolfssl.com/emailAddress=info@wolfssl.com"
openssl req -config ./certs/ecc/wolfssl.cnf -extensions v3_ca -x509 -nodes -newkey ec:./certs/ca-ecc-key.par -keyout ./certs/ca-ecc-key.pem -out ./certs/ca-ecc-cert.pem -sha256 \
-days 7300 -batch -subj "/C=US/ST=Washington/L=Seattle/O=wolfSSL/OU=Development/CN=www.wolfssl.com/emailAddress=info@wolfssl.com"
openssl x509 -in ./certs/ca-ecc-cert.pem -inform PEM -out ./certs/ca-ecc-cert.der -outform DER
openssl ec -in ./certs/ca-ecc-key.pem -inform PEM -out ./certs/ca-ecc-key.der -outform DER
rm ./certs/ca-ecc-key.par
# generate ECC 384-bit CA
openssl ecparam -out ./certs/ca-ecc384-key.par -name secp384r1
openssl req -config ./certs/ecc/wolfssl.cnf -extensions v3_ca -x509 -nodes -newkey ec:./certs/ca-ecc384-key.par -keyout ./certs/ca-ecc384-key.pem -out ./certs/ca-ecc384-cert.pem -sha384 -days 7300 -batch -subj "/C=US/ST=Washington/L=Seattle/O=wolfSSL/OU=Development/CN=www.wolfssl.com/emailAddress=info@wolfssl.com"
# Gen CA CRL
openssl ca -config ./certs/ecc/wolfssl.cnf -gencrl -crldays 1000 -out ./certs/crl/caEccCrl.pem -keyfile ./certs/ca-ecc-key.pem -cert ./certs/ca-ecc-cert.pem
openssl x509 -in ./certs/ca-ecc384-cert.pem -inform PEM -out ./certs/ca-ecc384-cert.der -outform DER
openssl ec -in ./certs/ca-ecc384-key.pem -inform PEM -out ./certs/ca-ecc384-key.der -outform DER
rm ./certs/ca-ecc384-key.par
# Generate ECC 256-bit server cert
@@ -40,9 +36,53 @@ openssl x509 -in ./certs/server-ecc.pem -outform der -out ./certs/server-ecc.der
rm ./certs/server-ecc-req.pem
# Gen CRL
openssl ca -config ./certs/ecc/wolfssl.cnf -gencrl -crldays 1000 -out ./certs/crl/caEccCrl.pem -keyfile ./certs/ca-ecc-key.pem -cert ./certs/ca-ecc-cert.pem
openssl ca -config ./certs/ecc/wolfssl.cnf -gencrl -crldays 1000 -out ./certs/crl/caEcc384Crl.pem -keyfile ./certs/ca-ecc384-key.pem -cert ./certs/ca-ecc384-cert.pem
# generate ECC 384-bit CA
openssl ecparam -out ./certs/ca-ecc384-key.par -name secp384r1
openssl req -config ./certs/ecc/wolfssl_384.cnf -extensions v3_ca -x509 -nodes -newkey ec:./certs/ca-ecc384-key.par -keyout ./certs/ca-ecc384-key.pem -out ./certs/ca-ecc384-cert.pem -sha384 \
-days 7300 -batch -subj "/C=US/ST=Washington/L=Seattle/O=wolfSSL/OU=Development/CN=www.wolfssl.com/emailAddress=info@wolfssl.com"
openssl x509 -in ./certs/ca-ecc384-cert.pem -inform PEM -out ./certs/ca-ecc384-cert.der -outform DER
openssl ec -in ./certs/ca-ecc384-key.pem -inform PEM -out ./certs/ca-ecc384-key.der -outform DER
rm ./certs/ca-ecc384-key.par
# Gen CA CRL
openssl ca -config ./certs/ecc/wolfssl_384.cnf -gencrl -crldays 1000 -out ./certs/crl/caEcc384Crl.pem -keyfile ./certs/ca-ecc384-key.pem -cert ./certs/ca-ecc384-cert.pem
# Generate ECC 384-bit server cert
openssl ecparam -out ./certs/server-ecc384-key.par -name secp384r1
openssl req -config ./certs/ecc/wolfssl_384.cnf -sha384 -x509 -nodes -newkey ec:./certs/server-ecc384-key.par -keyout ./certs/server-ecc384-key.pem -out ./certs/server-ecc384-req.pem \
-subj "/C=US/ST=Washington/L=Seattle/O=Eliptic/OU=ECC384Srv/CN=www.wolfssl.com/emailAddress=info@wolfssl.com/"
openssl req -config ./certs/ecc/wolfssl_384.cnf -sha384 -new -key ./certs/server-ecc384-key.pem -out ./certs/server-ecc384-req.pem \
-subj "/C=US/ST=Washington/L=Seattle/O=Eliptic/OU=ECC384Srv/CN=www.wolfssl.com/emailAddress=info@wolfssl.com/"
openssl ec -in ./certs/server-ecc384-key.pem -inform PEM -out ./certs/server-ecc384-key.der -outform DER
# Sign server certificate
openssl ca -config ./certs/ecc/wolfssl_384.cnf -extensions server_cert -days 10950 -notext -md sha384 -in ./certs/server-ecc384-req.pem -out ./certs/server-ecc384-cert.pem
openssl x509 -in ./certs/server-ecc384-cert.pem -outform der -out ./certs/server-ecc384-cert.der
rm ./certs/server-ecc384-req.pem
rm ./certs/server-ecc384-key.par
# Generate ECC 384-bit client cert
openssl ecparam -out ./certs/client-ecc384-key.par -name secp384r1
openssl req -config ./certs/ecc/wolfssl_384.cnf -sha384 -x509 -nodes -newkey ec:./certs/client-ecc384-key.par -keyout ./certs/client-ecc384-key.pem -out ./certs/client-ecc384-req.pem \
-subj "/C=US/ST=Washington/L=Seattle/O=Eliptic/OU=ECC384Cli/CN=www.wolfssl.com/emailAddress=info@wolfssl.com/"
openssl req -config ./certs/ecc/wolfssl_384.cnf -sha384 -new -key ./certs/client-ecc384-key.pem -out ./certs/client-ecc384-req.pem \
-subj "/C=US/ST=Washington/L=Seattle/O=Eliptic/OU=ECC384Clit/CN=www.wolfssl.com/emailAddress=info@wolfssl.com/"
openssl ec -in ./certs/client-ecc384-key.pem -inform PEM -out ./certs/client-ecc384-key.der -outform DER
# Sign client certificate
openssl ca -config ./certs/ecc/wolfssl_384.cnf -extensions usr_cert -days 10950 -notext -md sha384 -in ./certs/client-ecc384-req.pem -out ./certs/client-ecc384-cert.pem
openssl x509 -in ./certs/client-ecc384-cert.pem -outform der -out ./certs/client-ecc384-cert.der
rm ./certs/client-ecc384-req.pem
rm ./certs/client-ecc384-key.par
# Also manually need to:
# 1. Copy ./certs/server-ecc.der into ./certs/test/server-cert-ecc-badsig.der `cp ./certs/server-ecc.der ./certs/test/server-cert-ecc-badsig.der`

View File

@@ -4,5 +4,5 @@
EXTRA_DIST += \
certs/ecc/genecc.sh \
certs/ecc/wolfssl.cnf
certs/ecc/wolfssl.cnf \
certs/ecc/wolfssl_384.cnf

View File

@@ -3,12 +3,13 @@
default_ca = CA_default
[ CA_default ]
# Directory and file locations.
# Directory and file locations relevant to where the script is executing
dir = .
certs = $dir/certs
new_certs_dir = $dir/certs
database = $dir/certs/ecc/index.txt
serial = $dir/certs/ecc/serial
# This should come from the system disregard local pathing
RANDFILE = $dir/private/.rand
# The root key and root certificate.

110
certs/ecc/wolfssl_384.cnf Normal file
View File

@@ -0,0 +1,110 @@
[ ca ]
# `man ca`
default_ca = CA_default
[ CA_default ]
# Directory and file locations relevant to where the script is executing
dir = .
certs = $dir/certs
new_certs_dir = $dir/certs
database = $dir/certs/ecc/index.txt
serial = $dir/certs/ecc/serial
# This should come from the system disregard local pathing
RANDFILE = $dir/private/.rand
# The root key and root certificate.
private_key = $dir/certs/ca-ecc384-key.pem
certificate = $dir/certs/ca-ecc384-cert.pem
# For certificate revocation lists.
crlnumber = $dir/certs/ecc/crlnumber
crl_extensions = crl_ext
default_crl_days = 1000
# SHA-384 is default
default_md = sha384
name_opt = ca_default
cert_opt = ca_default
default_days = 3650
preserve = no
policy = policy_loose
[ policy_strict ]
# The root CA should only sign intermediate certificates that match.
# See the POLICY FORMAT section of `man ca`.
countryName = match
stateOrProvinceName = match
organizationName = match
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
[ policy_loose ]
# Allow the intermediate CA to sign a more diverse range of certificates.
# See the POLICY FORMAT section of the `ca` man page.
countryName = optional
stateOrProvinceName = optional
localityName = optional
organizationName = optional
organizationalUnitName = optional
commonName = supplied
emailAddress = optional
[ req ]
# Options for the `req` tool (`man req`).
default_bits = 2048
distinguished_name = req_distinguished_name
string_mask = utf8only
# SHA-384 is default
default_md = sha384
# Extension to add when the -x509 option is used.
x509_extensions = v3_ca
[ req_distinguished_name ]
countryName = US
stateOrProvinceName = Washington
localityName = Seattle
0.organizationName = wolfSSL
organizationalUnitName = Development
commonName = www.wolfssl.com
emailAddress = info@wolfssl.com
[ v3_ca ]
# Extensions for a typical CA (`man x509v3_config`).
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer
basicConstraints = critical, CA:true
keyUsage = critical, digitalSignature, cRLSign, keyCertSign
[ v3_intermediate_ca ]
# Extensions for a typical intermediate CA (`man x509v3_config`).
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer
basicConstraints = critical, CA:true, pathlen:0
keyUsage = critical, digitalSignature, cRLSign, keyCertSign
[ usr_cert ]
# Extensions for client certificates (`man x509v3_config`).
basicConstraints = CA:FALSE
nsCertType = client, email
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid,issuer
keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment
extendedKeyUsage = clientAuth, emailProtection
[ server_cert ]
# Extensions for server certificates (`man x509v3_config`).
basicConstraints = CA:FALSE
nsCertType = server
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid,issuer:always
keyUsage = critical, digitalSignature, keyEncipherment, keyAgreement
extendedKeyUsage = serverAuth
[ crl_ext ]
# Extension for CRLs (`man x509v3_config`).
authorityKeyIdentifier=keyid:always

View File

@@ -12,9 +12,12 @@ EXTRA_DIST += \
certs/client-relative-uri.pem \
certs/ecc-key.pem \
certs/ecc-privkey.pem \
certs/ecc-privkeyPkcs8.pem \
certs/ecc-keyPkcs8Enc.pem \
certs/ecc-keyPkcs8Enc.der \
certs/ecc-key-comp.pem \
certs/ecc-keyPkcs8.pem \
certs/ecc-keyPkcs8.der \
certs/ecc-client-key.pem \
certs/ecc-client-keyPub.pem \
certs/client-ecc-cert.pem \
@@ -32,10 +35,12 @@ EXTRA_DIST += \
certs/server-keyPkcs8Enc12.pem \
certs/server-keyPkcs8Enc2.pem \
certs/server-keyPkcs8Enc.pem \
certs/server-keyPkcs8Enc.der \
certs/server-keyPkcs8.pem \
certs/server-revoked-cert.pem \
certs/server-revoked-key.pem \
certs/wolfssl-website-ca.pem \
certs/test-degenerate.p7b \
certs/test-servercert.p12 \
certs/ecc-rsa-server.p12 \
certs/dsaparams.pem \

View File

@@ -1,11 +1,28 @@
#!/bin/sh
check_result(){
if [ $1 -ne 0 ]; then
if [ -n "$2" ]; then
echo "Step Failed, Abort"
else
echo "$2 Failed, Abort"
fi
exit 1
else
echo "Step Succeeded"
fi
}
echo "OCSP renew certs Step 1"
openssl req \
-new \
-key root-ca-key.pem \
-out root-ca-cert.csr \
-config ../renewcerts/wolfssl.cnf \
-subj "/C=US/ST=Washington/L=Seattle/O=wolfSSL/OU=Engineering/CN=wolfSSL root CA/emailAddress=info@wolfssl.com"
check_result $? ""
echo "OCSP renew certs Step 2"
openssl x509 \
-req -in root-ca-cert.csr \
-extfile openssl.cnf \
@@ -14,33 +31,41 @@ openssl x509 \
-signkey root-ca-key.pem \
-set_serial 99 \
-out root-ca-cert.pem
check_result $? ""
rm root-ca-cert.csr
echo "OCSP renew certs Step 3"
openssl x509 -in root-ca-cert.pem -text > tmp.pem
check_result $? ""
mv tmp.pem root-ca-cert.pem
# $1 cert, $2 name, $3 ca, $4 extensions, $5 serial
function update_cert() {
openssl req \
-new \
-key $1-key.pem \
-out $1-cert.csr \
update_cert() {
echo "Updating certificate \"$1-cert.pem\""
openssl req \
-new \
-key "$1"-key.pem \
-out "$1"-cert.csr \
-config ../renewcerts/wolfssl.cnf \
-subj "/C=US/ST=Washington/L=Seattle/O=wolfSSL/OU=Engineering/CN=$2/emailAddress=info@wolfssl.com"
check_result $? "Step 1"
openssl x509 \
-req -in $1-cert.csr \
-extfile openssl.cnf \
-extensions $4 \
-days 1000 \
-CA $3-cert.pem \
-CAkey $3-key.pem \
-set_serial $5 \
-out $1-cert.pem
openssl x509 \
-req -in "$1"-cert.csr \
-extfile openssl.cnf \
-extensions "$4" \
-days 1000 \
-CA "$3"-cert.pem \
-CAkey "$3"-key.pem \
-set_serial "$5" \
-out "$1"-cert.pem
check_result $? "Step 2"
rm $1-cert.csr
openssl x509 -in $1-cert.pem -text > $1_tmp.pem
mv $1_tmp.pem $1-cert.pem
cat $3-cert.pem >> $1-cert.pem
rm "$1"-cert.csr
openssl x509 -in "$1"-cert.pem -text > "$1"_tmp.pem
check_result $? "Step 3"
mv "$1"_tmp.pem "$1"-cert.pem
cat "$3"-cert.pem >> "$1"-cert.pem
}
update_cert intermediate1-ca "wolfSSL intermediate CA 1" root-ca v3_ca 01

View File

@@ -30,6 +30,9 @@
# crl/crl.revoked
# crl/eccCliCRL.pem
# crl/eccSrvCRL.pem
#
# pkcs7:
# test-degenerate.p7b
# if HAVE_NTRU
# ntru-cert.pem
# ntru-key.raw
@@ -37,12 +40,33 @@
######################## FUNCTIONS SECTION ####################################
###############################################################################
#function for restoring a previous configure state
restore_config(){
mv tmp.status config.status
mv tmp.options.h wolfssl/options.h
make clean
make -j 8
}
check_result(){
if [ $1 -ne 0 ]; then
echo "Failed at \"$2\", Abort"
if [ "$2" = "configure for ntru" ] || \
[ "$2" = "make check with ntru" ]; then
restore_config
fi
exit 1
else
echo "Step Succeeded!"
fi
}
#the function that will be called when we are ready to renew the certs.
function run_renewcerts(){
cd certs/
run_renewcerts(){
cd certs/ || { echo "Couldn't cd to certs directory"; exit 1; }
echo ""
#move the custom cnf into our working directory
cp renewcerts/wolfssl.cnf wolfssl.cnf
cp renewcerts/wolfssl.cnf wolfssl.cnf || exit 1
# To generate these all in sha1 add the flag "-sha1" on appropriate lines
# That is all lines beginning with: "openssl req"
@@ -53,339 +77,439 @@ function run_renewcerts(){
echo "Updating 2048-bit client-uri-cert.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nMontana\nBozeman\nwolfSSL_2048\nURI\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key client-key.pem -nodes -out client-cert.csr
echo -e "US\\nMontana\\nBozeman\\nwolfSSL_2048\\nURI\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -key client-key.pem -config ./wolfssl.cnf -nodes -out client-cert.csr
check_result $? "Step 1"
openssl x509 -req -in client-cert.csr -days 1000 -extfile wolfssl.cnf -extensions uri -signkey client-key.pem -out client-uri-cert.pem
check_result $? "Step 2"
rm client-cert.csr
openssl x509 -in client-uri-cert.pem -text > tmp.pem
check_result $? "Step 3"
mv tmp.pem client-uri-cert.pem
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
#### update the self-signed (2048-bit) client-relative-uri.pem
############################################################
echo "Updating 2048-bit client-relative-uri.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nMontana\nBozeman\nwolfSSL_2048\nRELATIVE_URI\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key client-key.pem -nodes -out client-cert.csr
echo -e "US\\nMontana\\nBozeman\\nwolfSSL_2048\\nRELATIVE_URI\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -key client-key.pem -config ./wolfssl.cnf -nodes -out client-cert.csr
check_result $? "Step 1"
openssl x509 -req -in client-cert.csr -days 1000 -extfile wolfssl.cnf -extensions relative_uri -signkey client-key.pem -out client-relative-uri.pem
check_result $? "Step 2"
rm client-cert.csr
openssl x509 -in client-relative-uri.pem -text > tmp.pem
check_result $? "Step 3"
mv tmp.pem client-relative-uri.pem
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
#### update the self-signed (2048-bit) client-cert.pem #####
############################################################
echo "Updating 2048-bit client-cert.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nMontana\nBozeman\nwolfSSL_2048\nProgramming-2048\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key client-key.pem -nodes -out client-cert.csr
echo -e "US\\nMontana\\nBozeman\\nwolfSSL_2048\\nProgramming-2048\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -key client-key.pem -config ./wolfssl.cnf -nodes -out client-cert.csr
check_result $? "Step 1"
openssl x509 -req -in client-cert.csr -days 1000 -extfile wolfssl.cnf -extensions wolfssl_opts -signkey client-key.pem -out client-cert.pem
check_result $? "Step 2"
rm client-cert.csr
openssl x509 -in client-cert.pem -text > tmp.pem
check_result $? "Step 3"
mv tmp.pem client-cert.pem
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
#### update the self-signed (3072-bit) client-cert.pem #####
############################################################
echo "Updating 3072-bit client-cert.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nMontana\nBozeman\nwolfSSL_3072\nProgramming-3072\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -newkey rsa:3072 -keyout client-key-3072.pem -nodes -out client-cert-3072.csr
echo -e "US\\nMontana\\nBozeman\\nwolfSSL_3072\\nProgramming-3072\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -newkey rsa:3072 -keyout client-key-3072.pem -config ./wolfssl.cnf -nodes -out client-cert-3072.csr
check_result $? "Step 1"
openssl x509 -req -in client-cert-3072.csr -days 1000 -extfile wolfssl.cnf -extensions wolfssl_opts -signkey client-key-3072.pem -out client-cert-3072.pem
check_result $? "Step 2"
rm client-cert-3072.csr
openssl x509 -in client-cert-3072.pem -text > tmp.pem
check_result $? "Step 3"
mv tmp.pem client-cert-3072.pem
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
#### update the self-signed (1024-bit) client-cert.pem #####
############################################################
echo "Updating 1024-bit client-cert.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nMontana\nBozeman\nwolfSSL_1024\nProgramming-1024\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key \1024/client-key.pem -nodes -out \1024/client-cert.csr
echo -e "US\\nMontana\\nBozeman\\nwolfSSL_1024\\nProgramming-1024\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -key ./1024/client-key.pem -config ./wolfssl.cnf -nodes -out ./1024/client-cert.csr
check_result $? "Step 1"
openssl x509 -req -in \1024/client-cert.csr -days 1000 -extfile wolfssl.cnf -extensions wolfssl_opts -signkey \1024/client-key.pem -out \1024/client-cert.pem
rm \1024/client-cert.csr
openssl x509 -req -in ./1024/client-cert.csr -days 1000 -extfile wolfssl.cnf -extensions wolfssl_opts -signkey ./1024/client-key.pem -out ./1024/client-cert.pem
check_result $? "Step 2"
rm ./1024/client-cert.csr
openssl x509 -in \1024/client-cert.pem -text > \1024/tmp.pem
mv \1024/tmp.pem \1024/client-cert.pem
openssl x509 -in ./1024/client-cert.pem -text > ./1024/tmp.pem
check_result $? "Step 3"
mv ./1024/tmp.pem ./1024/client-cert.pem
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
########## update the self-signed ca-cert.pem ##############
############################################################
echo "Updating ca-cert.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nMontana\nBozeman\nSawtooth\nConsulting\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key ca-key.pem -nodes -out ca-cert.csr
echo -e "US\\nMontana\\nBozeman\\nSawtooth\\nConsulting\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -key ca-key.pem -config ./wolfssl.cnf -nodes -out ca-cert.csr
check_result $? "Step 1"
openssl x509 -req -in ca-cert.csr -days 1000 -extfile wolfssl.cnf -extensions wolfssl_opts -signkey ca-key.pem -out ca-cert.pem
check_result $? "Step 2"
rm ca-cert.csr
openssl x509 -in ca-cert.pem -text > tmp.pem
check_result $? "Step 3"
mv tmp.pem ca-cert.pem
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
########## update the self-signed ca-ecc-cert.pem ##########
############################################################
echo "Updating ca-ecc-cert.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nWashington\nSeattle\nwolfSSL\nDevelopment\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key ca-ecc-key.pem -nodes -out ca-ecc-cert.csr
echo -e "US\\nWashington\\nSeattle\\nwolfSSL\\nDevelopment\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -key ca-ecc-key.pem -config ./wolfssl.cnf -nodes -out ca-ecc-cert.csr
check_result $? "Step 1"
openssl x509 -req -in ca-ecc-cert.csr -days 1000 -extfile wolfssl.cnf -extensions ca_ecc_cert -signkey ca-ecc-key.pem -out ca-ecc-cert.pem
check_result $? "Step 2"
rm ca-ecc-cert.csr
openssl x509 -in ca-ecc-cert.pem -text > tmp.pem
check_result $? "Step 3"
mv tmp.pem ca-ecc-cert.pem
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
########## update the self-signed ca-ecc384-cert.pem #######
############################################################
echo "Updating ca-ecc384-cert.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nWashington\nSeattle\nwolfSSL\nDevelopment\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key ca-ecc384-key.pem -nodes -sha384 -out ca-ecc384-cert.csr
echo -e "US\\nWashington\\nSeattle\\nwolfSSL\\nDevelopment\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -key ca-ecc384-key.pem -config ./wolfssl.cnf -nodes -sha384 -out ca-ecc384-cert.csr
check_result $? "Step 1"
openssl x509 -req -in ca-ecc384-cert.csr -days 1000 -extfile wolfssl.cnf -extensions ca_ecc_cert -signkey ca-ecc384-key.pem -sha384 -out ca-ecc384-cert.pem
check_result $? "Step 2"
rm ca-ecc384-cert.csr
openssl x509 -in ca-ecc384-cert.pem -text > tmp.pem
check_result $? "Step 3"
mv tmp.pem ca-ecc384-cert.pem
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
##### update the self-signed (1024-bit) ca-cert.pem ########
############################################################
echo "Updating 1024-bit ca-cert.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nMontana\nBozeman\nSawtooth\nConsulting_1024\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key \1024/ca-key.pem -nodes -sha1 -out \1024/ca-cert.csr
echo -e "US\\nMontana\\nBozeman\\nSawtooth\\nConsulting_1024\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -key ./1024/ca-key.pem -config ./wolfssl.cnf -nodes -sha1 -out ./1024/ca-cert.csr
check_result $? "Step 1"
openssl x509 -req -in \1024/ca-cert.csr -days 1000 -extfile wolfssl.cnf -extensions wolfssl_opts -signkey \1024/ca-key.pem -out \1024/ca-cert.pem
rm \1024/ca-cert.csr
openssl x509 -req -in ./1024/ca-cert.csr -days 1000 -extfile wolfssl.cnf -extensions wolfssl_opts -signkey ./1024/ca-key.pem -out ./1024/ca-cert.pem
check_result $? "Step 2"
rm ./1024/ca-cert.csr
openssl x509 -in \1024/ca-cert.pem -text > \1024/tmp.pem
mv \1024/tmp.pem \1024/ca-cert.pem
openssl x509 -in ./1024/ca-cert.pem -text > ./1024/tmp.pem
check_result $? "Step 3"
mv ./1024/tmp.pem ./1024/ca-cert.pem
echo "End of section"
echo "---------------------------------------------------------------------"
###########################################################
########## update and sign server-cert.pem ################
###########################################################
echo "Updating server-cert.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nMontana\nBozeman\nwolfSSL\nSupport\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key server-key.pem -nodes > server-req.pem
echo -e "US\\nMontana\\nBozeman\\nwolfSSL\\nSupport\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -key server-key.pem -config ./wolfssl.cnf -nodes > server-req.pem
check_result $? "Step 1"
openssl x509 -req -in server-req.pem -extfile wolfssl.cnf -extensions wolfssl_opts -days 1000 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 > server-cert.pem
check_result $? "Step 2"
rm server-req.pem
openssl x509 -in ca-cert.pem -text > ca_tmp.pem
check_result $? "Step 3"
openssl x509 -in server-cert.pem -text > srv_tmp.pem
check_result $? "Step 4"
mv srv_tmp.pem server-cert.pem
cat ca_tmp.pem >> server-cert.pem
rm ca_tmp.pem
echo "End of section"
echo "---------------------------------------------------------------------"
###########################################################
########## update and sign server-revoked-key.pem #########
###########################################################
echo "Updating server-revoked-cert.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nMontana\nBozeman\nwolfSSL_revoked\nSupport_revoked\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key server-revoked-key.pem -nodes > server-revoked-req.pem
echo -e "US\\nMontana\\nBozeman\\nwolfSSL_revoked\\nSupport_revoked\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -key server-revoked-key.pem -config ./wolfssl.cnf -nodes > server-revoked-req.pem
check_result $? "Step 1"
openssl x509 -req -in server-revoked-req.pem -extfile wolfssl.cnf -extensions wolfssl_opts -days 1000 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 02 > server-revoked-cert.pem
check_result $? "Step 2"
rm server-revoked-req.pem
openssl x509 -in ca-cert.pem -text > ca_tmp.pem
check_result $? "Step 3"
openssl x509 -in server-revoked-cert.pem -text > srv_tmp.pem
check_result $? "Step 4"
mv srv_tmp.pem server-revoked-cert.pem
cat ca_tmp.pem >> server-revoked-cert.pem
rm ca_tmp.pem
echo "End of section"
echo "---------------------------------------------------------------------"
###########################################################
########## update and sign server-duplicate-policy.pem ####
###########################################################
echo "Updating server-duplicate-policy.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nMontana\nBozeman\nwolfSSL\ntesting duplicate policy\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key server-key.pem -nodes > ./test/server-duplicate-policy-req.pem
echo -e "US\\nMontana\\nBozeman\\nwolfSSL\\ntesting duplicate policy\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -key server-key.pem -config ./wolfssl.cnf -nodes > ./test/server-duplicate-policy-req.pem
check_result $? "Step 1"
openssl x509 -req -in ./test/server-duplicate-policy-req.pem -extfile wolfssl.cnf -extensions policy_test -days 1000 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 02 > ./test/server-duplicate-policy.pem
check_result $? "Step 2"
rm ./test/server-duplicate-policy-req.pem
openssl x509 -in ca-cert.pem -text > ca_tmp.pem
check_result $? "Step 3"
openssl x509 -in ./test/server-duplicate-policy.pem -text > srv_tmp.pem
check_result $? "Step 4"
mv srv_tmp.pem ./test/server-duplicate-policy.pem
cat ca_tmp.pem >> ./test/server-duplicate-policy.pem
rm ca_tmp.pem
echo "End of section"
echo "---------------------------------------------------------------------"
###########################################################
#### update and sign (1024-bit) server-cert.pem ###########
###########################################################
echo "Updating 1024-bit server-cert.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nMontana\nBozeman\nwolfSSL\nSupport_1024\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key \1024/server-key.pem -nodes -sha1 > \1024/server-req.pem
echo -e "US\\nMontana\\nBozeman\\nwolfSSL\\nSupport_1024\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -key ./1024/server-key.pem -config ./wolfssl.cnf -nodes -sha1 > ./1024/server-req.pem
check_result $? "Step 1"
openssl x509 -req -in \1024/server-req.pem -extfile wolfssl.cnf -extensions wolfssl_opts -days 1000 -CA \1024/ca-cert.pem -CAkey \1024/ca-key.pem -set_serial 01 > \1024/server-cert.pem
openssl x509 -req -in ./1024/server-req.pem -extfile wolfssl.cnf -extensions wolfssl_opts -days 1000 -CA ./1024/ca-cert.pem -CAkey ./1024/ca-key.pem -set_serial 01 > ./1024/server-cert.pem
check_result $? "Step 2"
rm ./1024/server-req.pem
rm \1024/server-req.pem
openssl x509 -in \1024/ca-cert.pem -text > \1024/ca_tmp.pem
openssl x509 -in \1024/server-cert.pem -text > \1024/srv_tmp.pem
mv \1024/srv_tmp.pem \1024/server-cert.pem
cat \1024/ca_tmp.pem >> \1024/server-cert.pem
rm \1024/ca_tmp.pem
openssl x509 -in ./1024/ca-cert.pem -text > ./1024/ca_tmp.pem
check_result $? "Step 3"
openssl x509 -in ./1024/server-cert.pem -text > ./1024/srv_tmp.pem
check_result $? "Step 4"
mv ./1024/srv_tmp.pem ./1024/server-cert.pem
cat ./1024/ca_tmp.pem >> ./1024/server-cert.pem
rm ./1024/ca_tmp.pem
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
########## update and sign the server-ecc-rsa.pem ##########
############################################################
echo "Updating server-ecc-rsa.pem"
echo ""
echo -e "US\nMontana\nBozeman\nElliptic - RSAsig\nECC-RSAsig\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key ecc-key.pem -nodes > server-ecc-req.pem
echo -e "US\\nMontana\\nBozeman\\nElliptic - RSAsig\\nECC-RSAsig\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -key ecc-key.pem -config ./wolfssl.cnf -nodes > server-ecc-req.pem
check_result $? "Step 1"
openssl x509 -req -in server-ecc-req.pem -extfile wolfssl.cnf -extensions wolfssl_opts -days 1000 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 > server-ecc-rsa.pem
check_result $? "Step 2"
rm server-ecc-req.pem
openssl x509 -in server-ecc-rsa.pem -text > tmp.pem
check_result $? "Step 3"
mv tmp.pem server-ecc-rsa.pem
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
####### update the self-signed client-ecc-cert.pem #########
############################################################
echo "Updating client-ecc-cert.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nOregon\nSalem\nClient ECC\nFast\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key ecc-client-key.pem -nodes -out client-ecc-cert.csr
echo -e "US\\nOregon\\nSalem\\nClient ECC\\nFast\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -key ecc-client-key.pem -config ./wolfssl.cnf -nodes -out client-ecc-cert.csr
check_result $? "Step 1"
openssl x509 -req -in client-ecc-cert.csr -days 1000 -extfile wolfssl.cnf -extensions wolfssl_opts -signkey ecc-client-key.pem -out client-ecc-cert.pem
check_result $? "Step 2"
rm client-ecc-cert.csr
openssl x509 -in client-ecc-cert.pem -text > tmp.pem
check_result $? "Step 3"
mv tmp.pem client-ecc-cert.pem
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
########## update the server-ecc.pem #######################
############################################################
echo "Updating server-ecc.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nWashington\nSeattle\nEliptic\nECC\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key ecc-key.pem -nodes -out server-ecc.csr
echo -e "US\\nWashington\\nSeattle\\nEliptic\\nECC\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -key ecc-key.pem -config ./wolfssl.cnf -nodes -out server-ecc.csr
check_result $? "Step 1"
openssl x509 -req -in server-ecc.csr -days 1000 -extfile wolfssl.cnf -extensions server_ecc -CAfile ca-ecc-cert.pem -CAkey ca-ecc-key.pem -out server-ecc.pem
openssl x509 -req -in server-ecc.csr -days 1000 -extfile wolfssl.cnf -extensions server_ecc -CA ca-ecc-cert.pem -CAkey ca-ecc-key.pem -set_serial 03 -out server-ecc.pem
check_result $? "Step 2"
rm server-ecc.csr
openssl x509 -in server-ecc.pem -text > tmp.pem
check_result $? "Step 3"
mv tmp.pem server-ecc.pem
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
###### update the self-signed server-ecc-comp.pem ##########
############################################################
echo "Updating server-ecc-comp.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nMontana\nBozeman\nElliptic - comp\nServer ECC-comp\nwww.wolfssl.com\ninfo@wolfssl.com\n.\n.\n" | openssl req -new -key ecc-key-comp.pem -nodes -out server-ecc-comp.csr
echo -e "US\\nMontana\\nBozeman\\nElliptic - comp\\nServer ECC-comp\\nwww.wolfssl.com\\ninfo@wolfssl.com\\n.\\n.\\n" | openssl req -new -key ecc-key-comp.pem -config ./wolfssl.cnf -nodes -out server-ecc-comp.csr
check_result $? "Step 1"
openssl x509 -req -in server-ecc-comp.csr -days 1000 -extfile wolfssl.cnf -extensions wolfssl_opts -signkey ecc-key-comp.pem -out server-ecc-comp.pem
check_result $? "Step 2"
rm server-ecc-comp.csr
openssl x509 -in server-ecc-comp.pem -text > tmp.pem
check_result $? "Step 3"
mv tmp.pem server-ecc-comp.pem
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
############## create the client-ca.pem file ###############
############################################################
echo "Updating client-ca.pem"
echo ""
cat client-cert.pem client-ecc-cert.pem > client-ca.pem
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
###### update the self-signed ecc-privOnlyCert.pem #########
############################################################
echo "Updating ecc-privOnlyCert.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e ".\n.\n.\nWR\n.\nDE\n.\n.\n.\n" | openssl req -new -key ecc-privOnlyKey.pem -nodes -out ecc-privOnly.csr
echo -e ".\\n.\\n.\\nWR\\n.\\nDE\\n.\\n.\\n.\\n" | openssl req -new -key ecc-privOnlyKey.pem -config ./wolfssl.cnf -nodes -out ecc-privOnly.csr
check_result $? "Step 1"
openssl x509 -req -in ecc-privOnly.csr -days 1000 -signkey ecc-privOnlyKey.pem -out ecc-privOnlyCert.pem
check_result $? "Step 2"
rm ecc-privOnly.csr
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
###### update the self-signed test/digsigku.pem ##########
############################################################
echo "Updating test/digsigku.pem"
echo ""
#pipe the following arguments to openssl req...
echo -e "US\nWashington\nSeattle\nFoofarah\nArglebargle\nfoobarbaz\ninfo@worlss.com\n.\n.\n" | openssl req -new -key ecc-key.pem -nodes -sha1 -out digsigku.csr
echo -e "US\\nWashington\\nSeattle\\nFoofarah\\nArglebargle\\nfoobarbaz\\ninfo@worlss.com\\n.\\n.\\n" | openssl req -new -key ecc-key.pem -config ./wolfssl.cnf -nodes -sha1 -out digsigku.csr
check_result $? "Step 1"
openssl x509 -req -in digsigku.csr -days 1000 -extfile wolfssl.cnf -extensions digsigku -signkey ecc-key.pem -sha1 -set_serial 16393466893990650224 -out digsigku.pem
check_result $? "Step 2"
rm digsigku.csr
openssl x509 -in digsigku.pem -text > tmp.pem
check_result $? "Step 3"
mv tmp.pem digsigku.pem
mv digsigku.pem test/digsigku.pem
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
########## make .der files from .pem files #################
############################################################
echo "Creating der formatted certs..."
echo ""
openssl x509 -inform PEM -in \1024/client-cert.pem -outform DER -out \1024/client-cert.der
openssl x509 -inform PEM -in \1024/server-cert.pem -outform DER -out \1024/server-cert.der
openssl x509 -inform PEM -in \1024/ca-cert.pem -outform DER -out \1024/ca-cert.der
openssl x509 -inform PEM -in ./1024/client-cert.pem -outform DER -out ./1024/client-cert.der
check_result $? "Der Cert 1"
openssl x509 -inform PEM -in ./1024/server-cert.pem -outform DER -out ./1024/server-cert.der
check_result $? "Der Cert 2"
openssl x509 -inform PEM -in ./1024/ca-cert.pem -outform DER -out ./1024/ca-cert.der
check_result $? "Der Cert 3"
openssl x509 -inform PEM -in ca-cert.pem -outform DER -out ca-cert.der
check_result $? "Der Cert 4"
openssl x509 -inform PEM -in ca-ecc-cert.pem -outform DER -out ca-ecc-cert.der
check_result $? "Der Cert 5"
openssl x509 -inform PEM -in ca-ecc384-cert.pem -outform DER -out ca-ecc384-cert.der
check_result $? "Der Cert 6"
openssl x509 -inform PEM -in client-cert.pem -outform DER -out client-cert.der
check_result $? "Der Cert 7"
openssl x509 -inform PEM -in server-cert.pem -outform DER -out server-cert.der
check_result $? "Der Cert 8"
openssl x509 -inform PEM -in client-ecc-cert.pem -outform DER -out client-ecc-cert.der
check_result $? "Der Cert 9"
openssl x509 -inform PEM -in server-ecc-rsa.pem -outform DER -out server-ecc-rsa.der
check_result $? "Der Cert 10"
openssl x509 -inform PEM -in server-ecc.pem -outform DER -out server-ecc.der
check_result $? "Der Cert 11"
openssl x509 -inform PEM -in server-ecc-comp.pem -outform DER -out server-ecc-comp.der
check_result $? "Der Cert 12"
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
###### update the ecc-rsa-server.p12 file ##################
############################################################
echo "Updating ecc-rsa-server.p12 (password is \"\")"
echo ""
echo "" | openssl pkcs12 -des3 -descert -export -in server-ecc-rsa.pem -inkey ecc-key.pem -certfile server-ecc.pem -out ecc-rsa-server.p12 -password stdin
check_result $? "Step 1"
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
###### update the test-servercert.p12 file #################
############################################################
echo "Updating test-servercert.p12 (password is \"wolfSSL test\")"
echo ""
echo "wolfSSL test" | openssl pkcs12 -des3 -descert -export -in server-cert.pem -inkey server-key.pem -certfile ca-cert.pem -out test-servercert.p12 -password stdin
check_result $? "Step 1"
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
###### calling gen-ext-certs.sh ##################
############################################################
echo "Calling gen-ext-certs.sh"
echo ""
cd ..
cd .. || exit 1
./certs/test/gen-ext-certs.sh
cd ./certs
check_result $? "gen-ext-certs.sh"
cd ./certs || { echo "Couldn't cd to certs directory"; exit 1; }
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
###### calling gen-badsig.sh ##################
############################################################
echo "Calling gen-badsig.sh"
echo ""
cd ./test
cd ./test || { echo "Failed to switch to dir ./test"; exit 1; }
./gen-badsig.sh
cd ../
check_result $? "gen-badsig.sh"
cd ../ || exit 1
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
########## generate ocsp certs ######################
############################################################
@@ -394,74 +518,88 @@ function run_renewcerts(){
# guard against recursive calls to renewcerts.sh
if [ -d ocsp ]; then
cd ./ocsp
echo "Execute ./renewcerts.sh..."
cd ./ocsp || { echo "Failed to switch to dir ./ocsp"; exit 1; }
echo "Execute ocsp/renewcerts.sh..."
./renewcerts.sh
cd ../
check_result $? "renewcerts.sh"
cd ../ || exit 1
else
echo "Error could not find ocsp directory"
exit 1
fi
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
###### calling assemble-chains.sh ##################
############################################################
echo "Calling assemble-chains.sh"
echo ""
cd ./test-pathlen
cd ./test-pathlen || { echo "Failed to switch to dir ./test-pathlen";
exit 1; }
./assemble-chains.sh
cd ../
check_result $? "assemble-chains.sh"
cd ../ || exit 1
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
########## store DER files as buffers ######################
############################################################
echo "Changing directory to wolfssl root..."
echo ""
cd ../
cd ../ || exit 1
echo "Execute ./gencertbuf.pl..."
echo ""
./gencertbuf.pl
check_result $? "gencertbuf.pl"
echo "End of section"
echo "---------------------------------------------------------------------"
############################################################
########## generate the new crls ###########################
############################################################
echo "Change directory to wolfssl/certs"
echo ""
cd certs
cd ./certs || { echo "Failed to switch to dir ./certs"; exit 1; }
echo "We are back in the certs directory"
echo ""
echo "Updating the crls..."
echo ""
cd crl
cd ./crl || { echo "Failed to switch to dir ./crl"; exit 1; }
echo "changed directory: cd/crl"
echo ""
./gencrls.sh
check_result $? "gencrls.sh"
echo "ran ./gencrls.sh"
echo ""
############################################################
########## generate PKCS7 bundles ##########################
############################################################
echo "Changing directory to wolfssl certs..."
echo ""
cd ../ || exit 1
echo "Creating test-degenerate.p7b..."
echo ""
openssl crl2pkcs7 -nocrl -certfile ./client-cert.pem -out test-degenerate.p7b -outform DER
check_result $? ""
echo "End of section"
echo "---------------------------------------------------------------------"
#cleanup the file system now that we're done
echo "Performing final steps, cleaning up the file system..."
echo ""
rm ../wolfssl.cnf
}
#function for restoring a previous configure state
function restore_config(){
mv tmp.status config.status
mv tmp.options.h wolfssl/options.h
make clean
make -j 8
echo "End of Updates. Everything was successfully updated!"
echo "---------------------------------------------------------------------"
}
#function for copy and pasting ntru updates
function move_ntru(){
cp ntru-cert.pem certs/ntru-cert.pem
cp ntru-key.raw certs/ntru-key.raw
cp ntru-cert.der certs/ntru-cert.der
move_ntru(){
cp ntru-cert.pem certs/ntru-cert.pem || exit 1
cp ntru-key.raw certs/ntru-key.raw || exit 1
cp ntru-cert.der certs/ntru-cert.der || exit 1
}
###############################################################################
@@ -469,7 +607,7 @@ function move_ntru(){
###############################################################################
#start in root.
cd ../
cd ../ || exit 1
#if HAVE_NTRU already defined && there is no argument
if grep HAVE_NTRU "wolfssl/options.h" && [ -z "$1" ]
then
@@ -477,18 +615,27 @@ then
#run the function to renew the certs
run_renewcerts
# run_renewcerts will end in the wolfssl/certs/crl dir, backup to root.
cd ../../
cd ../ || exit 1
CURRDIR=${PWD##*/}
if [ "$CURRDIR" = "certs" ]; then
cd ../ || exit 1
else
echo "We are not in the right directory! Abort."
exit 1
fi
echo "changed directory to wolfssl root directory."
echo ""
echo ""
echo "Enter directory to ed25519 certificate generation example."
echo "Can be found at https://github.com/wolfSSL/wolfssl-examples"
read ED25519_DIR
read -r ED25519_DIR
if [ -d "${ED25519_DIR}" ]; then
pushd ./certs/ed25519
./gen-ed25519.sh ${ED25519_DIR}
popd
pushd ./certs/ed25519 || { echo "Failed to push certs/ed25519";
exit 1; }
./gen-ed25519.sh "${ED25519_DIR}"
check_result $? "./gen-ed25519.sh"
popd || exit 1
else
echo "Unable to find directory ${ED25519_DIR}"
exit 1
@@ -499,8 +646,13 @@ then
############################################################
# We cannot assume that user has certgen and keygen enabled
CFLAG_TMP="-DWOLFSSL_STATIC_RSA"
export CFLAGS=${CFLAG_TMP}
./configure --with-ntru --enable-certgen --enable-keygen
check_result $? "configure for ntru"
make check
check_result $? "make check with ntru"
export CFLAGS=""
#copy/paste ntru-certs and key to certs/
move_ntru
@@ -516,10 +668,12 @@ elif [ ! -z "$1" ]; then
echo ""
echo "Enter directory to ed25519 certificate generation example."
echo "Can be found at https://github.com/wolfSSL/wolfssl-examples"
read ED25519_DIR
pushd ./certs/ed25519
./gen-ed25519.sh ${ED25519_DIR}
popd
read -r ED25519_DIR
pushd ./certs/ed25519 || { echo "failed to push ./certs/ed25519";
exit 1; }
./gen-ed25519.sh "${ED25519_DIR}"
check_result $? "./gen-ed25519.sh"
popd || exit 1
#valid argument print out other valid arguments
elif [ "$1" == "-h" ] || [ "$1" == "-help" ]; then
echo ""
@@ -541,18 +695,24 @@ elif [ ! -z "$1" ]; then
else
echo "Saving the configure state"
echo ""
cp config.status tmp.status
cp wolfssl/options.h tmp.options.h
cp config.status tmp.status || exit 1
cp wolfssl/options.h tmp.options.h || exit 1
echo "Running make clean"
echo ""
make clean
check_result $? "make clean"
#attempt to define ntru by configuring with ntru
echo "Configuring with ntru, enabling certgen and keygen"
echo ""
CFLAG_TMP="-DWOLFSSL_STATIC_RSA"
export CFLAGS=${CFLAG_TMP}
./configure --with-ntru --enable-certgen --enable-keygen
check_result $? "configure for ntru"
make check
check_result $? "make check with ntru"
export CFLAGS=""
# check options.h a second time, if the user had
# ntru installed on their system and in the default
@@ -565,7 +725,14 @@ else
if grep HAVE_NTRU "wolfssl/options.h"; then
run_renewcerts
#run_renewcerts leaves us in wolfssl/certs/crl, backup to root
cd ../../
cd ../ || exit 1
CURRDIR=${PWD##*/}
if [ "$CURRDIR" = "certs" ]; then
cd ../ || exit 1
else
echo "We are not in the right directory! Abort."
exit 1
fi
echo "changed directory to wolfssl root directory."
echo ""
@@ -576,10 +743,12 @@ else
# restore previous configure state
restore_config
check_result $? "restoring old configuration"
else
# restore previous configure state
restore_config
check_result $? "restoring old configuration"
echo ""
echo "ntru is not installed at the default location,"

View File

@@ -11,13 +11,6 @@ oid_section = new_oids
tsa_policy1 = 1.2.3.4.1
tsa_policy2 = 1.2.3.4.5.6
tsa_policy3 = 1.2.3.4.5.7
businessCategory=2.5.4.15
streetAddress=2.5.4.9
stateOrProvinceName=2.5.4.8
countryName=2.5.4.6
jurisdictionOfIncorporationLocalityName=1.3.6.1.4.1.311.60.2.1.1
jurisdictionOfIncorporationStateOrProvinceName=1.3.6.1.4.1.311.60.2.1.2
jurisdictionOfIncorporationCountryName=1.3.6.1.4.1.311.60.2.1.3
####################################################################
[ ca ]

Some files were not shown because too many files have changed in this diff Show More