David Garske
502cbc3847
Fix for STM32U5 hash/crypto support. ZD 14305.
2022-06-14 11:48:51 +02:00
Sean Parkinson
013066ca06
SP ASM: fixes for Wycheproof tests
...
ARM64 ASM: Fix P256 Montogomery Reduce.
Fix div to handle large dividend word.
2022-06-14 16:11:46 +10:00
David Garske
c0f49b57e1
Fix for ASN template parsing of `DecodeExtKeyUsage`. ZD 14344.
2022-06-13 16:50:20 -07:00
David Garske
af3a55a94c
Merge pull request #5220 from kaleb-himes/ZD14318
...
Resolves inter-library API conflict reported in ZD14318
2022-06-13 14:28:13 -07:00
David Garske
f401a3b53d
Merge pull request #5232 from cconlon/june10
...
test/benchmark.c: rename Android tag, reset vars in memcb_test()
2022-06-13 14:24:17 -07:00
Chris Conlon
364bf482eb
adjust wolfCrypt test/benchmark Android log TAG name, reset malloc/free counts in memcb_test()
2022-06-13 09:42:02 -06:00
David Garske
0b78961111
Merge pull request #5186 from SparkiDev/pk_c_rework_1
...
pk.c: rework
2022-06-13 08:35:09 -07:00
Jacob Barthelmeh
c59ec54713
initialize variable to fix warning
2022-06-10 06:22:54 -06:00
Jacob Barthelmeh
ba20f54b5b
add UPN other name parsing and updating skip
2022-06-09 21:32:55 -06:00
Sean Parkinson
890abfbefc
pk.c: rework
...
Re-order RSA functions.
Add comments to RSA functions.
Rework RSA function implementations.
2022-06-10 09:54:32 +10:00
David Garske
df673b987e
Merge pull request #5227 from LinuxJedi/embOS-emNET
...
Support for SEGGER embOS and emNET
2022-06-09 08:04:29 -07:00
Andrew Hutchings
190476dafe
Support for SEGGER embOS and emNET
...
Adds support for embOS memory and mutex functions. Also adds support for
emNET's error codes, it uses a BSD compatible TCP/IP stack for network
functions.
There is no easy native way to detect that you are compiling with emNET
or embOS so these require the user to define WOLFSSL_EMBOS /
WOLFSSL_EMNET.
2022-06-09 11:34:55 +01:00
Tesfa Mael
2748bfc737
Add a check in RsaPad_OAEP
2022-06-08 10:07:26 -07:00
kaleb-himes
37ee5e2540
Resolves inter-library API conflict reported in ZD14318
2022-06-07 14:48:27 -06:00
David Garske
fbb6faaa2f
Merge pull request #5191 from SparkiDev/sp_win_asm_xmm_nv
...
SP Winx64 ASM: XMM6-15 are non-volatile
2022-06-06 15:58:10 -07:00
David Garske
3c634e1f59
Merge pull request #5217 from SparkiDev/pk_enc_mem_2
...
ECC, DH: improve encrypted memory implementations
2022-06-06 15:27:10 -07:00
JacobBarthelmeh
4ffa63c938
Merge pull request #5216 from kojo1/static-mem
...
wc_MakeRsKey with Static memory pool
2022-06-06 14:42:32 -07:00
JacobBarthelmeh
2cd9ca0c8f
add support for asn template build
2022-06-06 09:42:03 -07:00
Sean Parkinson
0bcd38f7d8
ECC, DH: improve encrypted memory implementations
2022-06-06 08:40:09 +10:00
David Garske
eb28d38fa8
Merge pull request #5212 from kaleb-himes/various-warnings
...
Fix various warnings and an uninitialized XFILE
2022-06-04 17:10:17 -07:00
Takashi Kojo
1b9f922ec3
wc_MakeRsKey with static mem pool
2022-06-05 09:04:42 +09:00
TakayukiMatsuo
dbfa207344
Merge pull request #5116 from embhorn/zd14172
...
Fix TSIP build with NO_AES_CBC
2022-06-04 17:51:16 +09:00
David Garske
802e3127c0
Merge pull request #5145 from JacobBarthelmeh/caam
...
CAAM support with QNX i.MX8, add AES-CTR crypto callback
2022-06-03 15:24:10 -07:00
David Garske
2af09a7151
Merge pull request #5205 from haydenroche5/evp_cipher_aes_gcm
...
Fix another AES-GCM EVP control command issue.
2022-06-03 11:47:57 -07:00
David Garske
debb598499
Merge pull request #5008 from tmael/vx_6x
...
Add support for VxWorks 6.x
2022-06-03 09:40:39 -07:00
JacobBarthelmeh
fdaf418fe0
fix spelling and remove dead else statement
2022-06-03 09:21:27 -07:00
kaleb-himes
3bcdef1972
Fix various warnings and an uninitialized XFILE
2022-06-03 09:52:53 -06:00
TakayukiMatsuo
42754ce98b
Exclude calling some funcs when WOLFSSL_AEAD_ONLY is defined
2022-06-03 14:47:41 +09:00
Sean Parkinson
64eaf74e83
Merge pull request #5206 from dgarske/user_settings
...
Fixes for user settings with SP ASM and ED/Curve25519 small
2022-06-03 09:25:17 +10:00
David Garske
8307a55429
Fixes `--enable-usersettings` with SP ASM and ED/Curve25519 small `CURVED25519_SMALL`.
2022-06-02 14:17:25 -07:00
Hayden Roche
fb3c611275
Fix another AES-GCM EVP control command issue.
...
With PR 5170, I added logic that requires a EVP_CTRL_GCM_SET_IV_FIXED command be
issued before a EVP_CTRL_GCM_IV_GEN command. This matches OpenSSL's behavior.
However, OpenSSL also clears the flag enabling EVP_CTRL_GCM_IV_GEN after
EVP_CTRL_GCM_SET_IV_FIXED if EVP_CipherInit is called with a NULL key.
Otherwise, the flag retains its value. We didn't mirror this logic, and that
caused problems in OpenSSH unit testing. This commit aligns our logic with
OpenSSL's and adds a regression test to test_evp_cipher_aes_gcm for this case.
2022-06-02 12:32:59 -07:00
Tesfa Mael
cd008aac6a
Add support for VxWorks 6.x
...
Use rand_r and define SEM_ID_NULL
Fix redefinition of typedef 'SOCKADDR'
2022-06-02 09:54:27 -07:00
David Garske
56c48b31ad
Merge pull request #5105 from tmael/rsa_oaep_nomalloc
...
Support RSA OAEP with nomalloc
2022-06-02 08:45:01 -07:00
Sean Parkinson
fb9f90b98b
Merge pull request #5200 from dgarske/qat_fsanitize
...
Fixes for buffers when testing with Intel QAT hardware
2022-06-02 08:35:24 +10:00
Juliusz Sosinowicz
9f2e3a2405
Merge pull request #5198 from dgarske/qat_ecc_marker
2022-06-01 21:35:47 +02:00
David Garske
5672e2a885
Fixes for buffers when testing with Intel QAT hardware and `fsanitize=address`:
...
* PKCS7 should use allocated buffer for RSA.
* PKCS7 small stack typo for `keyAlgArray` size in `wc_PKCS7_AddRecipient_KTRI`.
* Fix for use of `free`, which should be `XFREE` in api.c.
* Cleanup old RSA benchmarking MDK5/WINCE code no longer needed with `WC_DECLARE_ARRAY_DYNAMIC_DEC` and `WC_DECLARE_ARRAY_DYNAMIC_EXE`.
2022-06-01 12:07:57 -07:00
Hayden Roche
8b9d2ad657
Merge pull request #5196 from douzzer/20220601-multi-test-fixes
2022-06-01 11:41:26 -07:00
David Garske
19c51dac45
Fix for QAT ECC to gate use of HW based on marker. Introduced in PR #4997 .
2022-06-01 09:36:21 -07:00
Daniel Pouzzner
b212853bce
evp.c: in EvpCipherAesGCM(), make sure ctx->gcmAuthIn is non-null before clearing it; fix whitespace.
2022-06-01 10:29:40 -05:00
Andrew Hutchings
11a7756527
Fix 64bit postfix for constants
...
GCC 4.0.4 PowerPC 32bit cross-compiler complains when `UL` is used
instead of `ULL` for 64bit constants.
2022-06-01 15:04:29 +01:00
TakayukiMatsuo
13135e72db
Add a global variable for heap-hint, mainly in case heap info cannot be referenced by TSIP
2022-06-01 10:24:03 +09:00
Sean Parkinson
3944a8737a
WIN64: compiling with __clang__ _udiv128 not defined
2022-06-01 08:54:57 +10:00
Sean Parkinson
dd0b9fb871
SP Winx64 ASM: XMM6-15 are non-volatile
...
Put the used non-volatile XMM registers on the stack at the start and
get them off again at the end.
2022-06-01 08:46:27 +10:00
Sean Parkinson
81cd1e652e
Merge pull request #5170 from haydenroche5/evp_cipher_aes_gcm
...
Fix EVP_CTRL_GCM_IV_GEN with AES-GCM.
2022-06-01 08:20:33 +10:00
Chris Conlon
0554b02215
Merge pull request #5177 from JacobBarthelmeh/PKCS7
2022-05-31 09:46:14 -06:00
Chris Conlon
da91578bc7
Merge pull request #5180 from miyazakh/tsipv_up
2022-05-31 09:41:47 -06:00
Daniel Pouzzner
8c10c3776d
wolfcrypt/src/asn.c: in C89 codepath of GetFormattedTime(), add buffer size checks before calls to sprintf().
2022-05-27 14:20:38 -05:00
Tesfa Mael
aca199cb05
Fix to compile with c89
...
strncasecmp and snprintf are unavailable in C89
use // static analyzer suppressions
2022-05-27 14:20:37 -05:00
Sean Parkinson
cacf5aeb7e
ASN template: properly handle WOLFSSL_CERT_EXT
...
Encoding extensions didn't properly handle WOLFSSL_CERT_EXT not being
defined.
2022-05-26 10:01:59 +10:00
JacobBarthelmeh
ad49aea17d
fix for setting AES-CCM decrypt nonce with crypto callback
2022-05-25 13:59:56 -07:00
David Garske
fa80aa6505
Merge pull request #5132 from JacobBarthelmeh/req
...
Add support for additional CSR attributes
2022-05-25 13:35:46 -07:00
David Garske
e8d779ab78
Merge pull request #5077 from gojimmypi/ESP8266_Development
...
Add ESP-IDF WOLFSSL_ESP8266 setting for ESP8266 devices
2022-05-25 12:46:10 -07:00
David Garske
2d8cc055f0
Merge pull request #5179 from SparkiDev/sp_armv6_fix_1
...
SP ARM32 ASM: moving large immediate value
2022-05-25 09:59:47 -07:00
David Garske
da1cbfda46
Merge pull request #5178 from cconlon/nounaligned
...
Add define to skip SHA-512 unaligned memory test in test.c
2022-05-25 09:55:29 -07:00
Hayden Roche
3cf636163b
Fix EVP_CTRL_GCM_IV_GEN with AES-GCM.
...
Discovered the AES-GCM flow using this command didn't work in our OpenSSH port.
This commit makes the behavior match OpenSSL and adds testing using known
OpenSSL-generated test vectors to prevent regressions. This was one of those
problems where two ends of a connection would work fine if they were both using
wolfSSL but not if one was using OpenSSL (i.e. OpenSSH interop with AES-GCM
was broken).
2022-05-25 07:00:15 -07:00
Hideki Miyazaki
0d59d36a80
update TSIP VER to 1.15 for RX65N and RX72N
...
fix -140 error when enabling -O2
fix no_crypto_hash
2022-05-25 18:31:23 +09:00
Sean Parkinson
d2cb0278f6
SP ARM32 ASM: moving large immediate value
...
ARMv6 and early doesn't support moving an immediate value larger than 8
bits. Compiler doesn't have enough spare registers to handle it.
2022-05-25 10:58:32 +10:00
JacobBarthelmeh
a1fb385450
free recipent list in error cases
2022-05-24 15:12:39 -07:00
David Garske
5aea58d1e8
Merge pull request #5175 from douzzer/20220524-shellcheck-warnings
...
20220524-shellcheck-warnings
2022-05-24 14:21:49 -07:00
David Garske
74cbd08ff5
Merge pull request #5164 from cconlon/x509date
...
Remove WOLFSSL_ALT_NAMES restriction on notBefore/notAfter use in Cert struct
2022-05-24 12:41:00 -07:00
Chris Conlon
321d404d6b
add define to skip unaligned memory tests in test.c
2022-05-24 11:55:21 -06:00
Daniel Pouzzner
b66fa1680a
fix whitespace.
2022-05-24 12:13:14 -05:00
Chris Conlon
6a26dab73a
X.509 cert validity for CertFromX509() and EncodeCert() shouldn't be protected by WOLFSSL_ALT_NAMES
2022-05-24 10:28:46 -06:00
Sean Parkinson
fab9e29513
benchmark.c: fix Jenkins failure where byte, word32 not defined
2022-05-24 12:10:01 +10:00
David Garske
6424af120c
Merge pull request #5161 from SparkiDev/sp_armv7a
...
SP ARM 32: Fixes to get building for armv7-a
2022-05-23 10:01:49 -07:00
JacobBarthelmeh
cdfdefe9af
improve checking on UUID getter function
2022-05-22 17:18:20 -07:00
JacobBarthelmeh
9e4de4bfc8
add FASC-N and UUID alt. name support
2022-05-22 17:18:20 -07:00
John Safranek
62cb2b4ca9
ASN.1 Additions for FPKI/CAC
...
1. Add some OIDs used in the Federal PKI Policy Authority standard.
2. Added the SubjectDirectoryAttributes extension to certificate
parsing. (limited to country of citizenship)
3. Rename constant label SUBJECT_INFO_ACCESS to SUBJ_INFO_ACC_OID
4. Added the SubjectInfoAccess extension to certificate parsing.
(limited to one URL)
5. Add the SSH extended key usage flags.
6. Use some of the template changes on the new certificate items.
2022-05-22 17:18:20 -07:00
David Garske
b5d65b9579
Merge pull request #5159 from kareem-wolfssl/fipsv3HmacMd5
...
Allow using 3DES and MD5 with FIPS 140-3, as they fall outside of the FIPS boundary.
2022-05-20 18:40:29 -07:00
David Garske
9a74745246
Merge pull request #5163 from haydenroche5/evp_pkey_derive_guard
...
Remove unneeded FIPS guard on wolfSSL_EVP_PKEY_derive.
2022-05-20 17:12:24 -07:00
Chris Conlon
ec39ee2cb6
Merge pull request #5070 from miyazakh/crypto_only_flwup
2022-05-20 17:08:29 -06:00
David Garske
04ddd0abe4
Merge pull request #5095 from haydenroche5/decoded_cert_crit_fields
...
Make the critical extension flags in DecodedCert always available.
2022-05-20 15:03:39 -07:00
Hayden Roche
a6b948ae59
Remove unneeded FIPS guard on wolfSSL_EVP_PKEY_derive.
2022-05-20 11:29:01 -07:00
René Liebscher
a8024a32c5
Remove unused warning in ecc.c
...
When WOLFSSL_ECIES_OLD is defined you get an unused warning
in ecc.c / wc_ecc_encrypt_ex().
Just suppress it by "using" the parameter.
2022-05-20 16:05:10 +02:00
Sean Parkinson
bc5262a5d0
SP ARM 32: Fixes to get building for armv7-a
...
Change ldrd to either have even first register or change over to ldm
with even first register.
Ensure shift value in ORR instruction has a hash before it.
Don't index loads and stores by 256 or more - make them post-index.
div2 for P521 simplified.
2022-05-20 12:15:58 +10:00
Kareem
832a7a40a6
Allow using 3DES and MD5 with FIPS 140-3, as they fall outside of the FIPS boundary.
2022-05-19 12:06:20 -07:00
Daniel Pouzzner
f2e9f5349f
wolfcrypt/src/asn.c: refactor DecodeBasicOcspResponse() to keep DecodedCert off the stack in WOLFSSL_SMALL_STACK builds.
2022-05-19 11:28:34 -05:00
David Garske
4a3ff40eb3
Merge pull request #5138 from haydenroche5/issuer_names
...
Add ability to store issuer name components when parsing a certificate.
2022-05-18 16:56:55 -07:00
Chris Conlon
1026c7141e
Merge pull request #5148 from JacobBarthelmeh/PKCS7
2022-05-18 11:44:20 -06:00
Hideki Miyazaki
54a96cef06
add test case
2022-05-18 11:16:10 +09:00
Hideki Miyazaki
c1f117413f
get crypto only compiled with openssl extra
2022-05-18 11:16:03 +09:00
Hayden Roche
04ff6afbad
Add ability to store issuer name components when parsing a certificate.
...
This is turned on when `WOLFSSL_HAVE_ISSUER_NAMES` is defined. This allows the
user to inspect various issuer name components (e.g. locality, organization,
etc.) by using these new fields in a `DecodedCert`.
2022-05-17 16:29:52 -07:00
Hayden Roche
fd535242a0
Fix main signature in benchmark.c.
...
If `NO_CRYPT_BENCHMARK` is defined, the main function is `int main()`, but it
should be `int main(void)`.
2022-05-17 14:28:43 -07:00
Jacob Barthelmeh
8b46c95f06
macro guard for build with disable ecc
2022-05-17 11:36:09 -06:00
Tesfa Mael
d6935ed3be
Review comments
2022-05-17 09:21:20 -07:00
Sean Parkinson
fc12c68601
Merge pull request #5146 from dgarske/kcapi_keywrap
...
Fix to allow enabling AES key wrap (direct) with KCAPI
2022-05-17 08:16:00 +10:00
Jacob Barthelmeh
1dc5e4cee5
add padding for variable ecc signature size
2022-05-16 15:26:29 -06:00
David Garske
579a37bdf0
Merge pull request #5117 from cconlon/getrandom
...
add support for Linux getrandom() with WOLFSSL_GETRANDOM
2022-05-16 12:36:30 -07:00
Chris Conlon
0ef4707859
Merge pull request #5137 from JacobBarthelmeh/docs
2022-05-16 12:18:14 -06:00
David Garske
6b1e3003fb
Merge pull request #5142 from SparkiDev/ssl_move_pk
...
ssl.c rework
2022-05-13 12:56:14 -07:00
Jacob Barthelmeh
3a4feddf75
update code for continued support with i.MX6
2022-05-13 13:21:45 -06:00
David Garske
643cd78ea2
Fix to allow enabling AES key wrap (direct) with KCAPI.
2022-05-13 11:15:32 -07:00
David Garske
1a57e3065a
Small cleanups. Missing `(void)`, spelling and formatting. Also fixes for variations of 25519/448 build.
2022-05-13 09:24:59 -07:00
John Safranek
7305616452
Merge pull request #5080 from JacobBarthelmeh/DH
...
with WOLFSSL_NO_DH186 restriction allow odd DH param size generations
2022-05-13 08:57:33 -07:00
David Garske
630c5ef364
Merge pull request #5140 from SparkiDev/sp_fixes_7
...
SP fixes
2022-05-12 21:57:48 -07:00
Sean Parkinson
eea537e5ea
Merge pull request #5124 from kaleb-himes/WIN_MULTICONFIG
...
Address issues ID'd by new windows multi-config test
2022-05-13 09:39:15 +10:00
Sean Parkinson
e8160f049e
SP fixes
...
Fix div_word without using div.
Fix ARM32 and Cortex-M builds to work for 4096 again.
2022-05-13 09:37:24 +10:00
Chris Conlon
e6ce735ed8
add support for Linux getrandom() with WOLFSSL_GETRANDOM
2022-05-12 16:51:38 -06:00
JacobBarthelmeh
988236ca70
remove port print out
2022-05-12 13:07:04 -07:00
Daniel Pouzzner
c4920021d8
print errors to stderr, not stdout;
...
fix whitespace in internal.c;
add missing error handling in examples/server/server.c around recvfrom().
2022-05-12 13:07:32 -05:00