Commit Graph

51 Commits

Author SHA1 Message Date
Daniel Pouzzner
ac85cfa3d5 fix "comma at end of enumerator list" warnings in wolfcrypt for C89 compatibility, mostly by just snipping out unneeded comma, but several using WOLF_ENUM_DUMMY_LAST_ELEMENT() to preserve gated enum values as-is. 2023-04-14 13:48:03 -05:00
Sean Parkinson
8851065848 cppcheck fixes
Fix checking of negative with unsigned variables.
Check digestSz for 0 in wc_SSH_KDF() so that no possibility of dividing
by zero.
Change XMEMCPY to XMEMSET in renesas_sce_util.c.
Fix test.c to free prvTmp and pubTmp on read error.
Remove unused variables.
XFREE checks for NULL so don't check before call.
Move variable declarations to reduce scope.
2023-04-03 16:59:58 +10:00
Jacob Barthelmeh
9dcc48c8f7 update copyright to 2023 2022-12-30 17:12:11 -07:00
Kareem
c146fcf581 Update Base16_Encode so the ending null terminator is optional. 2022-09-20 14:44:01 -07:00
Jacob Barthelmeh
8eaa85e412 update copyright year to 2022 2022-07-19 10:44:31 -06:00
TakayukiMatsuo
9e02655ac4 Merge remote-tracking branch 'upstream/master' into os_base64 2021-06-16 23:19:52 +09:00
Guido Vranken
220bfe9926 Fix Base64_SkipNewline such that tests pass 2021-06-14 03:42:41 +02:00
Guido Vranken
fb366f063e Additional length check improvements in Base64_SkipNewline 2021-06-09 19:16:07 +02:00
Guido Vranken
360d6c8a4f Additional fix for Base64_SkipNewline 2021-05-26 00:25:27 +02:00
Guido Vranken
b7663a51b4 Fix length calculations in Base64_SkipNewline
ZD 12328
2021-05-25 03:52:16 +02:00
Eric Blankenhorn
cdede0515c Allow parsing spaces in Base64_SkipNewline 2021-04-28 10:30:16 -05:00
TakayukiMatsuo
9fd8fde714 Add fixes along the review commnents. 2021-03-16 11:55:18 +09:00
Jacob Barthelmeh
c729318ddd update copyright date 2021-03-11 13:42:46 +07:00
Sean Parkinson
cd0670cbd7 RSA: verify only build fixes
configuration: --disable-ecc --disable-dh --disable-aes --disable-aesgcm
--disable-sha512 --disable-sha384 --disable-sha --disable-poly1305
--disable-chacha --disable-md5 --disable-sha3 --enable-cryptonly
--disable-inline --enable-rsavfy --disable-asn --disable-oaep
--disable-rng --disable-filesystem --enable-sp=rsa2048 --enable-sp-math
Fixes to make code build again.
2021-01-06 11:58:15 +10:00
Sean Parkinson
75c062a298 cppcheck: fixes 2020-12-16 17:28:20 +10:00
Sean Parkinson
972d6cfefc Base64: Cache attack resistant decode 2020-12-15 17:22:02 +10:00
Tesfa Mael
d5241bbcc6 Coverity fix 2020-06-02 15:35:27 -07:00
David Garske
a4caa42793 Improve the Base64 line size for NO_ASN case. Fix report of unread ret. 2020-04-24 11:26:55 -07:00
David Garske
28b686a8ca * Exposed useful sizes MAX_X509_HEADER_SZ and PEM_LINE_SZ
* Refactor the PEM saving code in `test.c`, so its not using large 4K buffer and calculates based on DER.
* Enable ECC key generation test even without `WOLFSSL_KEY_GEN`.
* Added `ECC_KEYGEN_SIZE` macro for ECC key generation testing.
* Refactor ECC DER key generation to use `ECC_BUFSIZE`.
2020-04-23 16:11:54 -07:00
Juliusz Sosinowicz
43ce272cb3 Variable declaration at start of scope 2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
9a0d3ba369 Check boundaries in B64 decode
ERR_get_error will always return a positive error code
2020-02-18 21:37:06 +01:00
Juliusz Sosinowicz
fbedabe601 OpenSSH changes
- increase FP_MAX_BITS for OpenSSH
- Add helpful loggin API (names are self-explanatory)
-- wolfSSL_GetLoggingCb
-- WOLFSSL_IS_DEBUG_ON
- Define WOLFSSL_EC_METHOD as an alias of WOLFSSL_EC_GROUP
- Add wolfSSL_EC_GROUP_method_of which really just returns the group itself
- Add wolfSSL_EC_METHOD_get_field_type which gets the curve type of the WOLFSSL_EC_GROUP(remember that WOLFSSL_EC_METHOD is an alias of WOLFSSL_EC_GROUP for now)
- Modify Base64_Decode so that it accepts arbitrary PEM line length
- Modify PemToDer so that it accepts private keys with a custom -----BEGIN * PRIVATE KEY----- header
2020-02-18 21:37:06 +01:00
David Garske
ba9dc11e62 Adds options to disable the hash wrappers (NO_HASH_WRAPPER) and base64 decode (NO_WOLFSSL_BASE64_DECODE). 2020-02-05 11:58:44 -05:00
Chris Conlon
45c5a2d39c update copyright to 2020 2020-01-03 15:06:03 -08:00
Sean Parkinson
6ccd146b49 Bade64_Decode - check out length (malformed input) 2019-12-18 17:06:58 +10:00
Tesfa Mael
54b6148259 Add comment 2019-10-11 15:19:02 -07:00
Tesfa Mael
b7fe49c8b4 NULL terminate a character sequence 2019-10-08 15:42:39 -07:00
John Safranek
246c444b93 Updates for v4.0.0
Update the copyright dates on all the source files to the current year.
2019-03-15 10:37:36 -07:00
David Garske
cfba86d3ab Further cleanup of the Base64 and Base16 encoding start/min value. 2018-10-02 14:38:08 -07:00
David Garske
be2f68d183 Cleanup of the base64 decode start hex 0x2b. 2018-10-02 08:33:45 -07:00
David Garske
3bf325290d Base16/64 improvements:
* Add define `WOLFSSL_BASE16` to explicitly expose base16 support.
* Add `./configure --enable-base16` option (disabled by default in configure, but enabled in coding.h when required internally).
* Added base16 tests in test.c `base16_test`.
* Enabled base64 decode tests when `WOLFSSL_BASE64_ENCODE` is not defined.
2018-03-22 10:36:56 -07:00
Jacob Barthelmeh
df6ea54cd5 add support for PKCS8 decryption to OPENSSL_EXTRA_X509_SMALL build 2018-03-20 15:06:35 -06:00
Chris Conlon
ad53037852 add CAVP selftest option for special build 2018-02-23 10:14:56 -07:00
David Garske
911b6f95f8 Release v3.12.2 (lib 14.0.0). Updated copywright. 2017-10-22 15:58:35 -07:00
Sean Parkinson
24cd46f1f1 Fixes from code review 2017-02-17 11:05:29 -08:00
Chris Conlon
78e62eddd7 fix visual studio code analysis warnings 2016-04-28 13:08:50 -06:00
Jacob Barthelmeh
e99a5b0483 prepare for release v3.9.0 2016-03-17 16:02:13 -06: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
Nickolas Lapp
b85637e06b Fixed bug when getting PEM encoded sz. Add idx check 2015-07-27 10:43:49 -06:00
toddouska
4ba57a609c Merge branch 'ludovic' 2015-07-24 15:39:54 -07:00
Nickolas Lapp
5780f4d5f7 stub notices. edited b64 encode size. err cert depth/sn 2015-07-24 16:30:16 -06:00
Ludovic FLAMENT
8951d72f03 Merge branch 'master' of https://github.com/wolfSSL/wolfssl
Fix DSA key generation
2015-07-23 13:24:20 +02:00
Ludovic FLAMENT
349edd40c2 Add support for OpenSSH ssh-keygen tools
refactor existing code
2015-07-22 14:18:07 +02:00
toddouska
9b81e41856 merge pull request 96 2015-07-16 16:46:37 -07:00
Nickolas Lapp
96cf16848c Stunnel Base Commit 2015-07-14 14:56:26 -06:00
toddouska
555eb66292 fix github issue #40, export Base64_Decode, allow user to export Base64_Encode w/o other options 2015-03-18 15:47:19 -07:00
kaleb-himes
a389620a29 Copyright (C) updates 2015-01-08 09:39:04 -07:00
kaleb-himes
15f021c074 --enable-bump fixed 2015-01-05 10:41:22 -07:00
Jacob Barthelmeh
966ca9c97e clean up comments on c files and fix duplicate in chacah header 2015-01-04 23:26:26 -07:00
Jacob Barthelmeh
38e129fd24 cleaning up some cyassl 2014-12-31 17:01:27 -07:00