Takashi Kojo
56af3a5b36
add HMAC SHA2
2018-04-18 08:47:39 +09:00
Eric Blankenhorn
a0d8327320
Coverity fixes 2 ( #1493 )
...
* Coverity fixes for wolfcrypt folder
* Fixes for remaining issues
* Fixes for test files
2018-04-13 05:35:18 -07:00
toddouska
84f7bd8cde
Merge pull request #1494 from dgarske/wpas
...
Fix for building wpa_supplicant
2018-04-12 13:49:31 -07:00
Jacob Barthelmeh
cfaed48f90
adjust GetInt call with ASN1 integer to big number
2018-04-12 14:40:20 -06:00
Jacob Barthelmeh
df06707496
Handle larger values with ASN1 INTEGER structure
2018-04-12 14:07:29 -06:00
David Garske
cf1230d232
Fix for building wpa_supplicant (./configure --enable-wpas) after PemToDer refactor in PR #1467 .
2018-04-12 06:53:44 -07:00
David Garske
ce6728951f
Added a new --enable-opensslall option, which ensures all openssl features are enabled. Documented and tested building the various open source defines we support in our build.
2018-04-11 13:54:07 -07:00
David Garske
a38576146e
* Added support for disabling PEM to DER functionality using WOLFSSL_PEM_TO_DER. This allows way to use with DER (ASN.1) certificates only in an embedded environment. This option builds, but internal make check requires PEM support for tests.
...
* More cleanup to move PEM functions from ssl.c to asn.c (`wolfSSL_CertPemToDer`, `wolfSSL_KeyPemToDer`, `wolfSSL_PubKeyPemToDer`). Renamed these API's to `wc_` and added backwards compatability macro for old function names.
2018-04-09 13:28:15 -07:00
David Garske
2c72f72752
Fixes for FIPS, sniffer (w/o enc keys), scan-build issues and backwards compatability.
2018-04-09 13:28:15 -07:00
David Garske
1f00ea2115
Fixes for various build issues with type casting and unused functions. Moved mystrnstr to wc_port.c. Added some additional argument checks on pwdbased.
2018-04-09 13:28:15 -07:00
David Garske
6de8348918
Fixes for various build configurations. Added --enable-enckeys option to enable support for encrypted PEM private keys using password callback without having to use opensslextra. Moved ASN CryptKey function to wc_encrypt.c as wc_CryptKey. Fixup some missing heap args on XMALLOC/XFREE in asn.c.
2018-04-09 13:28:15 -07:00
David Garske
1315fad7dc
Added ForceZero on the password buffer after done using it.
2018-04-09 13:28:15 -07:00
David Garske
3a8b08cdbf
Fix to move the hashType out of EncryptedInfo. Fix for parsing "DEC-Info: ". Fix for determining when to set and get ivSz.
2018-04-09 13:28:15 -07:00
David Garske
264496567a
Improvements to EncryptedInfo. Added build option WOLFSSL_ENCRYPTED_KEYS to indicate support for EncryptedInfo. Improvements to wc_PBKDF1 to support more hash types and the non-standard extra data option.
2018-04-09 13:28:15 -07:00
David Garske
f9e830bce7
First pass at changes to move PemToDer into asn.c.
2018-04-09 13:28:14 -07:00
David Garske
21833e245f
Fix TLS 1.3 with ECC disabled and CURVE25519 enabled. Resolves issue with using ./configure --disable-ecc --enable-curve25519 --enable-ed25519 --enable-tls13. Refactor TLSX_KeyShare_GenEccKey to support either ECC or CURVE25519. Fix for PemToDer to handle ED25519 without ECC enabled.
2018-04-09 10:10:08 -07:00
David Garske
2a460d3d05
Merge pull request #1484 from embhorn/coverity
...
Coverity fixes
2018-04-06 18:18:38 -07:00
Eric Blankenhorn
86767e727c
Fixes for CID 185033 185028 185142 185064 185068 185079 185147
2018-04-06 13:15:16 -05:00
Eric Blankenhorn
920e6ed911
Fix warning in ssl.c
2018-04-06 09:30:54 -05:00
Eric Blankenhorn
ec429e50b1
Fixes for ssl.c
2018-04-06 07:45:12 -05:00
toddouska
2b48a074eb
Merge pull request #1480 from dgarske/extcache
...
Fix for HAVE_EXT_CACHE callbacks not being available without OPENSSL_EXTRA
2018-04-05 10:52:44 -07:00
Eric Blankenhorn
5439402c1d
Refactor for max record size ( #1475 )
...
* Added new internal function `wolfSSL_GetMaxRecordSize`.
* Modified tls_bench to use dynamic buffer based on max record size.
* Added comment for DTLS maxFragment calculation.
2018-04-05 09:11:58 -07:00
David Garske
412d4d76ee
Fix for HAVE_EXT_CACHE callbacks not being available without OPENSSL_EXTRA defined. Added tests for external cache callbacks.
2018-04-05 07:10:04 -07:00
David Garske
5702e8ee48
Fix building with HAVE_EXT_CACHE when OPENSSL_EXTRA is not defined. Fixes issue #1474 .
2018-04-04 09:02:52 -07:00
toddouska
a92696edec
Merge pull request #1454 from dgarske/noprivkey
...
Support for not loading a private key when using `HAVE_PK_CALLBACKS`
2018-03-22 12:47:22 -07:00
toddouska
104f7a0170
Merge pull request #1451 from JacobBarthelmeh/Optimizations
...
Adjust X509 small build and add more macro guards
2018-03-21 15:15:27 -07:00
toddouska
2a356228be
Merge pull request #1445 from SparkiDev/wpas_fix
...
Fixes for wpa_supplicant
2018-03-21 15:11:43 -07:00
David Garske
dbb34126f6
* Added support for not loading a private key for server or client when HAVE_PK_CALLBACK is defined and the private PK callback is set. Tested with all cipher suites, TLS 1.2/1.3, client/server certs, RSA/ECC/ED25519.
...
* Added PK callback context tests for client/server examples (`SetupPkCallbackContexts`).
* Added new test define for `TEST_PK_PRIVKEY` to allows simulating hardware based private key.
* Added new test.h function for loading PEM key file and converting to DER (`load_key_file`).
* Added way to get private key signature size (`GetPrivateKeySigSize`).
* Added new ECC API `wc_ecc_sig_size_calc` to return max signature size for a key size.
* Added inline comments to help track down handshake message types.
* Cleanup of RSS PSS terminating byte (0xbc) to use enum value.
* Fixed bug with PK callback for `myEccVerify` public key format.
* Fixed bug with PK callback for ED25519 verify key buffer in DoServerKeyExchange.
2018-03-21 11:27:08 -07:00
Jacob Barthelmeh
df6ea54cd5
add support for PKCS8 decryption to OPENSSL_EXTRA_X509_SMALL build
2018-03-20 15:06:35 -06:00
toddouska
18879ce271
Merge pull request #1440 from dgarske/VerifyRsaSign_PKCallback
...
Added VerifyRsaSign PK callback
2018-03-20 09:02:18 -07:00
toddouska
87c70e76a9
Merge pull request #1441 from dgarske/ocsp_nb
...
Fix for handling OCSP with non-blocking
2018-03-19 12:05:59 -07:00
David Garske
2cc1a1c5bf
Renamed callbacks for VerifySign to SignCheck. Switched the new callback context to use the one for the sign. Fix for callback pointer check on VerifyRsaSign. Added inline comments about the new RsaSignCheckCb and RsaPssSignCheckCb.
2018-03-19 10:19:24 -07:00
toddouska
cb8f8a953b
Merge pull request #1438 from SparkiDev/nginx_pem_write
...
Fix PEM_write_bio_X509 to work with new BIO code
2018-03-19 09:13:51 -07:00
toddouska
7ce2efd572
Merge pull request #1431 from JacobBarthelmeh/Optimizations
...
more aes macro key size guards
2018-03-19 09:07:05 -07:00
Sean Parkinson
b325e0ff91
Fixes for wpa_supplicant
2018-03-19 11:46:38 +10:00
David Garske
fa73f7bc55
Fix for handling OCSP with non-blocking. The HashInput function was being called on the re-entry, which produced a bad mac response from server. Also cleanup for some of the WC_PENDING_E logic for the non-async cases to reduce code size.
2018-03-16 12:05:07 -07:00
David Garske
ed7774e94a
Added new callbacks for the VerifyRsaSign, which uses a private key to verify a created signature. The new callbacks API's are wolfSSL_CTX_SetRsaVerifySignCb and wolfSSL_CTX_SetRsaPssVerifySignCb. These use the same callback prototype as the CallbackRsaVerify and use the same context.
2018-03-15 14:43:41 -07:00
Sean Parkinson
3f99a2a391
Fix PEM_write_bio_X509 to work with new BIO code
2018-03-15 10:45:49 +10:00
Jacob Barthelmeh
8fb3ccacb7
opensslextra fixs and warning for unused variable
2018-03-12 18:05:24 -06:00
Jacob Barthelmeh
6b04ebe3a4
fix for compiling with different build settings
2018-03-12 16:12:10 -06:00
toddouska
b297d9dce0
Merge pull request #1427 from JacobBarthelmeh/Compatibility-Layer
...
return value on bad mutex with error nodes and add x509 host check to OPENSSL_EXTRA
2018-03-12 11:33:20 -07:00
Jacob Barthelmeh
e0afec0600
fix RSA macro, tickets without server, and add test case
2018-03-08 14:36:43 -07:00
Jacob Barthelmeh
e960e0544a
try to clear out error queue with failing mutex
2018-03-08 11:49:16 -07:00
Jacob Barthelmeh
2a0ef55a66
fix for check on return value with mutex error case
2018-03-08 11:26:22 -07:00
Jacob Barthelmeh
74475a26ba
compile more functions in with OPENSSL_EXTRA
2018-03-08 11:06:40 -07:00
Jacob Barthelmeh
799a6b6d2d
fix warning of unused variable and add guard for disable ecc build
2018-03-07 10:35:31 -07:00
Jacob Barthelmeh
a9c6385fd1
trim out more strings and fix DN tag
2018-03-07 10:35:31 -07:00
Jacob Barthelmeh
3f80006b25
add stub code for flag with x509 check host
2018-03-06 11:55:20 -07:00
Jacob Barthelmeh
ae23f777d6
clean up memory in error case with PKCS12 create
2018-03-02 11:35:16 -07:00
Jacob Barthelmeh
e80e82a89b
sanity check on reading newline character
2018-03-01 18:00:52 -07:00