Daniel Pouzzner
b07f2cb461
wolfcrypt/src/coding.c: fix incorrect array bounds check in CEscape(), introduced in 8bbe8a7c8a (before which there was no bounds check at all).
2024-12-21 09:47:07 -06:00
Kareem
8bbe8a7c8a
Fix a couple of missing bounds checks found via code analyzer.
2024-12-19 17:01:25 -07:00
Daniel Pouzzner
122502e2b1
wolfCrypt -Wconversion expansion: fix numerous warnings, all benign, from -Warith-conversion -Wenum-conversion -Wfloat-conversion -Wsign-conversion.
2024-12-18 11:51:06 -06:00
Daniel Pouzzner
c81c9be9ce
error code fixes:
...
* fix TLS layer to consistently use WOLFSSL_FATAL_ERROR for error retvals, rather than literal -1.
* add WC_NO_ERR_TRACE() wrapper around LENGTH_ONLY_E (it does not signify an error condition).
* refactor errcode handling for traceability in wolfSSL_DSA_do_sign(), wolfSSL_DH_size(), wolfSSL_EC_KEY_get_conv_form(), wolfSSL_d2i_DSA_SIG(), wolfSSL_DSA_do_sign(), SetDhInternal(), and wolfSSL_EC_KEY_get_conv_form().
2024-09-06 19:33:48 -05:00
JacobBarthelmeh
31a6a2bf59
update copyright to 2024
2024-07-19 13:15:05 -06:00
Daniel Pouzzner
b3e8f0ad24
add --enable-debug-trace-errcodes, WOLFSSL_DEBUG_TRACE_ERROR_CODES, WC_ERR_TRACE(), WC_NO_ERR_TRACE(), support/gen-debug-trace-error-codes.sh. also add numerous deployments of WC_NO_ERR_TRACE() to inhibit frivolous/misleading errcode traces when -DWOLFSSL_DEBUG_TRACE_ERROR_CODES.
2024-06-08 16:39:53 -05:00
Daniel Pouzzner
f2c97d5d35
fixes for various wolfcrypt -Wconversions visible only on compilers that promote byte and word16 to signed int, then warn of a sign conflict when an intrinsically safe result is assigned back to the original type.
2023-05-09 23:55:08 -05:00
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