137 Commits

Author SHA1 Message Date
Jacob Barthelmeh
749425e1e8 first pre alpha code for QNX + CAAM
manual run of RNG init and JDKEK print

job ring does initial rng

is successful on some red key blob operations

caam red key blob test pass

ecdsa sign/verify

ecdsa ecdh/sign/verify with black secure key

ecdsa ecdh/sign/verify with black secure key

initial cmac addition

initial cmac addition

black blob encap

black keys with cmac

add invalidate memory

refactoring and clean up

more code cleanup

add files for dist and remove some printf's

remove unneeded macro guard

use resource manager
2021-03-03 18:45:40 +07:00
Elms
c17597a4fb build: arbitrary path for make check
To support builds in other directories, unit.test and wolfcrypt test
must be aware of the source and build directory.
2021-02-05 12:10:32 -08:00
Hayden Roche
8f6c21d600 CMake improvements.
- Begin adding options to enable/disable different features.
- Increase minimum CMake version to 3.2.
- Support installation of the built files.
- Add checks for necessary include files, functions etc.
- Generate options.h and config.h.
- Use GNUInstallDirs to support installation, which is designed to be somewhat
  cross-platform.
- Export wolfssl CMake target during installation, so others using CMake can
  link against wolfssl easily.
- Disallow in-source builds.
- Place the generation of BUILD_* flags (controlled with AM_CONDITIONALs
  in configure.ac) in a separate function in functions.cmake,
  generate_build_flags.
- Implement the logic to conditionally add source files from
  src/include.am in a function in functions.cmake, generate_lib_src_list.
- Exclude tls_bench from Windows. Doesn't compile with MSVC. WIP.
- Update INSTALL with latest CMake build instructions.
- Add a cmake/include.am to ensure CMake files get added to the distribution.
2020-11-13 11:25:04 -06:00
Hayden Roche
31b6c507f9 Tweak CMakeLists.txt
- Add generated CMake files/directories to .gitignore.
- Use lowercase for CMake commands, UPPERCASE for variables.
- Favor the CMake "option" command over SET(... CACHE BOOL ...).
- Use CMAKE_CURRENT_SOURCE_DIR in place of CMAKE_CURRENT_BINARY_DIR.
- Use CMAKE_USE_PTHREADS_INIT instead of CMAKE_HAVE_PTHREAD_H.
- Use target_include_directories on the wolfssl library target instead of include_directories.
2020-10-19 16:07:48 -05:00
Daniel Pouzzner
2c564a7728 update .gitignore with more artifacts from linuxkm build. 2020-09-23 18:32:16 -05:00
Daniel Pouzzner
1aa15632ce initial buildability of full libwolfssl.ko loadable kernel module for Linux via ./configure --enable-linuxkm && make. 2020-09-23 18:32:15 -05:00
Daniel Pouzzner
14e3da9206 .gitignore: add *~ for emacs backup files. 2020-09-23 18:32:15 -05:00
Daniel Pouzzner
3c2155f4a9 linuxkm WIP -- update for kernels 4.9.x (LTS representative) and 5.8.x (latest). 2020-09-23 18:32:15 -05:00
David Garske
6425ebb60e Linux Kernel Module support using "--enable-linuxkm". 2020-09-23 18:32:15 -05:00
Sean Parkinson
0232239959 Ignore test-log-dump-to-file.txt
Sometimes left behind by unit.test
2020-08-10 12:46:53 +10:00
David Garske
2bae1d27a1 wolfSSL Compatibility support for OpenVPN
* Adds compatibility API's for:
	* `sk_ASN1_OBJECT_free`
	* `sk_ASN1_OBJECT_num`
	* `sk_ASN1_OBJECT_value`
	* `sk_X509_OBJECT_num`
	* `sk_X509_OBJECT_value`
	* `sk_X509_OBJECT_delete`
	* `sk_X509_NAME_find`
	* `sk_X509_INFO_free`
	* `BIO_get_len`
	* `BIO_set_ssl`
	* `BIO_should_retry` (stub)
	* `X509_OBJECT_free`
	* `X509_NAME_get_index_by_OBJ`
	* `X509_INFO_free`
	* `X509_STORE_get0_objects`
	* `X509_check_purpose` (stub)
	* `PEM_read_bio_X509_CRL`
	* `PEM_X509_INFO_read_bio`
	* `ASN1_BIT_STRING_new`
	* `ASN1_BIT_STRING_free`
	* `ASN1_BIT_STRING_get_bit`
	* `ASN1_BIT_STRING_set_bit`
	* `DES_check_key_parity`
	* `EC_GROUP_order_bits`
	* `EC_get_builtin_curves`
	* `EVP_CIPHER_CTX_cipher`
	* `EVP_PKEY_get0_EC_KEY`
	* `EVP_PKEY_get0_RSA`
	* `EVP_PKEY_get0_DSA` (stub)
	* `HMAC_CTX_new`
	* `HMAC_CTX_free`
	* `HMAC_CTX_reset`
	* `HMAC_size`
	* `OBJ_txt2obj`
	* `RSA_meth_new`
	* `RSA_meth_free`
	* `RSA_meth_set_pub_enc`
	* `RSA_meth_set_pub_dec`
	* `RSA_meth_set_priv_enc`
	* `RSA_meth_set_priv_dec`
	* `RSA_meth_set_init`
	* `RSA_meth_set_finish`
	* `RSA_meth_set0_app_data`
	* `RSA_get_method_data`
	* `RSA_set_method`
	* `RSA_get0_key`
	* `RSA_set0_key`
	* `RSA_flags`
	* `RSA_set_flags`
	* `RSA_bits`
	* `SSL_CTX_set_ciphersuites`
	* `SSL_CTX_set_security_level` (stub)
	* `SSL_export_keying_material` (stub)
	* `DSA_bits` (stub)
