1531 Commits

Author SHA1 Message Date
JacobBarthelmeh
6ea1e7d824
Merge pull request #6683 from dgarske/tpm_ecc
Enable math API's for wolfTPM
2023-08-09 17:11:33 -06:00
Anthony Hu
958113c070 Correct configure defaults for SM4-GCM and SM4-CCM (disabled) 2023-08-08 13:06:00 -04:00
David Garske
75f81db084 New TPM ECC encrypt needs access to the mp_ math functions. 2023-08-07 15:06:58 -07:00
JacobBarthelmeh
7f0cfcb27d
Merge pull request #6667 from bandi13/byebyeCyaSSL
Byebye cya ssl
2023-08-03 15:43:01 -06:00
Andras Fekete
25f542adb4 Clean up compile errors 2023-08-01 15:46:18 -04:00
Daniel Pouzzner
d250eb8327 configure.ac: in FIPS builds, remove nullcipher from enable-all and enable-all-crypto, and error on explicit --enable-nullcipher with FIPS unless fips=dev. 2023-08-01 12:24:50 -05:00
Andras Fekete
2b2509c56c Drop code support 2023-07-31 15:36:38 -04:00
Juliusz Sosinowicz
4a175ba280 Updates for Kerberos 5 1.21.1
- wolfssl_ec_point_mul: fix parameters being passed into ec_mul2add
- Compile in compressed ecc key parsing for OPENSSLALL
- Improve debugging around compat layer ecc operations
- wolfSSL_BN_div: dv can be NULL
- Add spake like computation test
- Add CI krb5 testing
- Add timeouts to CI
2023-07-26 16:40:38 +02:00
JacobBarthelmeh
d3202600a4
Merge pull request #6525 from lealem47/san
Improve subjectAltName extension parsing and printing
2023-07-22 08:19:54 -06:00
Sean Parkinson
9b2345dc8e SM3 ASM file: protect with check for WOLFSSL_SM3
Protect sm3_asm.S with check for WOLFSSL_SM3.
Change configure.ac to define WOLFSSL_SM3 in ASM flags when SM3 enabled
and enabling intelasm.
2023-07-21 09:57:53 +10:00
Sean Parkinson
dceb7c0122 SM2 and SP_MATH: don't enable SM2 with SP_MATH
No implementation of SM2 with SP so can't use SM2 with SP MATH.
2023-07-19 12:39:59 +10:00
JacobBarthelmeh
a026d843cf
Merge pull request #6564 from philljj/add_lms_hooks
Add LMS/HSS wolfCrypt hooks.
2023-07-14 14:33:25 -06:00
JacobBarthelmeh
b889b27b8c
Merge pull request #6585 from cconlon/x509Ext
Fixes for WOLFSSL_X509 cert gen, WOLFSSL_ALT_NAMES to --enable-jni
2023-07-12 16:55:08 -06:00
Chris Conlon
a8ed78e012 define WOLFSSL_ALT_NAMES in --enable-jni build 2023-07-12 14:33:45 -06:00
Daniel Pouzzner
648f474d83 configure.ac:
if ENABLED_LINUXKM_PIE, add -DWOLFSSL_NO_OCSP_ISSUER_CHECK to gate out backward dependency in asn.c;

  if ENABLE_LINUXKM, don't error on FIPS without thread_ls_on;

  for --enable-curl, set ENABLED_MD4="yes", and move --enable-md4 AC_ARG_ENABLE() clause up to a position adjacent to des3 handling;

scripts/sniffer-gen.sh: fix illegal exit code (SC2242);

src/internal.c: fix clang-analyzer-core.NonNullParamChecker in CreateTicket();

src/ocsp.c: fix readability-redundant-preprocessor;

src/tls.c: fix empty-body in TLSX_PskKeModes_Parse() and clang-diagnostic-unreachable-code-break in ALPN_Select();

