Commit Graph

536 Commits (03b571cde4869c121565aecfc8a2cbc5bc1b33ab)

Author SHA1 Message Date
Ludovic FLAMENT 03b571cde4 fix some bugs, add Windows support 2016-05-07 21:12:08 +02:00
Ludovic FLAMENT 5d1de3bb33 One file for all BIO functions in wolfcrypt
move required functions from wolfssl to wolfcrypt
add client/server tests for BIO
2016-05-05 12:58:21 +02:00
Ludovic FLAMENT 1bd65cc8a9 First version for OpenSSL BIO compatibility 2016-04-29 16:34:11 +02:00
kaleb-himes 24d93c90cd update for configure option --disable-sha 2016-02-16 12:03:37 -07:00
toddouska 3d8f91d418 Merge pull request #302 from dgarske/EccOnlyNoSignVerify
New ECC and ASN build options for reduce build size options
2016-02-15 12:13:43 -08:00
JacobBarthelmeh 7de352a0e9 Merge pull request #311 from dgarske/FixSkipObjectIdWarn
Fixes warning with SkipObjectId defined but not used.
2016-02-12 15:04:04 -07:00
David Garske a969dd8efd Fixed "error: unused function 'StoreRsaKey'" with NO_ASN_TIME and RSA enabled. 2016-02-12 13:19:58 -08:00
David Garske aeaac15682 Fixed compile errors in signature.c if ECC on but ECC sign/verify disabled. Added new NO_ASN_TIME option to reduce ASN size for space constrained or missing RTC. Added check to make sure ASN is enabled if ECC sign/verify is enabled. 2016-02-12 13:16:39 -08:00
David Garske f328c6bdf7 Fixes warning with SkipObjectId defined but not used. 2016-02-12 12:34:22 -08:00
David Garske 08c663a4ac Added new CUSTOM_RAND_GENERATE_BLOCK option that allows override and disabling of the HASHDRBG for customers who have a HW RNG they would like to use instead.
Examples:
"./configure --disable-hashdrbg CFLAGS="-DCUSTOM_RAND_GENERATE_BLOCK= custom_rand_generate_block".
OR
/* RNG */
//#define HAVE_HASHDRBG
extern int custom_rand_generate_block(unsigned char* output, unsigned int sz);
2016-02-12 11:59:51 -08:00
David Garske 4872f2bc33 Added the following ECC optional config defines: HAVE_ECC_SIGN, HAVE_ECC_VERIFY, HAVE_ECC_DHE, HAVE_ECC_KEY_IMPORT and HAVE_ECC_KEY_EXPORT. Still working through issues with using ECC sign/verify with ASN disabled. Added documentation to top of ecc.c for all the ECC define options. 2016-02-12 11:07:50 -08:00
David Garske a83ff6aada Updated the configure.ac comments about big int being used for ECC and DH. Moved the checks for ecc/asn and psk/asn until after cryptonly value is set and fixed so those checks work for normal build and are excluded for crypt only builds. 2016-02-10 13:03:53 -08:00
David Garske 8d0d5a3f90 Fixes so ECC only build works. Fixes so ECC enabled with ASN disabled works and will prevent ECC sign/verify. 2016-02-10 08:53:09 -08:00
toddouska 014740eda0 Merge pull request #289 from dgarske/SigHashFixes
Fixes/improvements to the signature and hash wrappers:
2016-02-09 09:23:18 -08:00
David Garske 09615c01cc Updated the naming for the new encoding DER signature enum and function. 2016-02-08 12:04:38 -08:00
David Garske cb3a9cc348 Removed the execute bit on all .c, .h, and .cs files. 2016-02-08 09:45:31 -08:00
David Garske d5f410523a Fixed possible memory leak on signature wrapper ASN encode and corrected the maximum header size. Added new MAX_ENCODED_HEADER_SZ which is the maximum encoded ASN header size and update asn.c to use it. Added comment about key size sanity check. Renamed wc_SignatureRsaEncode to wc_SignatureAsnEncode. 2016-02-05 16:01:42 -08:00
David Garske e031d2fa06 Removed the execute bit on all .c files. These were inadvertently set in PR #293 due to editing files through Windows VMWare shared folder. 2016-02-05 14:25:43 -08:00
JacobBarthelmeh a4f1138e5b Merge pull request #293 from dgarske/WinWarnFixes
Fixes several warnings that were seeing building with Visual Studio 2…
2016-02-05 13:20:22 -07:00
JacobBarthelmeh 25959bfb62 Merge pull request #279 from dgarske/CustRandGenSeed_OSArg
Added new CUSTOM_RAND_GENERATE_SEED_OS macro
2016-02-05 11:18:18 -07:00
David Garske be99fcff43 Fixed typo in wc_SignatureGetSize causing error. 2016-02-05 07:32:47 -08:00
dgarske ee4b8b2f10 Merge pull request #291 from kaleb-himes/master
Fixes for disabling the crypt test and benchmark. Added new "./configure --disable-crypttests" option. Added new NO_CRYPT_BENCHMARK define.
2016-02-04 17:06:59 -08:00
toddouska ae19b7a272 Merge pull request #290 from dgarske/PemPubKey_CertExt_Fixes
Public key PEM to DER fixes
2016-02-04 15:19:15 -08:00
David Garske faf590eb22 Fix for "warning: Value stored to 'ret' is never read". Now explicitly set SIG_TYPE_E in each case. Fixed wc_SignatureGetSize so it will return SIG_TYPE_E for unsupported type scenario. 2016-02-04 12:49:39 -08:00
David Garske bc059e12c2 Cleanup to remove trailing whitespace and convert tabs to spaces. 2016-02-04 12:31:08 -08:00
David Garske be4c400d16 Fixes for disabling the crypt test and benchmark. Added new "./configure --disable-crypttests" option. Also made sure use of both NO_CRYPT_BENCHMARK and NO_CRYPT_TEST in "./configure CFLAGS=-D" scenario work correctly. 2016-02-04 12:06:24 -08:00
David Garske 2257c1dcef Fixes several warnings that were seeing building with Visual Studio 2015. Also noticed issue with "struct Options" in internal.h for the bit flags that was causing split due to type difference (byte vs. word16). 2016-02-04 11:30:48 -08:00
kaleb-himes bf1af39027 benchmark needs a main if NO_CRYPT_BENCHMARK defined 2016-02-04 12:07:39 -07:00
Kaleb Joseph Himes 7936c7a72e Merge pull request #286 from dgarske/DisableBench
Added optional define "NO_CRYPT_BENCHMARK" to allow disabling benchmark
2016-02-04 10:59:55 -08:00
toddouska d39c6a6e13 Merge pull request #287 from JacobBarthelmeh/fast-rsa
Force Zero of data when done
2016-02-04 10:59:21 -08:00
Jacob Barthelmeh 42219a327a refactor ForceZero of memory to gain performance 2016-02-04 10:31:05 -07:00
David Garske f3399b6578 Fixes/improvements to the signature and hash wrappers:
Fixed output buffer to wc_RsaSSL_Verify so its min size is the key size (needed for inline operations).
Fixed the signature wrapper return codes when using RSA so 0 indicates success.
Fixed signature wrappers use of wc_HashGetDigestSize to return the error code result.
Changed enum wc_HashType and enum wc_SignatureType so all values always exist.
Added new "wc_HashGetOID" which returns the OID for an enum wc_HashType.
Added new "WC_SIGNATURE_TYPE_RSA_W_ENC", that adds the encoded ASN header to the digest using wc_EncodeSignature for RSA signatures.
Added new SIG_TYPE_E and HASH_TYPE_E error types for explicit reporting of sig/hash type not available.
2016-02-03 15:07:56 -08:00
David Garske a6b7c00c9c Fix so WOLFSSL_CERT_EXT can be defined without WOLFSSL_CERT_GEN. Added new WOLFSSL_PUB_PEM_TO_DER to allow the public key PEM to DER functions to be available without CERT_GEN or CERT_EXT. Fix to add NO_FILESYSTEM check around wolfSSL_PemPubKeyToDer in ssl.h. Cleanup in coding.h for the #if check. 2016-02-03 14:58:46 -08:00
toddouska 8edf38632b Merge pull request #284 from JacobBarthelmeh/DH
fixed point DH operations
2016-02-02 08:31:30 -08:00
Jacob Barthelmeh cad6a08f10 comment for clarifying table of DH sizes 2016-02-01 17:11:01 -07:00
David Garske dda0de4baa Added optional define "NO_CRYPT_BENCHMARK" to allow disabling benchmark code. 2016-02-01 13:04:30 -08:00
Jacob Barthelmeh d0f8132cdc forcing sensitive memory to be all zeros when done with it 2016-02-01 10:45:09 -07:00
John Safranek b6017c59ba Merge pull request #275 from dgarske/WolfErrorTypo
Fixed spelling errors
2016-02-01 09:00:10 -08:00
John Safranek 6fd5579130 Merge pull request #281 from toddouska/math-rsa-fix
fix normal math off by one loop error in fast_s_mp_mul_high_digs
2016-01-29 16:59:36 -08:00
David Garske f8876854f4 Spelling fixes in comments and error strings (ALGO_ID_E, ASN_TIME_E and WOLFSSL_ERROR function). 2016-01-29 16:13:09 -08:00
toddouska 3f87d28190 Merge pull request #280 from JacobBarthelmeh/master
Update ChaCha20-Poly1305 cipher suites
2016-01-29 14:12:53 -08:00
toddouska fa25e5d09d fix normal math off by one loop error in fast_s_mp_mul_high_digs 2016-01-29 13:54:41 -08:00
Jacob Barthelmeh 9a5ad356a6 fixed point DH operations 2016-01-29 10:31:49 -07:00
David Garske 2bc0ae05b5 Added new CUSTOM_RAND_GENERATE_SEED_OS macro to allow custom random generation, which includes the OS_Seed. Opted to create new macro instead of modifying existing CUSTOM_RAND_GENERATE_SEED. 2016-01-28 09:31:36 -08:00
David Garske fa64abd83e Fix for deleted USER_TIME gmtime forward declaration. Fix to make sure XGMTIME maps to gmtime just as previous code did. 2016-01-27 13:20:06 -08:00
Jacob Barthelmeh 7d71d756f3 update ChaCha20-Poly1305 to most recent RFCs 2016-01-27 14:03:05 -07:00
David Garske fadd97de3a Moved the forward declarations until after the struct tm and time_t have been defined. 2016-01-27 11:17:54 -08:00
David Garske 5c4a3462ee Cleanup of the time macros in asn.c to allow expanded use of wolf "struct tm", "time_t" and "gmtime". Cleanup of the io.c socket includes for clarity. Cleanup trailing spaces in io.c and asn.c. 2016-01-26 13:47:01 -08:00
Chris Conlon 0801eeac8d update support for Freescale KSDK 1.3.0 2016-01-25 10:41:26 -07:00
Jacob Barthelmeh 63d1f81fb1 cast XMALLOC to byte pointer 2016-01-21 09:05:19 -07:00