David Garske
76e84e0830
Merge pull request #3423 from ejohnstown/nightly-test-fix
...
Nightly Scan-Build Test Fixes
2020-10-27 08:31:19 -07:00
John Safranek
7dbd6102d2
Compatibility Layer
...
When wolfSSL_X509_NAME_ENTRY_create_by_txt() needs to make a new ASN.1 object ID, actually store it in the name entry.
2020-10-26 16:10:44 -07:00
David Garske
2ebb47ec32
Merge pull request #3424 from douzzer/fix-save-vector-registers-gating
...
wc_port.h: improve/fix gating on {SAVE,RESTORE}_VECTOR_REGISTERS()
2020-10-26 15:33:00 -07:00
Daniel Pouzzner
fd5a309a47
wc_port.h: improve gating on {SAVE,RESTORE}_VECTOR_REGISTERS() to assure no-op fallback definitions in non-autotools builds.
2020-10-26 12:06:18 -05:00
Sean Parkinson
74b834a78c
Merge pull request #3422 from ejohnstown/ecc-name
...
Tautological Name Fix
2020-10-26 10:12:51 +10:00
John Safranek
9c1049f112
Compatibility Layer
...
1. Changed the ASN1_OBJECT member of the X509_NAME_ENTRY to be a pointer
rather than an object. It could lead to a double free on the name
entry.
2. The ASN1_OBJECT allocator should set the dynamic flag, as the
deallocator is the one that uses it.
3. General changes to treat the member as a pointer rather than a
member.
4. In the api test, we were iterating over the name members in the name
checking the NIDs. After the loop we freed the name member object.
This led to a double free error.
2020-10-25 14:38:07 -07:00
John Safranek
f5f883597e
RSA PSS Fix
...
1. Change the utility function in wc_encrypt that returns the size of a
hash to initialize the size to HASH_TYPE_E, like the other utility
functions.
2. When getting the hash size returns an error, RSA-PSS verify inline
should return a BAD_FUNC_ARG error.
2020-10-24 13:06:42 -07:00
John Safranek
3f5620089e
PKCS7: In EncodeEncryptedData, free the attribs and flattenedAttribs if
...
they were allocated, not based on if they should be allocated.
2020-10-24 12:41:10 -07:00
John Safranek
bfccf35eaf
Tautological Name Fix
...
Depending on the build option WOLFSSL_ECC_CURVE_STATIC, the name in the
ecc_set may be a pointer (default) or an array. With the above set with
the CFLAG -Wtautological-pointer-compare you'll get a build error.
Changed the comparison in the for loop with this problem to check the
name's pointer only if appropriate.
2020-10-23 15:23:16 -07:00
Chris Conlon
e24ac4211d
Merge pull request #3405 from kojo1/EVP-gcm-zero
...
set tag including if(inl == 0) case
2020-10-23 14:35:47 -06:00
John Safranek
a7b325f542
Merge pull request #3414 from kabuobeid/wolfrand_build_fix
...
Fix wolfrand build failure.
2020-10-22 22:54:05 -07:00
David Garske
ff092c02d2
Merge pull request #3396 from SparkiDev/fips_armasm
...
FIPS ARMASM: get build working
2020-10-22 15:26:24 -07:00
David Garske
05094460b2
Merge pull request #3353 from douzzer/XChaCha
...
XChaCha
2020-10-22 15:25:56 -07:00
Kareem Abuobeid
42583b5270
Fix wolfrand build failure, caused by defining NO_ASN without NO_CERTS.
2020-10-22 14:48:37 -07:00
tmael
6265006553
Merge pull request #3403 from elms/cppcheck/cleaup_fixes
...
Address some cppcheck issues
2020-10-22 12:56:19 -07:00
David Garske
f75dc4727d
Merge pull request #3408 from ejohnstown/opt-fix
...
Example Client OCSP Option Fix
2020-10-22 09:00:04 -07:00
John Safranek
e28303b40a
In DoServerKeyExchange(), when reading the DH key from the server, the
...
client was checking it too strictly. The pubkey value should be checked
as strictly as the generator, for too large. The public key value is
checked mathematically elsewhere.
2020-10-21 21:47:32 -07:00
Daniel Pouzzner
81849e64b8
scripts/openssl.test: for "-psk" cases, use "-psk key", not "-psk=key", for OpenSSL 1.0.2 compatibility.
2020-10-21 23:30:14 -05:00
John Safranek
ca7161a86f
Example Client OCSP Option Fix
...
1. Before checking to see if the must staple flag is on the 'W' option,
check the length of myoptarg.
2020-10-21 23:23:45 -05:00
John Safranek
d2dac8e4b8
Example Client OCSP Option Fix
...
1. Before checking to see if the must staple flag is on the 'W' option,
check the length of myoptarg.
2020-10-21 13:30:51 -07:00
Daniel Pouzzner
b468ea77ea
linuxkm: use EXPORT_SYMBOL_NS(x, WOLFSSL) if available, else fall back to EXPORT_SYMBOL(x).
2020-10-21 14:37:43 -05:00
Daniel Pouzzner
c910c94824
rename API wc_XChaCha20Poly1305_{encrypt,decrypt}_oneshot to wc_XChaCha20Poly1305_{Encrypt,Decrypt} for consistency; remove stray debugging printf in XChaCha20Poly1305_test().
2020-10-21 14:36:46 -05:00
Daniel Pouzzner
299e88a993
minor fixes and commentary.
2020-10-21 14:08:41 -05:00
Daniel Pouzzner
99b76241bd
wolfcrypt/test/test.c: remove debugging printf in XChaCha20Poly1305_test().
2020-10-21 14:08:41 -05:00
Daniel Pouzzner
e1d3f2c7b4
chacha20_poly1305.c: add _SMALL_STACK code in wc_XChaCha20Poly1305_crypt_oneshot().
2020-10-21 14:08:41 -05:00
Daniel Pouzzner
1949378d61
wc_Chacha_purge_current_block(): init "scratch" buffer to zeros, to avoid "garbage value" warnings.
2020-10-21 14:08:41 -05:00
Daniel Pouzzner
f65947ae09
rename wc_XChaCha_init() to wc_XChacha_SetKey() for consistency, and add a counter argument to provide for future random access scenarios; refactor wc_Chacha_purge_current_block() to use a dummy wc_Chacha_Process() call for intrinsically correct counter dynamics.
2020-10-21 14:08:41 -05:00
Daniel Pouzzner
6142c22948
add wc_XChaCha_init(), wc_XChaCha20Poly1305_Init(), wc_XChaCha20Poly1305_encrypt_oneshot(), wc_XChaCha20Poly1305_decrypt_oneshot(), and wc_Poly1305_EncodeSizes64(). also, remove redundant arg check (typo) in wc_Poly1305Update().
2020-10-21 14:08:41 -05:00
Elms
c3dba3f9af
Add additional checks to sp_ecc_point_new
2020-10-21 09:59:39 -07:00
toddouska
e4eda3e125
Merge pull request #3384 from SparkiDev/tls13_sess_tick_compat
...
TLS session tickets: cannot share between TLS 1.3 and TLS 1.2
2020-10-20 15:56:03 -07:00
toddouska
7aae784a53
Merge pull request #3399 from dgarske/zd11128
...
Fix for TLS sniffer with non-standard curves
2020-10-20 15:14:53 -07:00
toddouska
7c38be407c
Merge pull request #3398 from dgarske/async_test
...
Fixes for `--enable-asynccrypt` tests
2020-10-20 15:13:51 -07:00
toddouska
a1afc6ca4f
Merge pull request #3389 from tmael/ocsp_status
...
Process multiple OCSP responses
2020-10-20 15:11:42 -07:00
toddouska
1e43d65d2a
Merge pull request #3392 from SparkiDev/ocsp_must_staple
...
TLS OCSP Stapling: MUST staple option
2020-10-20 15:07:08 -07:00
Sean Parkinson
ffd55ac1fe
Merge pull request #3406 from ejohnstown/dh-fix-2
...
DH Fix 2
2020-10-21 08:05:42 +10:00
toddouska
c863ca54a3
Merge pull request #3308 from julek-wolfssl/thread-safety
...
Introduce thread safety to unsafe functions in wolfSSL
2020-10-20 14:56:04 -07:00
toddouska
7c89d10e53
Merge pull request #3260 from julek-wolfssl/non-blocking-scr
...
(D)TLS non-blocking SCR with example
2020-10-20 13:45:19 -07:00
John Safranek
2c5a4ba508
DH Fix 2
...
1. Add some missing frees for the error cases when the server DH public
key is rejected.
2020-10-20 10:32:09 -07:00
David Garske
a575403ca3
Merge pull request #3404 from haydenroche5/cmake
...
Tweak CMakeLists.txt
2020-10-20 06:58:00 -07:00
Takashi Kojo
6767646e54
set tag for zero len case
2020-10-20 19:11:35 +09:00
Sean Parkinson
ebde736ee7
Merge pull request #3400 from ejohnstown/dh-fix
...
DH Fix
2020-10-20 11:45:18 +10:00
David Garske
fb35013bf2
Merge pull request #3402 from douzzer/lkm-kernel_time_t
...
Linux __kernel_time_t version test
2020-10-19 17:28:48 -07:00
Hayden Roche
06977ebbdf
Tweak CMakeLists.txt
...
- Change minimum CMake version from 2.6 to 3.0, which has support for targets.
- Favor explicit file lists in CMakeLists.txt over globs.
- Use target_compile_options to specify -DNO_MAIN_DRIVER for the unit_test target.
2020-10-19 16:38:51 -05: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
Elms
86b2118550
Address some cppcheck issues
2020-10-19 11:47:53 -07:00
Daniel Pouzzner
48f4b927f6
wc_port.h: fix threshold of change in __kernel_time_t typedef from kernel 5.0.0 to 5.5.0 to accommodate Ubuntu 20.02 (kernel 5.4) -- see 2a785996cc (diff-2cd5bedb19d5e0a575d6f73a6c3290ecf8d9c01eb7567ba6fa282cb1b0ce2d54)
2020-10-19 13:27:00 -05:00
John Safranek
cd05ed3347
iDH Fix
...
1. Changed the bounds of checking the key from comparisons to constants
to comparisons against WOLFSSL object settings for the DH key bounds.
2. Removed redundant bounds check on the server's prime.
2020-10-19 08:08:04 -07:00
Juliusz Sosinowicz
147cb8e60c
Jenkins scope fixes
2020-10-19 12:46:11 +02:00
Sean Parkinson
f0d400a506
Merge pull request #3401 from kojo1/EVPcipher_tbl
...
cipher_tbl for EVP_get_cipherbyname
2020-10-19 14:28:59 +10:00
Takashi Kojo
a87f7c9185
cipher_tbl for EVP_get_cipherbyname
2020-10-19 06:17:15 +09:00