tests/api.c: fix several clang-analyzer-core.NullDereference related to Expect*() refactor;

wolfcrypt/src/asn.c:

  fix -Wconversions in DecodeAuthKeyId() and ParseCertRelative();

  fix readability-redundant-declaration re GetCA() and GetCAByName();

  gate inclusion of wolfssl/internal.h on !defined(WOLFCRYPT_ONLY);

wolfssl/internal.h: add macro-detection gating around GetCA() and GetCAByName() prototypes matching gates in wolfcrypt/src/asn.c;

tests/utils.c: in create_tmp_dir(), use one-arg variant of mkdir() if defined(__CYGWIN__) || defined(__MINGW32__).
2023-07-12 13:47:40 -05:00
David Garske
b8119af455
Merge pull request #6594 from lealem47/curl
Fix for curl build
2023-07-11 17:13:59 -07:00
Sean Parkinson
d6a6cbb83e
Merge pull request #6595 from dgarske/various
Fix for no malloc with SP and fix defaultdhparams typo
2023-07-12 07:19:52 +10:00
Lealem Amedie
1329543b62 Other miscellaneous fixes 2023-07-11 13:27:37 -06:00
David Garske
3e9bdb7671 Fix defaultdhparams typo fix logic. 2023-07-11 10:26:40 -07:00
David Garske
8f36f78e6c
Merge pull request #6400 from bandi13/ARIA-cipher
Aria cipher
2023-07-11 09:50:42 -07:00
jordan
d7c3a176e2 LMS cleanup. 2023-07-10 23:43:07 -05:00
Kareem
e871b1c04d Add hitch support to wolfSSL.
Add support for cipher aliases DHE, EDH and EECDH.

Add define SSL_CTRL_GET_CHAIN_CERTS to help hitch and other programs detect SSL_CTX_get0_chain_certs is supported.

Add wolfSSL_get_locking_callback.

Allow using ECDHE+RSA cipher suites when ECDHE alias is used while in OpenSSL compatibility mode.

Add more alerts for hitch.

SSL_CM should use the CTX's x509_store_pt if available.

Add support for SSL_CERT_FILE and SSL_CERT_DIR.  Load default OpenSSL TLS 1.3 ciphers when using OPENSSL_COMPATIBLE_DEFAULTS.

Use wolfSSL_sk_X509_new_null to allocate WOLFSSL_STACK in wolfSSL_CTX_get_extra_chain_certs.  Previous approach of malloc'ing without setting type/memsetting was leading to a segfault.

Add --enable-hitch.

hitch: Add unit tests for new APIs, fix a couple of issues uncovered by unit testing.

Correct behavior of wolfSSL_BIO_set_mem_buf for BIO_CLOSE/NOCLOSE and update unit test accordingly.

Add Github action test for hitch.
2023-07-10 10:06:10 -07:00
Juliusz Sosinowicz
0abaa89787 Add support for nginx-1.25.0
- nginx: add necessary defines and function
- Implement Certificate Authorities for TLS 1.3
- Implement secret logging for TLS 1.3. Can be used for example with:
  ./configure CPPFLAGS="-DWOLFSSL_SSLKEYLOGFILE -DSHOW_SECRETS -DHAVE_SECRET_CALLBACK -DWOLFSSL_SSLKEYLOGFILE_OUTPUT='\"/tmp/secrets\"'"
- Implement session context checking for tickets
- Check for authorized responder in OCSP basic response
- Fix handling call to ocsp->statusCb
- compat: Translate SOCKET_PEER_CLOSED_E to WOLFSSL_ERROR_SYSCALL
- Fix wolfSSL_CTX_set_session_cache_mode
  - WOLFSSL_SESS_CACHE_OFF means nothing should be on
  - WOLFSSL_SESS_CACHE_NO_INTERNAL turns off only the internal cache
