Commit Graph

284 Commits (master)

Author SHA1 Message Date
Anthony Hu b1e9cc320b Add documentation telling the user not to modify a buffer. 2022-08-26 14:27:27 -04:00
Uriah-wolfSSL 7ea904c873
Added CertNew() and CertFree() info. (#5502)
* Updated wc_CertNew() dox for the return value listings, small changes to
description and add some detail to the example per peer review.
2022-08-24 13:09:50 -04:00
Marco Oliverio cfbd061625 add initial support for ConnectionID DTLS extension 2022-08-23 16:58:24 +02:00
David Garske d50e740c97
Merge pull request #5488 from julek-wolfssl/get_ex_new_index-docs
Add documentation explaining get_ex_new_index API limitations
2022-08-22 09:51:36 -07:00
Juliusz Sosinowicz 8b2fcd0643 Add documentation explaining get_ex_new_index API limitations 2022-08-22 12:16:51 +02:00
Eric Blankenhorn 3d8562f07b Fixes for build and runtime issues 2022-08-19 08:12:04 -05:00
David Garske 5445b183ed Adding CMAC documentation. Fixes ZD14601. 2022-08-11 12:00:19 -07:00
David Garske fef84e2c4c Fixes for asn_public.h documentation. Fix spelling error. 2022-08-11 08:58:32 -07:00
Sean Parkinson dd2a6410d1
Merge pull request #5454 from dgarske/docs_hashtype
Improve the documentation for HMAC hash types
2022-08-11 16:50:55 +10:00
David Garske c707186b9f Improve the documentation for HMAC hash types. 2022-08-10 09:23:01 -07:00
Stefan Eissing 4431438fb2 add QUIC support. 2022-08-08 13:24:00 +02:00
David Garske c5e7ccca2c
Merge pull request #5380 from danielinux/typo-doc
Fixed typo in dox_comments
2022-07-21 11:52:56 -07:00
Daniele Lacamera a18b1939ac Fixed typo in dox_comments 2022-07-21 10:19:51 +02:00
David Garske c029b23043
Merge pull request #5308 from SparkiDev/ecies_gen_iv
ECIES: Google Pay generates IV and places it before msg
2022-07-20 06:46:14 -07:00
Sean Parkinson 09bba3510f ECIES: Google Pay ECIES
Generates IV and places it before msg
Uses 12 byte IV with AES-CTR
Add API to explicitly set KDF salt.
2022-07-20 09:30:47 +10:00
David Garske b2d1bf96ed
Merge pull request #5276 from rizlik/dtls13_client_downgrade
Dtls: improve version negotiation
2022-07-06 11:57:53 -07:00
David Garske a7fa7875e4
Merge pull request #5244 from julek-wolfssl/wpas-dpp
Support for new DPP and EAP-TEAP/EAP-FAST in wpa_supplicant
2022-07-06 11:35:52 -07:00
David Garske a171bebba4 Fix the `wc_EccPublicKeyToDer_ex` doxy. 2022-07-06 07:58:18 -07:00
Marco Oliverio 3abffc3a3c doc: add documentation for wolfDTLS[v1_3]_*_method() 2022-07-06 16:18:44 +02:00
Juliusz Sosinowicz 39e53c2b7c Add wc_EccPublicKeyToDer_ex doxygen entry 2022-07-06 11:59:29 +02:00
John Safranek ded3f4e9b6
Merge pull request #5284 from julek-wolfssl/dtls-good-ch-cb
DTLS 1.3: additions for event driven server in wolfssl-examples
2022-07-05 10:14:59 -07:00
Juliusz Sosinowicz 9dc2c27e3d Expand wolfDTLS_SetChGoodCb() docs 2022-07-04 14:31:24 +02:00
David Garske 00391a5ace Rename callback to `wolfDTLS_SetChGoodCb` and add doxygen for it. Clarify `DTLS_CTX.connected`. Fix build errors for `./configure --enable-dtls --enable-dtls13 --disable-examples CFLAGS="-DNO_WOLFSSL_SERVER"`. 2022-07-04 11:08:39 +02:00
Juliusz Sosinowicz e605cfeccb Add docs for new features 2022-07-04 11:08:39 +02:00
Sean Parkinson 2c943282f0 Ed25519/Ed448: assume public key is not trusted
In defense against attack, assume the imported public key is not trusted
and check it matches the private key if set.
Added APIs that allow application to explicitly trust public key.
Original APIs default to not trusting public key.
2022-07-01 09:05:43 -07:00
Takashi Kojo 8f68e32ef1 initial tranlation of API headers in JA 2022-06-16 08:24:18 +09:00
Marco Oliverio ca05ad2dc0 dtls13: introduce wolfSSL_dtls_13_has_pending_msg() API 2022-06-15 10:46:43 -07:00
Marco Oliverio d1924928c0 dtls13: support retransmission
Introduce ACK and retransmission logic, encapsulated in a Dtls13RtxFsm
object. The retransmission or the sending of an ACK is scheduled by setting the
appropriate flag inside the Dtls13RtxFSM object but the actual writing on the
socket is deferred and done in wolfSSL_Accept/Connect.

* Retransmission

Each sent message is encapsulated in a Dtl13RtxRecord and saved on a list. If we
receive an ACK for at record, we remove it from the list so it will be not
retransmitted further, then we will retransmit the remaining
ones. Retransmission is throttled: beside link congestion, this also avoid too
many sequence numbers bounded with a record.

* ACK

For each received record we save the record sequence number, so we can send an
ACK if needed. We send an ACK either if explicitly needed by the flight or if we
detect a disruption.

Co-authored-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
2022-06-15 10:46:43 -07:00
David Garske afc63a3bfa
Merge pull request #5199 from embhorn/zd12999
Add doc for wolfSSL_dtls_retransmit
2022-06-10 10:57:17 -07:00
Eric Blankenhorn 2543970419 Add doc for wolfSSL_dtls_retransmit 2022-06-01 12:03:36 -05:00
Sean Parkinson be743b2204 TLS 1.3: send ticket
Can send a new session ticket any time after handshake is complete with
TLS v1.3.
Added API for server application to do this.
Added tests.
2022-06-01 10:36:01 +10:00
Eric Blankenhorn ab6dc8d669 Add ability to set ECC Sign userCTX using WOLFSSL_CTX 2022-04-11 08:41:27 -05:00
Andrew Hutchings 5ea9d11295 Minor documentation cleanup
Fixes two things across all the Doxygen:

1. Remove WOLFSSL_API from each definition
2. Add missing parameter names from functions
2022-04-06 16:17:36 +01:00
Anthony Hu 211007fb44 WOLFSSL_ASN_API ---> WOLFSSL_API 2022-04-01 15:24:40 -04:00
Anthony Hu edea6428d9 Add new public API wc_CheckCertSigPubKey() 2022-04-01 11:40:25 -04:00
Eric Blankenhorn ea38e1aab5 Add wolfSSL_CTX_SetCertCbCtx to set user context for CB 2022-03-30 12:27:11 -05:00
Anthony Hu 1bc71da1df Correction about AES using IV in docs 2022-03-23 13:35:13 -04:00
Juliusz Sosinowicz 1fd090d094 Update `wolfSSL_get_session` docs
Recommend using `wolfSSL_get1_session` and `NO_SESSION_CACHE_REF` for session resumption purposes. `wolfSSL_get_session` should not be used unless to inspect the current session object.
2022-03-17 12:56:28 +01:00
Anthony Hu 0a1c052c40 doxygen for wc_SetCustomExtension() 2022-03-04 16:24:27 -05:00
Anthony Hu 806cd4fbba doxygen for myUnknownExtCallback() 2022-03-04 15:32:11 -05:00
Juliusz Sosinowicz 91b08fb691 Allocate `ssl->session` separately on the heap
- Refactor session cache access into `AddSessionToCache` and `wolfSSL_GetSessionFromCache`
2022-02-23 09:47:34 +01:00
Juliusz Sosinowicz 4f8ffc4586 wolfSSL_get_error may return SSL_ERROR_NONE on ret <= 0
Fix docs mismatch reported in https://github.com/wolfSSL/wolfssl/issues/4854
2022-02-11 12:37:12 +01:00
David Garske d1267b5203
Merge pull request #4805 from SparkiDev/ecies_aes_ctr
ECIES: add support for more encryption algorithms
2022-02-10 07:04:24 -08:00
Sean Parkinson e50f661639 ECIES: add support for more encryption algorithms
Add support to ECIES for AES-256-CBC, AES-128-CTR, AES-256-CTR.
Added new API wc_ecc_ctx_set_algo() that sets the encryption, KDF and
MAC algorithms.
Cleanup formatting of ECIES code.
2022-02-10 09:54:22 +10:00
Marco Oliverio b8635efda7 psa: add README.md and doxygen header 2022-02-04 21:45:38 +01:00
David Garske 99799a3e3e
Merge pull request #4806 from anhu/kill_idea
Purge IDEA cipher
2022-02-01 12:27:55 -08:00
Hayden Roche 24a2ed7e9e
Merge pull request #4780 from dgarske/ipsec_racoon 2022-01-31 15:10:58 -08:00
Anthony Hu 9ea40f3a9c Purge IDEA cipher 2022-01-31 15:29:25 -05:00
Anthony Hu b957a6e872 Purge Rabbit cipher 2022-01-28 13:13:53 -05:00
David Garske 80ae237852 Fixes for building with ipsec-tools/racoon and openvpn:
* Fix for `EVP_CIPHER_CTX_flags`, which mapped to a missing function (broke openvpn)
* Added stack of name entries for ipsec/racoon support.
* Added `X509_STORE_CTX_set_flags` stub.
* Added PKCS7 NID types.
* Improved FIPS "SHA" logic in `test_wolfSSL_SHA`
* Added some uncommon NID type definitions.
* Expose the DH `DH_set_length` and `DH_set0_pqg` with OPENSSL_ALL
2022-01-28 09:21:03 -08:00
Sean Parkinson b890a2f15d ECIES: allow compressed public keys
ECIES messages have a public key/point at start of the data.
It can be either uncompressed or compressed.
Adding support for decrypting and encrypting of compressed point.
2022-01-27 12:10:59 +10:00
Daniel Pouzzner a718637c6f AES: harmonize wc_Aes{Encrypt,Decrypt} and wc_Aes{Encrypt,Decrypt}Direct implementations to return int; add return values to all static void functions in aes.c that can fail; add WARN_UNUSED_RESULT to all static functions in aes.c with return values; implement missing error percolation around AES block cipher implementations; bump FIPS version for v5-ready and v5-dev to 5.3 (v5-RC12 is 5.2). 2022-01-24 11:44:16 -06:00
David Garske 609d6442b1
Merge pull request #4753 from SparkiDev/siphash
Add SipHash algorithm
2022-01-19 18:51:44 -08:00
Sean Parkinson a6485a228d Add SipHash algorithm 2022-01-20 09:41:18 +10:00
Hayden Roche 62b07d8806 Add AES-SIV (RFC 5297).
This commit adds functions to encrypt and decrypt data using AES in SIV mode, as
described in RFC 5297. This was added in the process of porting chrony to
wolfSSL. chrony is an NTP implementation that can use NTS (network time
security), which requires AES-SIV.
2022-01-19 14:32:33 -08:00
David Garske 7adbf59f22
Merge pull request #4767 from anhu/kill_hc128
Get rid of HC-128
2022-01-19 12:20:18 -08:00
Sean Parkinson e745de657f
Merge pull request #4761 from haydenroche5/time_cb
Add time callback functionality.
2022-01-18 16:49:19 +10:00
JacobBarthelmeh 84b06ac1b6
Merge pull request #4730 from embhorn/zd13475
Document wc_AesCfbEncrypt and wc_AesCfbDecrypt
2022-01-17 19:45:45 -07:00
Hayden Roche 1b0926a3b8 Add time callback functionality.
This commit adds `wolfSSL_SetTimeCb` and `wolfSSL_time`. The former allows the
user to override the function wolfSSL uses to get the current time,
`wolfSSL_time`. If set, `wolfSSL_time` uses that function. If not set,
`wolfSSL_time` uses the `XTIME` macro by default. This functionality is needed
for the port of chrony to wolfSSL. chrony is an NTP implementation that uses
GnuTLS by default. For TLS, chrony uses the time it computes in place of the
default system time function.
2022-01-17 17:49:51 -08:00
Anthony Hu c2860cb311 Get rid of HC-128 2022-01-17 18:11:54 -05:00
Eric Blankenhorn 6197853f37 Document wc_AesCfbEncrypt and wc_AesCfbDecrypt 2022-01-17 11:27:19 -06:00
David Garske 6ce248e2f9 Improve documentation for `wolfSSL_get1_session`. Add wolfSSL specific naming on the internal session functions to avoid possible user conflicts. ZD13363 and ZD13487. 2022-01-10 07:47:19 -08:00
Andrew Hutchings 247cbdeef7 Cleanups for ISO-TP in wolfio
* Add Doxygen comments
* Make ISOTP_Send, ISOTP_Receive and wolfSSL_SetIO_ISOTP safer
* Reorder isotp_wolfssl_ctx
* Other minor cleanups
2022-01-04 12:57:11 +00:00
Chris Conlon 5172130287 add wc_GetPubKeyDerFromCert(), get pub key DER from DecodedCert 2021-12-15 11:04:52 -07:00
kareem-wolfssl 638d00f593
Merge pull request #4634 from danielinux/iotsafe-16bit-id
IoT-SAFE module: improvements and bug fixes
2021-12-13 11:33:19 -07:00
Hayden Roche 6764e7c15f Make wolfCrypt ASN cert parsing functionality public.
Currently, the `ParseCert` function is only available if `WOLFSSL_ASN_API` is
defined to `WOLFSSL_API`. The only way to achieve this without enabling the
compatibility layer is to define `WOLFSSL_TEST_CERT`. There are users defining
this so that they can parse certs with wolfCrypt, even though this doesn't seem
to be the original intent of the define. This commit adds the function
`wc_ParseCert` to the public wolfCrypt API. It's simply a wrapper around
`ParseCert`. Similarly, this commit adds `wc_InitDecodedCert` and
`wc_FreeDecodedCert` to the public API, which are wrappers around
`InitDecodedCert` and `FreeDecodedCert`, respectively.
2021-12-10 10:43:28 -08:00
Daniele Lacamera 1cb8b34fba IoT-SAFE: minor fixes + doxygen for new API calls 2021-12-07 14:11:14 +01:00
Andrew Hutchings 231546dacc Fix more Doxygen typos 2021-11-10 17:26:33 +00:00
Andrew Hutchings afe8d74333 Fix up some Doxygen issues for 1.9
Some of the Doxygen content was not processed correctly by Doxygen.
This patch fixes all the issues found.
2021-11-10 16:20:13 +00:00
David Garske 5dac25f470 Eliminate `EIGHTK_BUF` use in asn. Cleanup uses of `0` in set_verify for callback. 2021-11-09 08:23:19 -08:00
David Garske a2ad01604f Fix devId, which must be `-2` or `INVALID_DEVID` (not 0). Fix RSA doc typo. 2021-10-27 15:08:38 -07:00
Hayden Roche 0b6523d933 Rename pem_password_cb to wc_pem_password_cb.
Recently, we had a wolfEngine customer report a compilation error because
wolfSSL and OpenSSL both define the typedef pem_password_cb. The solution is to
namespace our typedef with the wc_ prefix. In order to not break existing code
that relies on wolfSSL providing pem_password_cb, if OPENSSL_COEXIST is not
defined, we define pem_password_cb as a macro that maps to wc_pem_password_cb.
2021-10-21 16:47:29 -07:00
David Garske 4e7ce45a8c Allow loading public key with PK callbacks also. 2021-10-19 17:04:18 -07: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
Jacob Barthelmeh cb4b57c5c7 add tls 1.3 test case 2021-09-30 10:08:47 -06:00
Jacob Barthelmeh ae47cb3bcd update check on is TLS, update macro guard for test case 2021-09-28 16:57:30 -06:00
Jacob Barthelmeh 6e7c6e8a66 add comments to dox header file 2021-09-27 14:01:15 -06: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 f08b1c49a9
Merge pull request #4371 from anhu/doc_update
Documentation fixup to reflect that we will error out if you set a ba…
2021-09-13 11:14:25 -07:00
elms 98f286d8cb
Consistent return value from SSL_CTX_load_verify_locations{,_ex} (#4341)
On any failure, return `WOLFSSL_FAILURE`

If there was a failure and a successful processing of certs from the
same directory, the return value depended on the last cert processed
which not guarenteed to be the same order. If the last cert load
failed, it would return the specific wolfSSL error code. If it
succeeded, then WOLFSSL_FAILURE would be returned as a generic failure
due to a previous cert error.
2021-09-10 08:45:13 +10:00
Anthony Hu 10a4cfae9d Documentation fixup to reflect that we will error out if you set a bad group identifier 2021-09-03 12:46:44 -04:00
David Garske c8926a45ab Improvements to session locking to allow per-row. Can manually be enabled with `ENABLE_SESSION_CACHE_ROW_LOCK` or forcefully disabled using `NO_SESSION_CACHE_ROW_LOCK`. Enabled by default for Titan cache. ZD 12715. 2021-08-20 13:03:50 -07:00
Daniele Lacamera 490eeb4003 Support for IoT-Safe with TLS demo 2021-08-16 13:13:30 -07:00
elms b2380069f0
Merge pull request #4261 from dgarske/rsa_der_pub 2021-08-13 13:36:01 -07:00
Juliusz Sosinowicz 7dea1dcd39 OpenResty 1.13.6.2 and 1.19.3.1 support
# New or Updated APIs
- wolfSSL_get_tlsext_status_type
- wolfSSL_X509_chain_up_ref
- wolfSSL_get0_verified_chain
- SSL_CTX_set_cert_cb
- SSL_certs_clear
- SSL_add0_chain_cert ssl_cert_add0_chain_cert
- SSL_add1_chain_cert ssl_cert_add1_chain_cert
- sk_X509_NAME_new_null
- SSL_CTX_set_cert_cb
- SSL_set0_verify_cert_store
- SSL_set_client_CA_list

# Other Changes
- Ignore gdbinit
- Add api.c tests for new API
- Add `WOLFSSL_X509_STORE* x509_store_pt` to `WOLFSSL`
- Add macro to select the `WOLFSSL` specific store when available and the associated `WOLFSSL_CTX` store otherwise. Calls to `ssl->ctx->cm` and `ssl->ctx->x509_store*` were replaced by macros.
- NO-OP when setting existing store
- Add reference counter to `WOLFSSL_X509_STORE`
- Cleanup MD5 redundant declarations
- WOLFSSL_ERROR may map to nothing so make assignment outside of it
- refMutex fields are excluded with SINGLE_THREADED macro
- Chain cert refactor
- Make `wolfSSL_add0_chain_cert` and `wolfSSL_add1_chain_cert` not affect the context associated with the SSL object
- `wolfSSL_CTX_add1_chain_cert` now updates the `ctx->certChain` on success and stores the cert in `ctx->x509Chain` for later free'ing
2021-08-12 23:58:22 +02:00
David Garske c69d6d2491 Added public API `wc_RsaKeyToPublicDer_ex` to allow getting RSA public key without ASN.1 header (can return only seq + n + e). Related to PR #4068. Cleanup documentation for RSA and wolfIO. Consolidate duplicate code in `wc_RsaPublicKeyDerSize`. 2021-07-29 09:27:50 -07:00
David Garske 8376a2adc2 Improved memory documentation and examples. Resolves PR #3834. 2021-07-28 09:03:40 -07:00
TakayukiMatsuo 567d8ed704 Make wolfSSL_set_session return success on timeout under WOLFSSL_ERROR_CODE_OPENSSL macro definition. 2021-07-02 10:50:00 +09:00
Eric Blankenhorn 33174cec5c
Merge pull request #4161 from dgarske/ssl_doxy
Added inline documentation for `wolfSSL_CTX_load_verify_buffer_ex`
2021-06-28 12:35:11 -05:00
David Garske 4ef3c5d75c Added inline documentation for `wolfSSL_CTX_load_verify_buffer_ex`. 2021-06-24 10:38:34 -07:00
Hayden Roche b3401bd102 Make a bunch of PKCS#8 improvements.
- Add doxygen documentation for wc_GetPkcs8TraditionalOffset, wc_CreatePKCS8Key,
wc_EncryptPKCS8Key, and wc_DecryptPKCS8Key.
- Add a new API function, wc_CreateEncryptedPKCS8Key, which handles both
creation of an unencrypted PKCS#8 key and the subsequent encrypting of said key.
This is a wrapper around TraditionalEnc, which does the same thing. This may
become a first-class function at some point (i.e. not a wrapper). TraditionalEnc
is left as is since it is used in the wild.
- Added a unit test which exercises wc_CreateEncryptedPKCS8Key and
wc_DecryptPKCS8Key. Testing wc_CreateEncryptedPKCS8Key inherently also tests
TraditionalEnc, wc_CreatePKCS8Key, and wc_EncryptPKCS8Key.
- Modified wc_EncryptPKCS8Key to be able to return the required output buffer
size via LENGTH_ONLY_E idiom.
- Added parameter checking to wc_EncryptPKCS8Key and wc_DecryptPKCS8Key.
2021-06-23 08:39:20 -07:00
David Garske 9e48de9d42
Merge pull request #3970 from embhorn/zd12122
Clarify that units of size parameters are in bits
2021-04-30 14:28:50 -07:00
David Garske fa9f1f8012
Merge pull request #3977 from embhorn/zd12136
Improve PSK callback doc
2021-04-30 14:26:39 -07:00
toddouska 40fe746710
Merge pull request #3942 from dgarske/get_static_ephemeral
Added API's for getting pointer to loaded static ephemeral key
2021-04-23 15:54:46 -07:00
Eric Blankenhorn 3c0a77485e Improve PSK callback doc 2021-04-22 10:47:46 -05:00
Eric Blankenhorn 1d50962889 Clarify that units of size parameters are in bits 2021-04-20 09:28:17 -05:00
David Garske 8984ce03e9 Refactor BIO read/write to use switch. 2021-04-05 14:35:47 -07:00
David Garske e13c93d493 Added API's for getting pointer to load static ephemeral key. 2021-04-05 13:40:48 -07:00
Daniel Pouzzner 5d9ee97530 WOLFSSL_AES_CBC_LENGTH_CHECKS: add gated logic to aes.c wc_AesCbc{En,De}crypt() to return BAD_LENGTH_E when input length is not a multiple of AES_BLOCK_SIZE; add gated tests of new functionality in test_wc_AesCbcEncryptDecrypt(); fix first encrypt-decrypt-memcmp in test_wc_AesCbcEncryptDecrypt() to span all of test vector and extend test vector length to be block-multiple; add ungated logic in platform-specific wc_AesCbc{En,De}crypt() routines to return with early success when blocks == 0 (also mitigates buffer overrun on short (less-than-AES_BLOCK_SIZE) input); add BAD_LENGTH_E error code; update documentation. 2021-03-26 13:40:08 -05:00
Sean Parkinson a55e94cf6f ECCSI and SAKKE: add support
Fixes for static code analysis included.
Added const to function parameters.
Zeroise some temporaries.
2021-03-12 09:31:22 +10:00
Sean Parkinson fa7b5f55ee TLS 1.3: add API to tell if a KeyUpdate response is required 2021-02-19 10:21:08 +10:00
Eric Blankenhorn b7b07e1945 Adding wolfSSL_CTX_get_TicketEncCtx 2021-02-15 11:28:46 -06:00
Takashi Kojo e21fddf553 add wc_RsaSetRNG to doc 2021-01-14 10:42:49 +09:00
Chris Conlon 7e1a066963
Merge pull request #3555 from kojo1/doc-PSS_Sign-Verify
Doc wc_RsaPSS_Sign/Verify/CheckPadding
2020-12-16 15:18:24 -07:00
Takashi Kojo 010c8db54e duplicated \ingroup, missing closing comment 2020-12-16 08:52:12 +09:00
Takashi Kojo b2a66a10f4 add XXX_ex APIs, corret spelling, descriptions 2020-12-12 07:29:24 +09:00
Takashi Kojo 47f7e46ffe Add wc_RsaPSS_Sign/Verify/CheckPadding 2020-12-11 07:58:39 +09:00
Daniel Pouzzner 2a2ba896ec documentation typo: wc_InitSha356() sounds like an interesting algorithm but, alas, we will have to settle for wc_InitSha256(). 2020-12-10 14:16:20 -06:00
Juliusz Sosinowicz a0a3a2b74c Review changes 2020-11-17 19:15:12 +01:00
David Garske b931b1bd4d Fix to not allow free for globally cached sessions. Resolves a false-positive scan-build warning. 2020-11-12 12:51:41 -08:00
kaleb-himes 288ad68b4d Address report on issue #3161 2020-11-04 10:37:46 -07:00
Sean Parkinson e2b5de2657 Add doxygen comments for wc_InitRsaKey_Id() 2020-08-26 09:04:40 +10:00
Chris Conlon af92c531bf
Merge pull request #3168 from ethanlooney/16th_branch
Added semicolons to two functions to fix doxygen issues and deleted ssl param and replaced it with ctx param
2020-07-29 09:31:14 -06:00
Ethan Looney 0448004535 Added semicolons to two functions to fix doxygen issues and deleted ssl param and replaced it with ctx param 2020-07-28 08:39:23 -07:00
Chris Conlon 6b3b37604f
Merge pull request #3159 from ethanlooney/16th_branch
Added doxygen comments and changed footer date to 2020
2020-07-27 09:24:59 -06:00
Ethan Looney 7b357cff39 Changed param's, examples and brief's 2020-07-24 12:54:29 -07:00
toddouska e84defb268
Merge pull request #3044 from dgarske/sniffer_tls13
TLS v1.3 sniffer support
2020-07-24 11:46:38 -07:00
Ethan Looney 6bc4bfd7f2 Added doxygen comments to include all missing ABI functions and changed footer date from 2017 to 2020 2020-07-23 13:25:18 -07:00
David Garske 1b051d9c5b TLS v1.3 sniffer support:
* Added TLS v1.3 sniffer support using static ephemeral key.
* Add support for using a static ephemeral DH and ECC keys with TLS v1.3 using `WOLFSSL_STATIC_EPHEMERAL`.
* Adds new API's `wolfSSL_CTX_set_ephemeral_key` and `wolfSSL_set_ephemeral_key`.
* Expanded TLS extension support in sniffer.
* Refactor of the handshake hashing code.
* Added parameter checking to the TLS v1.3 key derivations (protects use of "DoTls13Finished" if handshake resources have been free'd).
* Added support for loading DH keys via `wc_DhImportKeyPair` and `wc_DhExportKeyPair`, enabled with `WOLFSSL_DH_EXTRA`.
* Added sniffer documentation `sslSniffer/README.md`.
2020-07-17 15:22:35 -07:00
David Garske 80f5fe1494 Added documentation for `wc_ecc_set_nonblock`. 2020-07-17 15:20:23 -07:00
toddouska edf88c3da1
Merge pull request #3073 from SparkiDev/tls13_dox
Update TLS 1.3 function Doxygen documentation
2020-07-15 13:58:07 -07:00
Chris Conlon 7bd5da70a6
Merge pull request #3066 from kaleb-himes/DOX_UPDATES
Update v23 methods to reflect TLSv1.3
2020-06-26 10:59:04 -05:00
Sean Parkinson be5648986c Update TLS 1.3 function Doxygen documentation
Give parameters a name in function prototypes.
2020-06-24 12:35:47 +10:00
kaleb-himes 646ecb54c2 Update v23 methods to reflect TLSv1.3 2020-06-22 12:04:16 -06:00
David Garske 6ecb88da47 Fixes for dox SNI documentation / examples. 2020-06-22 07:37:04 -07:00
Sean Parkinson 7a15639927 Add Doxygen documentation for Curve448/Ed448
Update Curve25519/Ed25519 Doxygen documentation too.
Make public key is a public API - check pubKey pointer is not NULL.
2020-06-16 22:16:13 +10:00
Chris Conlon fb51a2298e
Merge pull request #3019 from kaleb-himes/ZD10380
init components as best practice
2020-06-09 17:23:55 -05:00
David Garske 8823a581d0 Add PSK user context support (Fixes #2952.). 2020-06-04 15:31:18 -07:00
kaleb-himes 8cd92f68f2 init components as best practice 2020-06-02 14:28:50 -06:00
David Garske 41ff54f873 Fix for typo with `wc_ecc_init` in documentation. 2020-03-03 09:16:48 -08:00
Eric Blankenhorn 95f973a5be Adding test and dox for ERR_print_errors_cb 2020-02-20 17:28:34 -06:00
Eric Blankenhorn ba25161f6c Adding BIO and EVP api 2020-02-20 17:28:31 -06:00
Jacob Barthelmeh a9e9120fa0 change public Timeval to WOLFSSL_TIMEVAL 2020-01-28 17:11:46 -07:00
kaleb-himes 9b8d4e91c2 Fixing some typos. Thanks to Fossies for the report 2020-01-10 11:45:51 -07:00
toddouska abc96f20fb
Merge pull request #2696 from embhorn/cert_vfy_CB
CertManager verify callback
2019-12-30 11:57:44 -08:00
Eric Blankenhorn 8580bd9937 CertManager verify callback
Execute verify callback from wolfSSL_CertManagerLoadCA
2019-12-26 09:29:03 -06:00
Eric Blankenhorn b83804cb9d Correct misspellings and typos from codespell tool 2019-12-24 12:29:33 -06:00
kaleb-himes 2607cf3429 Fix up based on peer feedback 2019-12-18 10:55:20 -07:00
kaleb-himes ad3e105303 Add dox documentation for wc_ecc_make_key_ex 2019-11-19 17:06:52 -07:00
John Safranek 14c986360d
Maintenance BLAKE2
1. Remove BLAKE2 support from HMAC.
2. Update doxy header for HMAC with removal of BLAKE2 and addition of SHA-3.
2019-11-18 10:45:30 -08:00
David Garske 872d222b59 * Adds the following openssl compatibility API's:
- SSL_CIPHER_get_id
  - SSL_CIPHER_get_rfc_name
  - SSL_get_cipher_by_value
  - X509_print_ex
  - X509_NAME_add_entry_by_NID
  - X509_time_adj
  - X509_time_adj_ex
  - DTLSv1_get_timeout
  - DTLSv1_handle_timeout
  - DTLSv1_set_initial_timeout_duration
  - SSL_CTX_set_current_time_cb
  - PEM_write_bio_RSA_PUBKEY
  - PEM_read_bio_RSA_PUBKEY
  - PEM_write_bio_PUBKEY
  - EVP_PKEY_missing_parameters
  - EVP_PKEY_cmp
  - BN_is_negative
  - BIO_set_retry_write
* Improvements to the notBefore and notAfter date handling.
* Improvements to BIO and BIO_METHOD
  - Moved structure to public area to allow for dereferencing
  - Renamed members to provide compatibility.
  - Added support for custom BIO methods for read/write.
* Added advanced openssl compatibility test cases for key and certificate generation.
* Fix for `ASN1_STRING_set` to allow NULL data.
* Fix to populate public key information on `EVP_PKEY_assign_RSA` and `EVP_PKEY_assign_EC_KEY`.
* Fix naming for `X509_get_notBefore` and `X509_get_notAfter` functions.
* Added `wc_EccPublicKeyDerSize`.
* Improvements to `wc_RsaPublicKeyDerSize`, so dummy memory doesn't have to be allocated.
* Made the `wc_*PublicKeyDerSize` functions public.
* Eliminate use of snprintf for UTC to generalized time conversion in `wolfSSL_ASN1_TIME_to_generalizedtime`.
2019-09-26 08:42:35 -07:00
Eric Blankenhorn 0c9ba1b361 Adding compatibility API phase 2 2019-08-28 09:29:49 -05:00
Eric Blankenhorn 48fa6a458c Adding compatibility API phase 1 2019-08-13 17:09:56 -05:00
David Garske e3653a7a07 Various spelling corrections. 2019-07-29 08:14:07 -07:00
toddouska 0d48a4a1a7
Merge pull request #2133 from dgarske/fixes_16bit
Fixes for data types, cast warnings and shift operations when using 16-bit platform
2019-03-12 16:53:27 -07:00
David Garske 621e1656b4 Fixes for data types, cast warnings and shift operations when using 16-bit platform. Added new `--enable-16bit` build option, which defines `WC_16BIT_CPU`. Fix build error when using `WOLFSSL_LEANPSK` and `NO_WOLFSSL_MEMORY`.
Tested using `avr-gcc` version 8.3.0 with: `./configure --host=avr --enable-16bit --disable-filesystem --enable-singlethreaded CFLAGS="-DWOLFSSL_GENSEED_FORTEST -DWOLFSSL_USER_CURRTIME -DWOLFSSL_USER_IO -DWOLFSSL_NO_SOCK -DNO_WRITEV -DUSER_TICKS" --enable-tls13 --enable-compkey --enable-certgen --enable-certext --enable-keygen --enable-session-ticket --enable-maxfragment`. Also with `--enable-fastmath`.
2019-03-01 15:54:08 -08:00
Eric Blankenhorn e8c3e8dd63 Decoded cert cache feature 2019-02-28 16:59:19 -06:00
David Garske 289f51a77d Fixes for various spelling errors. 2019-02-21 13:29:44 -08:00
Eric Blankenhorn 02ff19a6c4 Moving PRF to wolfcrypt 2019-01-16 17:23:49 -06:00
David Garske 413506f2b5 Adds new `wc_RsaSetNonblockTime` API and `WC_RSA_NONBLOCK_TIME` build option. This new function configures the maximum amount of blocking time in microseconds. It uses a pre-computed table along with the CPU speed in megahertz to determine if the next operation can be completed within the maximum blocking time provided. 2018-12-19 13:15:41 -08:00