12827 Commits

Author SHA1 Message Date
Glenn Strauss
59cefd2c99 match preproc defs around wolfSSL_ctrl()
match preproc defs around wolfSSL_ctrl() in src/ssl.c
2020-12-10 15:46:20 -05:00
Glenn Strauss
9d095066eb wrap SNI-related code with HAVE_SNI
perhaps some of this code should additionally be wrapped in
-  #ifndef NO_WOLFSSL_SERVER

It is fragile and ugly to litter the code with the likes of
-  #if defined(OPENSSL_ALL) || (defined(OPENSSL_EXTRA) && (defined(HAVE_STUNNEL) || \
-                               defined(WOLFSSL_NGINX) || defined(HAVE_LIGHTY) || \
-                               defined(WOLFSSL_HAPROXY) || defined(WOLFSSL_OPENSSH) ))
while it is much clearer and much more maintainable to wrap SNI-related
code with an SNI-specific feature-define HAVE_SNI (and possibly further
restrict with feature-define #ifndef NO_WOLFSSL_SERVER).
2020-12-10 15:46:20 -05:00
Glenn Strauss
034248b964 add more missing HAVE_LIGHTY 2020-12-05 15:52:17 -05:00
Sean Parkinson
d475463c91
Merge pull request #3528 from JacobBarthelmeh/Testing
fix build with ARM64 SP, FP_ECC and WC_NO_CACHE_RESISTANT
2020-12-04 12:17:24 +10:00
toddouska
69d642206d
Merge pull request #3513 from SparkiDev/ecc_vfy_r_s_check
ECC verify: validate r and s before any use
2020-12-02 14:33:38 -08:00
toddouska
9f5141a333
Merge pull request #3524 from SparkiDev/ocsp_resp_free
OCSP callback: call embed free in test callback
2020-12-02 13:48:09 -08:00
toddouska
b4c7b5e6ce
Merge pull request #3525 from SparkiDev/tls13_session
TLS 1.3: always add session when sending finished message
2020-12-02 13:47:38 -08:00
toddouska
36b73b738b
Merge pull request #3526 from SparkiDev/aes_prefetch
AES: When not X86_64, PreFetch*() not used
2020-12-02 13:28:58 -08:00
toddouska
d75a983766
Merge pull request #3527 from SparkiDev/ecc_safe
ECC add and dbl point: always use safe add and dbl
2020-12-02 13:28:10 -08:00
toddouska
0be45e731b
Merge pull request #3529 from SparkiDev/ocsp_single_ext
OCSP: Handle extensions in singleResponse
2020-12-02 13:26:46 -08:00
Kaleb Himes
fd158411e8
Merge pull request #3494 from JacobBarthelmeh/CSharp
pin the C# verify callback
2020-12-02 06:08:41 -07:00
Sean Parkinson
3d9b4f10f0 AES: When not X86_64, PreFetch*() not used
When WC_INLINE is defined then compiler doesn't mind. Otherwise, this is
a warning.
2020-12-02 09:04:48 +10:00
Sean Parkinson
9b5b9fd85d OCSP: Handle extensions in singleResponse 2020-12-01 16:41:20 +10:00
John Safranek
6fc64263f2
Merge pull request #3519 from julek-wolfssl/scr-timeout
Adapt wolfSSL_dtls_got_timeout to secure renegotiation usage
2020-11-30 11:40:35 -08:00
JacobBarthelmeh
42a63e8cc8 fix build with ARM64 SP, FP_ECC and WC_NO_CACHE_RESISTANT 2020-11-29 20:26:55 -08:00
Sean Parkinson
6bb38a1066 ECC add and dbl point: always use safe add and dbl
Can be using basepoint or public key at any time. Can't tell difference.
Always use the safe versions.
For private key operations, only working on the basepoint and will never
do any timinig different operations.
No impact on performance.
2020-11-30 11:44:50 +10:00
Sean Parkinson
22a8be412b TLS 1.3: always add session when sending finished message 2020-11-27 09:46:02 +10:00
Sean Parkinson
40154d69cf OCSP callback: call embed free
Leaks memory if not called.

Configuration:
	./configure --disable-shared --enable-ocsp --enable-sni
C_EXTRA_FLAGS="-DWOLFSSL_NONBLOCK_OCSP"
Leaking test:
	valgrind ./examples/client/client -X -C -h www.globalsign.com -p
443 -A certs/external/ca-globalsign-root.pem -g -o -N -v d -S
www.globalsign.com
2020-11-27 09:16:24 +10:00
Sean Parkinson
35acfa0f42 SP ECC: check the length of public key ordinates and private key
Do quick bit length check before loading the MP integers into fixed size
arrays.
Changed ECC to use SP key check function if SP enabled and not only with
SP Math.
2020-11-27 08:49:30 +10:00
toddouska
84a9e16805
Merge pull request #3388 from SparkiDev/aesgcm_4bit_table
AES-GCM: GMULT using 4-bit table
2020-11-25 15:45:28 -08:00
toddouska
86bbaad7fa
Merge pull request #3505 from kojo1/EVP-gcm
set tag for zero inl case 2
2020-11-25 15:43:27 -08:00
toddouska
dc76a4d522
Merge pull request #3511 from cconlon/zd11268
return err from fp_invmod_slow() when fp_add() fails
2020-11-25 15:41:12 -08:00
toddouska
e882159a02
Merge pull request #3516 from cconlon/zd11287
wc_ecc_rs_to_sig(): move r and s zero check before StoreECC_DSA_Sig()
2020-11-25 15:36:30 -08:00
David Garske
9f07f3e96e
Merge pull request #3520 from ejohnstown/vrf-fix
Verify Callback Fix
2020-11-25 11:37:06 -08:00
JacobBarthelmeh
1668b7060c
Merge pull request #3500 from cconlon/zd11011v2
PKCS#7: verify extracted public key in wc_PKCS7_InitWithCert
2020-11-26 02:26:08 +07:00
JacobBarthelmeh
719403cd0c
Merge pull request #3509 from kojo1/openssl-version
OPENSSL_VERSION_NUMBER to be defined by the user
2020-11-26 02:10:24 +07:00
toddouska
a0cd75081d
Merge pull request #3514 from SparkiDev/aesni_sse4
AESNI compile flags: clang doesn't need -msse4
2020-11-25 08:55:35 -08:00
Sean Parkinson
ca5ffc0743 AESNI compile flags: clang can't have -msse4
Setting the SSE4 architecture with clang creates executables that can't
run on old machines.
2020-11-25 10:32:42 +10:00
Sean Parkinson
d0703f8931 AES-GCM: GMULT using 4-bit table
When 64-bit data type available and not big endian code is faster.
--enable-aesgcm=4bit
2020-11-25 08:47:50 +10:00
John Safranek
4baf923218
Verify Callback Fix
1. Removed a flag set that would force all certificates in a chain
   to be verified. There was a compile time option to make that happen
   already.
2. Replace some options for some test failure test cases that were added
   and immediately removed.
(ZD 11292)
2020-11-24 11:46:10 -08:00
Juliusz Sosinowicz
95132b1c55 Make renegotiation information available outside of OPENSSL_EXTRA 2020-11-24 17:03:40 +01:00
Juliusz Sosinowicz
41d58465c0 Adapt wolfSSL_dtls_got_timeout to secure renegotiation usage
Reset DTLS stored messages on a FreeHandshakeResources call even if secure renegotiation is enabled. Without this, in a server initiated rehandshake, the server would keep old messages (ChangeCipherSpec and Finished) even when it sent a HelloRequest message.
2020-11-24 16:06:35 +01:00
Sean Parkinson
b1f9aba0ca SP div: stop overflow on divide 2020-11-24 16:14:14 +10:00
Sean Parkinson
b9a2725429 ECC verify: validate r and s before any use
SP code assumes r and s are valid values.
Code for ATECC508A, ATECC608A and CRYPTOCELL assumes that the r and s
are the size of the key when converting to byte arrays.
2020-11-24 16:14:14 +10:00
John Safranek
f5c2bef78f
Merge pull request #3492 from julek-wolfssl/dtls-scr-optimizations
Save the HelloRequest message just like other handshake mesasges
2020-11-20 11:50:51 -08:00
Juliusz Sosinowicz
69bea008dd Save the HelloRequest message just like other handshake mesasges
Implement a timeout mechanism for non-blocking sockets
2020-11-20 11:41:19 +01:00
John Safranek
2d79e38436
Merge pull request #3485 from julek-wolfssl/dtls-scr-seq-correct-num
Fix overlapping sequence number error.
2020-11-19 14:19:13 -08:00
Chris Conlon
64429693ff add MP_ZERO_E unit tests for wc_ecc_rs_to_sig() 2020-11-19 14:41:02 -07:00
Chris Conlon
f8fd3f8bc1 wc_ecc_rs_to_sig: check r,s for zero before StoreECC_DSA_Sig() 2020-11-19 14:35:35 -07:00
Chris Conlon
1d599272e7 add unit test for wc_PKCS7_InitWithCert() with malformed cert 2020-11-19 14:19:55 -07:00
David Garske
d4c59e369e
Merge pull request #3335 from julek-wolfssl/RSA-PSS-padding-in-EVP_Digest-API
Enable RSA-PSS padding in EVP_Digest* API
2020-11-19 09:31:12 -08:00
toddouska
43f8eac8ba
Merge pull request #3362 from SparkiDev/sp_math_all
Implement all relevant mp functions in sp_int
2020-11-19 08:10:11 -08:00
Sean Parkinson
91d23d3f5a Implement all relevant mp functions in sp_int 2020-11-19 11:58:14 +10:00
toddouska
aa9ed17afa
Merge pull request #3512 from dgarske/openssl_pem
Fix for missing `wolfSSL_PEM_write_bio_PrivateKey` with WebRTC
2020-11-18 16:17:46 -08:00
toddouska
de6f1c1ae2
Merge pull request #3508 from JacobBarthelmeh/DH
fix for no filesystem build with DH test case
2020-11-18 16:15:42 -08:00
toddouska
3808865f57
Merge pull request #3504 from SparkiDev/fp_div_oob_read
TFM div: fix initial value of size in q so clamping doesn't OOB read
2020-11-18 16:15:08 -08:00
toddouska
ca281f976e
Merge pull request #3493 from dgarske/zd11245
Sniffer fixes for handling TCP `out-of-range sequence number`
2020-11-18 16:14:09 -08:00
Takashi Kojo
7c68136a8b OPENSSL_VERSION_NUMBER to be defined by the user 2020-11-19 09:13:05 +09:00
toddouska
a280df1892
Merge pull request #3488 from kabuobeid/x509_objtxt_lname
Return long names instead of short names in wolfSSL_OBJ_obj2txt().
2020-11-18 16:10:46 -08:00
toddouska
6860d419c6
Merge pull request #3483 from SparkiDev/mp_rshb_word
rshb: handle cases of shift amount being multiple of DIGIT_BIT
2020-11-18 16:07:57 -08:00