- Respect ssl->options.internalCacheOff
- Implement SSL_SESSION_set_time
- wolfSSL_SSL_in_init: fix detection for TLS 1.3
- Fix handling call to ssl->alpnSelect
- SendTls13NewSessionTicket: always generate new ID
  - When we send a new ticket for the same session (for example we resumed a connection and are sending a new ticket so that the client can resume in the future), we need to generate a new ID so that we don't overwrite the old session in the cache. Overwriting the session results in the `diff` calculation in `DoClientTicketCheck()` producing the wrong value and failing to resume.
Add nginx github action test
- Fix memory leaks
- wolfSSL_OCSP_basic_verify: implement OCSP_TRUSTOTHER flag
- AKID: implement matching on issuer name and serial number
- ocsp: check for a chain match for OCSP responder
- Split CreateTicket into CreateTicket and SetupTicket
- SendCertificateStatus: free response.buffer
- Use heap hint when allocating responseBuffer
- Remove responseBuffer from internal API's that don't use it anywhere
2023-07-07 11:22:58 +02:00
Andras Fekete
266307da6c Add in ARIA wrappers
Address PR comments + other cleanup


Addressing PR comments


Minor change


Make sure the last line gets output as well


Add in ARIA SHA256 session to internal structure


Add in ARIA SHA384 session to internal structure


Add necessary function for ARIA to extract key


Fix unit tests


Rename HAVE_ARIAGCM to HAVE_ARIA


Move aria.* to wolfcrypt/port/aria


Separate out aria-crypt init functions


Adding in ECC+SHA callbacks


Avoid using AC_CHECK_FILE


Rename Aria to wc_Aria


Don't need special cases


Addressing PR comments


Code cleanup


C89 support


Remove TODO


Add documentation about buffer size


Clean up header files


Use ARIA_DEVID by default if available


Dummy update call to make MagicCrypto happy


Fix for detecting what algo type to use


Documentation


Use the appropriate sign/verify


Collect MagicCrypto functions together (and avoid leaks)


Fall back on other implementations on failure


Fix issue when compiling without CRYPTOCB


Addressing PR comments


Better cleanup


Addressing PR comments


Cleaner exit in case of error
2023-07-06 16:09:23 -04:00
jordan
67bef21185 Add LMS/HSS wolfCrypt hooks. 2023-07-06 10:55:53 -05:00
David Garske
856b5c3f1b
Merge pull request #6566 from JacobBarthelmeh/soname
update soname to 40
2023-07-05 09:21:10 -07:00
David Garske
f00b5c3a1e
Merge pull request #6537 from SparkiDev/sm
SM2/SM3/SM4: Chinese cipher support
2023-07-04 10:03:37 -07:00
Sean Parkinson
e2424e6744 SM2/SM3/SM4: Chinese cipher support
Add support for:
 - SM2 elliptic curve and SM2 sign/verify
 - SM3 digest
 - SM4 cipher with modes ECB/CBC/CTR/GCM/CCM

