Commit Graph

18431 Commits

Author SHA1 Message Date
Sean Parkinson
dad62fc182 pk.c: rework DH API and improve PEM read/write
Reorganized the DH APIs into groups.
Reworked all DH APIs.
Improved testing of DH API.

Implemented wolfSSL_PEM_read_RSAPublicKey() and
wolfSSL_PEM_write_RSA_PUBKEY().
Fix public key PEM write implementations to use the correct
header/footer names.
Added support for "RSA PUBLIC KEY" in header and footer in DerToPemEx().

Reworked PEM read/write APIs to be independent. No longer create an EVP
to use common function - common functionality refectored out.
Similarly file APIs don't create a BIO and call the partner APIs.

Improved testing of PEM read/write APIs.

Generic read BIO from memory BIO now returns the buffer instead of
allocating memory and reading.
No longer reading chunks when a file BIO.

Added wolfssl_make_rng() to create or get get global random. All RSA and
DH APIs now use this. DH_generate_parameters() creates a random object
and use global on error rather than just using global random.

Changed implementations to use BIO_new_fp() instead of create a new BIO
and setting file pointer.
2022-10-26 10:28:20 +10:00
JacobBarthelmeh
0f9279ce52 Merge pull request #5684 from SparkiDev/ssl_sess_version_check
SSL session retrieval: check protocol version
2022-10-25 17:29:54 -06:00
Daniel Pouzzner
084fabc733 Merge pull request #5731 from SparkiDev/armv7a_aes_fixup
AES-CBC decrypt ARMv8 no hw crypto: fixes
2022-10-25 17:23:45 -05:00
Hayden Roche
5c3b3e6ede Merge pull request #5733 from ejohnstown/assert-whitespace 2022-10-25 13:45:54 -07:00
John Safranek
e803e5916c Assert Consistency
1. Make whitespace in asserts consistent.
2. Added typecasting of the string inputs for AssertStr.
2022-10-25 11:42:51 -07:00
Hayden Roche
e7a121325b Merge pull request #5720 from julek-wolfssl/nid-defines 2022-10-25 10:34:59 -07:00
David Garske
d052feeff2 Merge pull request #5675 from embhorn/zd14968
Fix coverity issues
2022-10-25 10:08:40 -07:00
Hayden Roche
2b72a50688 Merge pull request #5662 from Uriah-wolfSSL/haproxy-update-2.6.0 2022-10-25 07:47:54 -07:00
Juliusz Sosinowicz
2ae815e2ee Use WOLFSSL_ERROR_MSG for error logs 2022-10-25 13:13:44 +02:00
Juliusz Sosinowicz
55091c6464 Add small test 2022-10-25 13:13:14 +02:00
David Garske
370b9f4d40 Merge pull request #5729 from JacobBarthelmeh/Benchmark
fix for define guards in benchmark app
2022-10-24 19:54:35 -07:00
Sean Parkinson
e9a7c36c7b AES-CBC decrypt ARMv8 no hw crypto: fixes
Handle in and out buffer being the same.
2022-10-25 11:32:47 +10:00
Sean Parkinson
9d1ed9c5d1 Merge pull request #5728 from douzzer/20221024-armv7a-enable-all
20221024-armv7a-enable-all
2022-10-25 11:28:31 +10:00
Jacob Barthelmeh
65d7d43497 use a check for if defined rather than value of macro 2022-10-24 16:32:19 -06:00
Daniel Pouzzner
3677253b55 fixes and comments for buildability, warnings, and clarity, re WOLFSSL_ARMASM_NO_HW_CRYPTO, in configure.ac, wolfcrypt/src/port/arm/armv8-aes.c, and wolfcrypt/test/test.c. 2022-10-24 17:31:48 -05:00
Jacob Barthelmeh
eb4c3e06eb revert NO_MAIN_DRIVER behavior in benchmark app 2022-10-24 16:27:23 -06:00
Uriah Pollock
19e30b081f Resolved sanitizer issue. 2022-10-24 16:27:18 -05:00
Hayden Roche
010fb64f74 Merge pull request #5718 from kareem-wolfssl/fpMaxBits 2022-10-24 12:27:59 -07:00
David Garske
53bc10eb76 Merge pull request #5723 from Anthony-Tatowicz/ECC384-benchmark
Add SECP384 and SECP521 to bench
2022-10-22 11:03:26 -07:00
David Garske
3aec9a15ce Merge pull request #5726 from ejohnstown/nucleus-thread
Nucleus Thread Types
2022-10-21 20:22:39 -07:00
Anthony Tatowicz
1f82e90dbf Add SECP384 and SECP521 to bench 2022-10-21 18:50:59 -05:00
Hayden Roche
4859a00c2a Merge pull request #5698 from SparkiDev/aes_arm32_no_hw 2022-10-21 12:34:22 -07:00
Hayden Roche
a60a15d544 Merge pull request #5721 from philljj/zd15011 2022-10-21 12:32:03 -07:00
John Safranek
7c8dafab2f Nucleus Thread Types
Add a type block for Nucleus RTOS's thread types.
2022-10-21 11:40:59 -07:00
Uriah Pollock
6aff27c5c8 Resolved valgrind issue. Updated ASN1_TIME usage per feedback.
Refactored wolfSSL_d2i_OCSP_CERTID per feedback.
2022-10-21 13:16:32 -05:00
jordan
e409acc0f7 cite RFC 5280 in DIST_POINT_NAME comment 2022-10-21 12:38:04 -05:00
David Garske
378d475c5f Merge pull request #5724 from Anthony-Tatowicz/doc-fixes
Doc Example Typo Fix
2022-10-21 09:27:01 -07:00
Anthony Tatowicz
92c7faafb7 Doc typo fix 2022-10-20 17:17:24 -05:00
Hayden Roche
1bde7b3d47 Merge pull request #5665 from SparkiDev/sp_msvc_x64_asm_fix 2022-10-20 15:09:29 -07:00
Hayden Roche
fdffdd241f Merge pull request #5711 from philljj/add_SSL_set1_host 2022-10-20 15:02:24 -07:00
jordan
bfe8b9b76c correct DIST_POINT_NAME type value 2022-10-20 15:10:36 -05:00
Hayden Roche
3591ce773c Merge pull request #5719 from ejohnstown/dh-test-key2 2022-10-20 10:29:26 -07:00
Juliusz Sosinowicz
3339443260 Change NID_* from enum to #define 2022-10-20 17:07:32 +02:00
John Safranek
31222618b9 DH Test Keys
1. Add a flag to the DH test to indicate that the second key is initted.
2. Add a flag to the DH test to indicate that the RNG is initted.