* Changes to support password callback trial and NO_PASSWORD. Replaces PR #2505.
* Renamed `wolfSSL_SSL_CTX_get_client_CA_list` to `wolfSSL_CTX_get_client_CA_list`.
* Cleanup of "sk" compatibility.
2019-11-11 14:58:23 -08:00
Hideki Miyazaki
5c6f6fdb7d Renesas TSIP Support
merged from private repo

removed unneccessary #include
make line as 80 characters
added simple tls server
Disable TLS-linked API use when being SERVER SIDE, still use certificate verify API
Added utility tools, generate signature arrays etc
added vars to store tsip hmac keys
fix build failure when disabling dc_printf
2019-09-19 11:18:52 +09:00
Jacob Barthelmeh
589b056ecb update gitignore and location of test cleanup 2019-07-23 09:27:39 -06:00
David Garske
0bcae86038 Fixes for wolfCrypt benchmark and test Visual Studio projects. Fixes for benchmark.c compile errors in bench_hmac with Visual Studio. Added README.md files for benchmark and test. 2019-07-18 11:39:59 -07:00
Juliusz Sosinowicz
a48981c3c6 Chacha20 ARM optimization 2019-06-10 19:21:46 +02:00
kaleb-himes
764b783317 Add rules to copy wolfio.h, wolfmath.h and mem_track.h as well as fix up settings for clang and iPhone XR 2019-03-12 10:36:12 -06:00
abrahamsonn
74b8c2795b Merge branch 'master' of https://github.com/wolfssl/wolfssl into doxygen-update 2018-11-28 11:35:17 -07:00
Chris Conlon
4295db218a add CMS SignedData support for detached signatures 2018-11-16 15:54:32 -07: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
40ef246b1f add CMS AuthEnvelopedData support for unauthAttrs 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
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
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
John Safranek
05ca60a266 Add a version resource to the wolfSSL library for Visual Studio builds. 2018-09-28 11:46:22 -07: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
David Garske
2c3475c1d6 Added new build option --enable-memtest or WOLFSSL_FORCE_MALLOC_FAIL_TEST which enables random malloc failures for testing. This test supresses the abort() calls to detect seg faults. A new script ./scripts/memtest.sh starts the test. If an issue is found it can be reviewed with the ./scripts/memtest.txt log and reproduced using the seed printed at top of unit test as --- RNG MALLOC FAIL AT 295--- and rerun using ./tests/unit.test 295. 2018-07-30 13:53:35 -07:00
John Safranek
ed17963f21 Add fipsv2.c to the gitignore file. 2018-07-06 16:08:16 -07:00
John Safranek
5e516cc2e0 Merge branch 'master' into fipsv2 2018-06-12 10:10:50 -07:00
David Garske
cf9c352d91 Fixes for Arduino. Don't use C99 for Arduino. Enhanced the script to create as new folder in IDE/ARDUINO/wolfSSL. Updated README.md. 2018-06-08 14:27:54 -07:00
John Safranek
4f1dd3b9a7 Test Fixes
1. Update gitignore with some more VS outputs.
2. Update the Windows IDE user settings with FIPSv2 settings.
3. Remove redundant _InitHmac() function from ssl.c.
4. In wc_DhGenerateParams(), initialize the groupSz and bufSz to 0.
5. In wc_DhExportParamsRaw(), initialize pLen, qLen, and gLen to 0.
6. In wc_MakeRsaKey(), initialize isPrime to 0.
7. In ecc_test_make_pub(), initialize exportBuf and tmp to NULL and initialize the ECC key before any chance of trying to free it.
8. In fips_test.h header, update types.h include to use the wolfCrypt types rather than ctaocrypt types.
9. In fips_test.h header, change the visibility tags on all the function prototypes to use the WOLFSSL tags rather than CYASSL.
10. Change the wolfCrypt visibility tags to use CyaSSL's tags for old FIPS and the regular tags for new FIPS and non-FIPS builds.
2018-05-16 15:47:13 -04:00
John Safranek
19da916102 Test Fixes
1. Removed redundant forward declaration of RsaKey from hmac.h.
2. Updated gitignore with the first and last files.
3. Updated autogen with touching the first and last files.
2018-05-16 15:47:12 -04:00
Chris Conlon
ad53037852 add CAVP selftest option for special build 2018-02-23 10:14:56 -07:00
David Garske
3e05118995 * Added the tls_bench example to the build output when threading is supported.
* Fixed some `tls_bench` build issues with various configure options.
* Moved the `WOLFSSL_PACK` and `WC_NORETURN` macros into types.h.
* Added support for `__builtin_bswap32` and `__builtin_bswap64`. Since the performance of the builtins varries by platform its off by default, but can be enabled by customer using `WOLF_ALLOW_BUILTIN`. Quick check on x86 showed the 32-bit swap performance matched, but 64-bit swap was slower.
2018-02-07 11:13:13 -08:00
John Safranek
6fdbe02291 ECC FIPS
Add the ECC API to the FIPS boundary. Included are ECDHE and ECDSA.
2018-01-10 11:29:01 -08:00
Chris Conlon
43ef843257 add ECC private key export for unencrypted PKCS#8 2017-12-13 09:44:36 -07:00
David Garske
bababf115a Moved to IDE/XCODE. Fixed build warnings with xcode. Updated the user_settings.h to support fast math, ECC, timing resistance, single precision math, ARMv8, SHA3, ChaCha20/Poly1305, Ed/Curve25519 and ensure default disables are defined. Added Xcode iOS benchmark example. Runs wolfCrypt test, wolfCrypt benchmark and the new TLS benchmark by cipher suite. 2017-12-07 11:02:19 +01:00
David Garske
024c8725ad Testing improvements for cert gen and TLS cert validation:
* Fixes to support certificate generation (`WOLFSSL_CERT_GEN`) without RSA enabled.
* Added new ECC CA for 384-bit tests.
* Created new server cert chain (ECC CA for 256-bit that signs server-ecc.pem)
* Created new `./certs/ecc/genecc.sh` script for generating all ECC CA's, generated server cert req (CSR), signing with CA and the required CRL.
* Moved the wolfCrypt ECC CA / ECC cert gen test into `ecc_test` as `ecc_test_cert_gen`.
* Refactor duplicate code that saves DER to disk, converts DER to PEM and saves PEM to disk into SaveDerAndPem function.
* Changed `ecc_test_make_pub` and `ecc_test_key_gen` to use XMALLOC for temp buffers (uses heap instead of stack).
* Cleanup to combine all certificate subject information into global `certDefaultName`.
* Updated cert request info to use wolfSSL instead of Yassl.
* Cleanup to combine keyUsage into `certKeyUsage` and `certKeyUsage2`.
* Re-number error codes in rsa_test.
* Moved the certext_test after the ecc_test, since it uses a file generated in `ecc_test_cert_gen`.
2017-10-19 16:17:51 -07:00
John Safranek
931fbde41d iOS/Android
1. Updated the iOS user_settings.h with the hardened settings.
2. Updated the iOS project file with Xcode's suggested settings.
3. Added an IDE project for building wolfSSL for Android using Visual Studio 2017.
2017-09-26 09:08:34 -07:00
David Garske
4e735631e7 Fixes for PIC32MZ:
* Adds crypto HW support for AES Direct and AES CCM.
* Fixes to enable PIC32MZ hardware hashing where updates are cached via heap buffer and final performs single operations against hardware.
* Fix for benchmark with 1024-bit certs passing in wrong size for `wc_RsaPrivateDecrypt` when using `USE_CERT_BUFFERS_1024`.
* Fix to resolve missing `strncasecmp` for the Microchip XC32. Workaround to use case sensitive version instead. This error occurred when building with HAVE_ECC defined in Harmony with XC32.
* Cleanup of the PIC32MZ crypto and hashing hardware code. Replace `pic32mz-hash.c` with `pic32mz-crypt.c`
* Add user_settings.h for mplabx and mcapi examples.
* Sync up with Harmony changes for MCAPI.
2017-08-01 12:42:09 -07:00
toddouska
7853440d89 Merge pull request #1015 from dgarske/config_ignore_cleanup
Improve the Git ignore formula for `config`
2017-07-11 15:42:08 -07:00
David Garske
cebcee34dd Improve the Git ignore formula for config. Fixes issue #1012. 2017-07-10 14:21:19 -07:00
Daniele Lacamera
6e6b341b46 Removed automatically generated file wolfssl.pc 2017-06-20 10:39:02 +02:00
Nickolas Lapp
1e94868432 Add LINUX SGX Support for building of wolfSSL static library. See README
in IDE/LINUX-SGX/README.md.
2017-06-13 17:34:45 -07:00
Chris Conlon
8d032081ae Merge pull request #767 from shihrer/hexiwear_pr
Hexiwear changes and KDS Project for Hexiwear platform
2017-05-02 07:31:41 -06:00
Chris Conlon
4f26e0341b allow different hashes with PKCS7 SignedData, cleanup conditional builds 2017-04-17 09:46:26 -06:00