Add APIs for SM3 and SM4.
Add SM2 sign and verify APIs.
Add support for SM3 in wc_Hash and wc_Hmac API.
Add support for SM3 and SM4 through EVP layer.
Add support for SM2-SM3 certificates. Support key ID and name hash being
with SHA-1/256 or SM3.
Add support for TLS 1.3 cipher suites: TLS-SM4-GCM-SM3, TLS-SM4-CCM-SM3
Add support for TLS 1.2 SM cipher suite: ECDHE-ECDSA-SM4-CBC-SM3
Add support for SM3 in wc_PRF_TLS.
Add SM2-SM3 certificates and keys. Generated with GmSSL-3.0.0 and
OpenSSL.
2023-07-04 13:36:28 +10:00
Juliusz Sosinowicz
3d68bcd6f7 Jenkins fixes 2023-07-03 14:02:51 +02:00
JacobBarthelmeh
877979c5c2 update soname to 40 2023-06-30 14:40:26 -07:00
David Garske
79a7d21932 Turn on SNI by default on hosts with resources. 2023-06-30 13:04:05 -07:00
Lealem Amedie
fdc95f9ba6 Handle registeredID correctly 2023-06-28 12:53:34 -06:00
jordan
41d248461b fix detection of cut tool in configure.ac 2023-06-27 13:18:25 -05:00
JacobBarthelmeh
2d28b492b0
Merge pull request #6501 from dgarske/ecc_comp
Fix for SP math all and ECC with compressed keys (missing sp_add_d)
2023-06-21 12:01:06 -07:00
Sean Parkinson
82cc988226
Merge pull request #6495 from JacobBarthelmeh/build
update check for stdatomic header file
2023-06-14 14:00:04 +10:00
JacobBarthelmeh
72536e0e10 prepare for 5.6.3 2023-06-13 14:47:06 -06:00
David Garske
fe7502a50e Fix for SP math all and ECC with compressed keys (missing sp_add_d). Reproduce using: ./configure --disable-rsa --disable-dh --enable-compkey --disable-pkcs12 && make. 2023-06-13 11:39:24 -07:00
JacobBarthelmeh
47036d0166 update check for stdatomic header file 2023-06-12 13:48:24 -06:00
JacobBarthelmeh
353a2926b6 add check for stdatomic.h 2023-06-09 09:52:01 -07:00
JacobBarthelmeh
032ac405db prepare for release 5.6.2 2023-06-09 05:51:18 -07:00
Sean Parkinson
9ca9c2ba6f Kyber: allow compilation with limited sizes with liboqs 2023-06-06 14:26:06 +10:00
John Bland
7e3aafb60c
Fix for FIPS ECC integrity check with crypto callback set (#6425)
Skip ECC private key check when the TPM is used to generate the key, since it doesn't release the private part. this option needs to be used with a FIPS approved TPM for the end result to be FIPS approved
2023-05-19 09:12:44 -07:00
John Safranek
f9dcab956e
Configure Typo
1. The description text for the brainpool enable option in configure was
   using a shell variable that ended up in the output. Switched to the
   description pattern used in other options.
2023-05-18 10:51:04 -07:00
Daniel Pouzzner
42cce9d8e5 add --enable-linuxkm-benchmarks; add check for async.{c,h} when --enable-asynccrypt; update failure message for the opensslextra AC_CHECK_HEADER() test. 2023-05-17 01:03:26 -05:00
Sean Parkinson
55a91c2b55 Minor fixes
configure.ac: Don't use == in test.
client.c: Merge string to one line.
asn.c/asn_public.h:
  fix conversion warnings/errors.
  wc_Asn1_Print no longer public and doesn't need to check for NULL.
  wc_Asn1_PrintAll check all pointer parameters for NULL.
2023-05-05 08:43:50 +10:00
David Garske
6e572cc91d
Merge pull request #6352 from SparkiDev/asn1_print
ASN.1 print utility: asn1
2023-05-04 10:55:47 -07:00
Sean Parkinson
d2afe9e5e0 Memory usage improvements
ECC: make private key field 'k' able to be smaller when ALT_ECC_SIZE is
defined.
WOLFSSL_SMALL_STACK_CACHE: allocate temps using new macros.
2023-05-04 10:26:57 +10:00
Sean Parkinson
9cdee20a7d ASN.1 print: implementation to parse and print added
New API to parse and print DER/BER data from a buffer.
Add an example to parse DER, Base64 and PEM files and print out ASN.1 items.
2023-05-04 09:57:44 +10:00
John Bland
6369b1e9ec
Merge pull request #6371 from dgarske/lowres
Fixes and improvements for building with low footprint
2023-05-03 19:33:53 -04:00
David Garske
4b90afa37b Provide way to disable ASN but have wc_RsaPublicKeyDecodeRaw, which doesn't need ASN.1 parsing. 2023-05-02 18:10:25 -07:00