Fixes an issue where the DH wolfCrypt test can crash or lock up when
the DH parameters file is missing. Localized to the test only.
2022-10-19 16:15:53 -07:00
Kareem
5892655ab0 Don't override user-set FP_MAX_BITS when building FIPSv2. 2022-10-19 11:51:07 -07:00
Hayden Roche
86605c92ce Merge pull request #5714 from ejohnstown/inline-guard 2022-10-19 08:33:07 -07:00
jordan
90eefc2824 fix unit test when RSA disabled 2022-10-18 21:03:41 -05:00
Kaleb Himes
930604f195 Merge pull request #5712 from haydenroche5/user_settings_asm
Make some improvements to user_settings_asm.h.
2022-10-18 17:10:39 -06:00
JacobBarthelmeh
7399f72fb3 Merge pull request #5715 from douzzer/20221018-linux6v1-and-WOLFSSL_CALLBACKS-fixes
20221018-linux6v1-and-WOLFSSL_CALLBACKS-fixes
2022-10-18 15:30:05 -06:00
Hayden Roche
44eb6e447e Merge pull request #5713 from kaleb-himes/fix-fipsv2-win10 2022-10-18 13:02:59 -07:00
Daniel Pouzzner
895a2e1ac5 WOLFSSL_CALLBACKS codepaths: fixes for bugprone-unused-return-value, bugprone-macro-parentheses, readability-named-parameter, and clang-analyzer-deadcode.DeadStores 2022-10-18 13:34:42 -05:00
Daniel Pouzzner
c8c107a09e linuxkm/: fixes to deal with kernel 6.1+ show_free_areas() mess. 2022-10-18 13:34:24 -05:00
John Safranek
353a8a0275 Inline Function Guard
Fixed an inline function aes.c that was included, but never used. Added
similar preprocessor guard around it as when it is used.
2022-10-18 10:51:51 -07:00
kaleb-himes
c25e9d9994 FIPSv2 builds on win10 adjust for new fastmath default in settings.h 2022-10-18 10:50:01 -06:00
Hayden Roche
e3ced9f9ae Make some improvements to user_settings_asm.h.
For the CMake and autotools flows, enabling user_settings.h will define the
macro WOLFSSL_USER_SETTINGS_ASM. This will cause the generated
user_settings_asm.h to be included in the .S assembly files. If the user is
building without autotools or CMake, these files will include user_settings.h
directly, unless WOLFSSL_USER_SETTINGS_ASM is defined.
2022-10-18 09:20:06 -07:00
Hayden Roche
b7c4ddba72 Merge pull request #5663 from lealem47/scan_build 2022-10-18 08:10:33 -07:00
Hayden Roche
c5df62e647 Merge pull request #5705 from icing/earlydata-client 2022-10-18 07:26:46 -07:00
Stefan Eissing
9726d1f6eb Allowing use of SSL/CTX_set_max_early_data() for client side.
- updating english doc and test cases
2022-10-18 10:40:18 +02:00
Sean Parkinson
591101fd8b AES for ARM32 without using crypto hardware instructions
AES-ECB, AES-CBC, AES-CTR, AES-GCM, AES-CCM
Fix ldrd and strd to use even first first register and have
second register be next after first.
2022-10-18 08:31:53 +10:00
Lealem Amedie
327b66d3ed Miscellaneous fixes from scan-build and KDF refactor & small build fixes 2022-10-17 14:34:08 -07:00