282 Commits

Author SHA1 Message Date
Juliusz Sosinowicz
15d0dd258a Add cert test for UID name component 2022-02-15 14:05:46 +01:00
Sean Parkinson
bf37845e2d
Merge pull request #4680 from JacobBarthelmeh/certs
update certificate expiration dates and fix autorenew
2021-12-22 08:48:35 +10:00
JacobBarthelmeh
d28cb70735 fix for ed25519 client cert generation 2021-12-21 09:03:54 -08:00
JacobBarthelmeh
c0f8fd5f5d update certificate dates and fix autorenew 2021-12-20 16:04:05 -08:00
David Garske
d8b58b8b05 Put both DigiCert Global Root CA and GlobalSign Root CA into the Google CA list. Fixes --enable-dtls --enable-ocsp ./scripts/ocsp.test`. 2021-12-20 11:47:34 -08:00
Anthony Hu
f2465e5688 include.am 2021-11-10 18:01:40 -05:00
Anthony Hu
242847760a More appropriate file names. 2021-11-10 17:55:46 -05:00
Anthony Hu
453404a864 Get the falcon keys into wolfssl/certs_test.h 2021-11-10 17:33:24 -05:00
Juliusz Sosinowicz
7d6f8ea255 Update wrong email in gen script 2021-10-28 14:50:53 +02:00
Juliusz Sosinowicz
ef37eeaeaa Code review fixes 2021-10-28 14:50:53 +02:00
Juliusz Sosinowicz
c162196b27 Add x509 name attributes and extensions to DER parsing and generation
- Postal Code
- Street Address
- External Key Usage
- Netscape Certificate Type
- CRL Distribution Points
- Storing full Authority Key Identifier information
- Add new certificates to `certs/test` for testing
- Update WOLFSSL_ASN_TEMPLATE to match new features
2021-10-28 14:50:53 +02:00
Jacob Barthelmeh
f57801c17b more name constraint test cases and adjust DNS base name matching to not require . 2021-10-20 14:25:02 -06:00
Jacob Barthelmeh
ab6939d200 add new test cert to make dist 2021-10-19 23:34:03 -06:00
Jacob Barthelmeh
3b73c6e3ae handle multiple permitted name constraints 2021-10-19 23:12:07 -06:00
Jacob Barthelmeh
afee92e0cf bail out when a bad alt name is found in the list of alt names 2021-10-19 23:12:07 -06:00
David Garske
9d2082f7e1
Fixes and improvements for crypto callbacks with TLS (mutual auth) (#4437)
* This PR resolves issues with using TLS client authentication (mutual auth) with crypto callbacks. The TLS client auth will not be sent without a private key being set. The solution is to allow setting a public key only if crypto callbacks is enabled and a devId is set.

* Fix to allow using crypto callbacks with TLS mutual authentication where a private key is not available.
* Fix for ED25519 sign when only a private key is loaded.
* Fix to enable crypto callbacks for ED25519 and Curve25519 in TLS by using the _ex init functions.
* Fix for wc_PemToDer return code where a PKCS8 header does not exist.
* Remove duplicate logs in DoCertificateVerify.
* Doxygen API updates: Added crypto callback help and updated use_PrivateKey with info about public key use.

* * Added crypto callback tests for TLS client and server with mutual auth for RSA, ECC and ED25519.
* Enhanced the API unit test TLS code to allow setting CA, cert and key.

* Revert ED25519 changes. Opt to calculate public key directly when required for signing in the TLS crypto callback test. Build configuration fixes.

* Fix to use proper devId in `ProcessBufferTryDecode`.

* Various build fixes due to changes in PR. G++ issue with `missing-field-initializers`. Unused api.c func with DTLS and session export. Duplicate `eccKeyPubFile` def.

* Added crypto callback TLS tests at WOLFSSL object level. Fix for ED25519/ED448 with client mutual auth where the private key is not set till WOLFSSL object. Fix issues with  `wolfSSL_CTX_GetDevId` where devId is set on WOLFSSL object. Enable the `_id` API's for crypto callbacks.

* Proper fix for `eccKeyPubFile` name conflict. Was causing RSA test to fail (expected DER, not PEM).
2021-10-07 11:12:06 +10:00
JacobBarthelmeh
43ffe26133
Merge pull request #4430 from embhorn/zd12976
Add support for X9.42 header
2021-10-05 23:47:42 +07:00
Eric Blankenhorn
1440b8966d Add test for X9.42 parsing 2021-10-04 11:05:58 -05:00
Chris Conlon
95b9fae605
Add DIST_POINT compatibility functions (#4351)
* add DIST_POINT compatibility functions

* switch X509_LU_* from enum to define, prevent compiler type warnings

* refactoring, adding in comments, and formating

* refactoring and a memory leak fix

* cast return value for g++ warning

* refactor wolfSSL_sk_DIST_POINT_pop_free and remove NULL assign after free

* fix get next DIST_POINT node for free function

Co-authored-by: Jacob Barthelmeh <jacob@wolfssl.com>
2021-09-30 08:27:39 +10:00
Anthony Hu
33cb823148
Remove legacy NTRU and OQS (#4418)
* Remove NTRU and OQS

* Keep the DTLS serialization format backwards compatible.

* Remove n from mygetopt_long() call.

* Fix over-zealous deletion.

* Resolve problems found by @SparkiDev
2021-09-24 08:37:53 +10:00
David Garske
9b6cf56a6e
Expanded support for Curve25519/Curve448 and TLS v1.3 sniffer (#4335)
* Fixes for building with Ed/Curve25519 only. Fix for IoT safe demo to exit after running once. Added `WOLFSSL_DH_EXTRA` to `--enable-all` and `--enable-sniffer`. Cleanup uses of `==` in configure.ac. Various spelling fixes.

* Fix for sniffer with TLS v1.3 session tickets.

* Fix for ASN Template Ed25519 key export (missing version / not setting OID correctly).

* Add key import/export support for Curve25519/Curve448. Refactor of the 25519/448 ASN code to combine duplicate code.

* Refactor of Curve25519 code. Improved public key export to handle generation when only private is set. Improved private scalar buffer sizing.

* Fix for static ephemeral loading of file buffer.

* Added sniffer Curve25519 support and test case.

* Fix for sniffer to not use ECC for X25519 if both are set.

* Fix Curve448 public export when only private is set.

* Fix for `dh_generate_test` for small stack size.

* Reduce stack size use on new asymmetric DER import/export functions. Cleanup pub length calc.

* Fix invalid comment.
2021-09-01 09:28:24 +10:00
Hayden Roche
7ff1351971 Make changes to support libimobiledevice.
- `EVP_PKEY_assign_RSA` should store the private key in DER format, not the
public key.
- The last call to `infoCb` in `wolfSSL_BIO_write` should provide the length of
the data to write.
- We should be able to parse RSA public keys starting with BEGIN RSA PUBLIC KEY
and ending with END RSA PUBLIC KEY.
2021-08-24 08:52:43 -07:00
Sean Parkinson
d486b89c61 ASN1 Template: stricter and simpler DER/BER parsing/construction
Reduce debug output noise
2021-08-19 11:32:41 +10:00
Hayden Roche
dc7ae37f7a Make changes to support port of NTP from OpenSSL to wolfSSL. 2021-08-02 13:33:18 -07:00
JacobBarthelmeh
020e23783b
Merge pull request #4180 from kaleb-himes/DEFAULT_CA_BOOL
Fix basic constraints extension present and CA Boolean not asserted
2021-07-19 23:08:27 +07:00
Jacob Barthelmeh
88b70a3906 update google cert that was set to expire in Dec 2021 2021-07-09 23:57:50 +07:00
kaleb-himes
93a8f36530 Fix basic constraints extension present and CA Boolean not asserted 2021-07-02 12:16:16 -06:00
Jacob Barthelmeh
3cd43cf692 fix for keyid with ktri cms 2021-06-22 21:33:12 +07:00
David Garske
3d5c5b39ac
Merge pull request #4134 from embhorn/joi-cert
Update use of joi cert and add to renew script.
2021-06-17 18:28:12 -07:00
Kaleb Himes
93ae372c55
Merge pull request #4132 from dgarske/exebits
Remove execute bit on update pem/der files
2021-06-16 17:20:53 -05:00
Eric Blankenhorn
1307972344 Update use of joi cert and add to renew script. 2021-06-16 13:55:36 -05:00
David Garske
90d894b9fd Remove execute bit on update pem/der files. 2021-06-16 10:17:20 -07:00
Jacob Barthelmeh
d8fc01aabf add cert generation to renewcerts script 2021-06-16 14:31:33 +07:00
Sean Parkinson
5bb639f6db
Merge pull request #4126 from dgarske/certs_test_expired
Fixes for expired test certs
2021-06-16 11:25:54 +10:00
Sean Parkinson
b73673a218
Merge pull request #3794 from TakayukiMatsuo/os_keyprint
Add wolfSSL_EVP_PKEY_print_public
2021-06-16 08:43:41 +10:00
David Garske
6d95188f4b Fixes for expired test certs. Generated using cd certs/test && ./gen-testcerts.sh. 2021-06-15 15:07:34 -07:00
David Garske
5a78574a8a Add new scripts to include.am. 2021-06-11 08:19:23 -07:00
TakayukiMatsuo
779e3701e6 Merge branch 'master' of github.com:wolfSSL/wolfssl into os_keyprint 2021-06-11 13:56:52 +09:00
Sean Parkinson
ed14e593c7 ED25119 and SHAKE-256: fixes
SHAKE-256 is off by default now. Make sure WOLFSSL_SHAKE256 doesn't make
it into options.h.
Fix openssl.test usage of ed25519 certificates.
Add scripts that regenerate certificates
2021-06-11 10:13:31 +10:00
Sean Parkinson
3ecb8d5a3e
Merge pull request #4062 from dgarske/dh_key
DH Key and Params Export cleanups and Apache httpd fixes
2021-06-10 20:54:32 +10:00
David Garske
4a85127507 Improve wc_DhKeyToDer for public key size calculation. Fixes bug with the output too (was missing 1 byte in length for the unused bits byte in bit string). 2021-06-08 09:55:56 -07:00
David Garske
9b215c5138 Fixes for DH Pub key import/export and new test case. Improve wc_DhParamsToDer. 2021-06-08 09:27:30 -07:00
Sean Parkinson
8779c3a884 ECC: Disable ECC but have Curve25519/448 and PK callbacks fix
Fix ed25519 certificates.
Tidy up testsuite.c
2021-05-10 10:32:55 +10:00
Kareem Abuobeid
8071fac306 S/MIME: Add smime-test-canon.p7s to include.am 2021-04-30 15:30:55 -07:00
Kareem Abuobeid
effcecf40d S/MIME: Add non-canonicalized test case 2021-04-30 15:07:37 -07:00
TakayukiMatsuo
491f3bc423 Add two public key files in certs folder and register them to gencertbuf.pl 2021-03-19 14:52:58 +09:00
Hideki Miyazaki
44a20c8ce6
add more unit test case for load_crl_file 2021-03-05 08:19:14 +09:00
Jacob Barthelmeh
f4519018eb remove execute bit on smime bundles 2021-02-15 23:33:31 +07:00
toddouska
67b1280bbf
Merge pull request #3545 from kabuobeid/smime
Added support for reading S/MIME messages via SMIME_read_PKCS7.
2021-02-10 15:59:32 -08:00
Jacob Barthelmeh
41e5e547c4 run renewcerts.sh script 2021-02-11 03:12:54 +07:00