Juliusz Sosinowicz
6dffa8a13d
Implement EVP_EncodeBlock
and EVP_DecodeBlock
2022-04-01 13:29:40 +02:00
Sean Parkinson
79444fdb56
Merge pull request #4997 from dgarske/qat_eckg
...
Support for Intel QuickAssist ECC KeyGen acceleration
2022-04-01 08:32:21 +10:00
Sean Parkinson
1add8703e2
Merge pull request #4996 from haydenroche5/bn_rand
...
Improve wolfSSL_BN_rand.
2022-04-01 08:12:22 +10:00
David Garske
61f6b5e29c
Peer review feedback.
2022-03-31 10:04:23 -07:00
David Garske
c905c613e9
Support for Intel QuickAssist ECC KeyGen acceleration.
2022-03-30 13:07:47 -07:00
Hayden Roche
2077690bf0
Improve wolfSSL_BN_rand.
...
- Previously, this function would round up the requested bits to the next
multiple of 8. With this commit, the function returns a number of exactly the
number of bits requested, which is the same behavior as OpenSSL. This problem
was discovered by a user using the compatibility layer with OpenSSH's ssh-keygen
utility.
- This function now respects the top and bottom parameters.
- Improved unit testing.
2022-03-29 18:08:21 -07:00
Jacob Barthelmeh
f7f94cede0
support creating new mem bio of length 0
2022-03-28 15:52:42 -06:00
Daniel Pouzzner
008c8509c6
multi-test fixes: whitespace in wolfcrypt/src/random.c and wolfcrypt/test/test.c, bugprone-macro-parentheses and -Wenum-compare in WS_RETURN_CODE() (wolfssl/ssl.h), and clang-analyzer-deadcode.DeadStores in api.c.
2022-03-25 13:26:41 -05:00
Juliusz Sosinowicz
88d5059c36
Jenkins fixes
...
`WS_RETURN_CODE` was not functioning properly in master
2022-03-24 12:16:59 +01:00
Juliusz Sosinowicz
98bc8402db
Refactor memory BIO
...
- use the `WOLFSSL_BUF_MEM` struct to resize the internal memory buffer
- add a `WOLFSSL_BIO_RESIZE_THRESHOLD` define that will be used to determine how often to shrink the internal buffer. This should cut down on the number of free/malloc calls made significantly. This should help with our inefficient 1 byte reads in `loadX509orX509REQFromPemBio`.
- implement `wolfSSL_BUF_MEM_resize` which allows bi-directional buffer size manipulation
2022-03-24 12:16:59 +01:00
Juliusz Sosinowicz
9763030675
Merge pull request #4845 from cconlon/pkcs7compat
2022-03-21 15:26:37 +01:00
Hayden Roche
dcaa218ed8
Merge pull request #4927 from cconlon/upRef
2022-03-18 18:10:36 -07:00
Hayden Roche
2637e5e361
Merge pull request #4926 from cconlon/namePrintRFC5523
2022-03-18 15:53:07 -07:00
David Garske
a79daa5ea8
Merge pull request #4959 from haydenroche5/asn1_time_diff_bug
...
Fix bug in wolfSSL_ASN1_TIME_diff.
2022-03-18 14:28:23 -07:00
Chris Conlon
582f0d82e4
address review feedback for PKCS7 compat additions
2022-03-18 12:07:44 -06: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
Hayden Roche
6e6aa5b0c1
Fix bug in wolfSSL_ASN1_TIME_diff.
...
This function should not error out if one of the passed in times is the Unix
epoch. This amounts to erroring out when the XMKTIME returns < 0, rather than
<= 0.
2022-03-15 10:52:05 -07:00
Chris Conlon
6762cd90da
add tests for PKCS7_sign(), PKCS7_final(), SMIME_write_PKCS7()
2022-03-15 10:21:22 -06:00
Chris Conlon
a7d5e6400d
add support for PKCS7_TEXT flag to PKCS7_verify()
2022-03-15 10:21:22 -06:00
Daniel Pouzzner
4966eb7897
Merge pull request #4944 from douzzer/20220310-asn-template-EncodeExtensions-overrun
...
wolfcrypt/src/asn.c: fix buffer underrun in EncodeExtensions() and leak in ParseCRL_Extensions()
2022-03-13 21:21:07 -05:00
Sean Parkinson
cdb45b12c5
Merge pull request #4884 from haydenroche5/i2d_x509_name_fix
...
Improve wolfSSL_i2d_X509_name.
2022-03-14 11:57:07 +10:00
Daniel Pouzzner
82ab7bf32c
ssl.c: fix hash state memory leaks in wolfSSL_clear() and wolfSSL_TicketKeyCb().
2022-03-11 13:40:01 -06:00
Chris Conlon
9fff321e3e
address PR review feedback on EVP_PKEY changes
2022-03-11 10:11:02 -07:00
Sean Parkinson
47895fe78d
Merge pull request #4942 from dgarske/sp_math_opensslextra
...
Fixes to support building opensslextra with SP math
2022-03-10 08:53:21 +10:00
Chris Conlon
e1da313b91
EVP_PKEY_copy_parameters: add support for EVP_PKEY_DH
2022-03-09 14:34:09 -07:00
David Garske
3a62857dbd
Fixes to support building opensslextra with SP math. Disables some of the compatibility layer BN and ECC point handling.
2022-03-09 11:53:56 -08:00
Daniel Pouzzner
67cc8ed482
tests/api.c: fix test_wolfSSL_BIO_Qt_usecase() "function declaration isn’t a prototype".
2022-03-09 12:27:19 -06:00
Chris Conlon
70857f7b3c
Merge pull request #4923 from miyazakh/set_bio
...
Set bio read/write flag obviously
2022-03-08 13:08:33 -07:00
Hideki Miyazaki
f71be0546c
addressed review comments
2022-03-08 18:20:30 +09:00
Chris Conlon
f49983b3b3
EVP_PKEY_keygen: add DH keygen support, fixes to EVP_PKEY_set1/get1_DH
2022-03-07 16:32:23 -07:00
Chris Conlon
85f85cc76a
add DH_up_ref() and unit test
2022-03-07 16:32:22 -07:00
Chris Conlon
76014260f6
add EC_KEY_up_ref() and unit test
2022-03-07 16:31:09 -07:00
David Garske
9b808bde20
Fixes for building with HAVE_EX_DATA
no compat layer.
2022-03-07 17:20:58 -06:00
Hideki Miyazaki
6bc3b7fc9d
addressed jenkins failure
2022-03-06 07:41:37 +09:00
Hideki Miyazaki
a572c19268
set bio flag obviously
...
fix nightly Qt test
2022-03-06 07:41:36 +09:00
Chris Conlon
930a3d85e1
add support to X509_NAME_print_ex() for RFC5523 basic escape
2022-03-04 17:19:33 -07:00
David Garske
3839b0e675
Fixes for building wolfSSL along side openssl.
2022-03-04 12:06:24 -08:00
Chris Conlon
e1829e614d
Merge pull request #4820 from haydenroche5/evp_pkey_paramgen
...
Add wolfSSL_EVP_PKEY_paramgen to the compatibility layer.
2022-03-04 11:49:21 -07:00
Sean Parkinson
59970d94f5
Merge pull request #4908 from dgarske/tick_pad
...
Fix for padding in session tickets
2022-03-03 08:20:35 +10:00
David Garske
119f2d2651
Fix for padding in session tickets. Adds padding based on WOLFSSL_GENERAL_ALIGNMENT
. Increases enc_len
to 32-bit. Related to PR #4887
2022-03-01 15:40:57 -08:00
Jacob Barthelmeh
45ff8af026
refactor PKCS12 parse key creation
2022-03-01 14:49:59 -07:00
Sean Parkinson
1aff4399d1
Merge pull request #4899 from dgarske/kcapi
...
Improvements to KCAPI support
2022-03-01 08:52:55 +10:00
Juliusz Sosinowicz
92bd5a4076
Merge pull request #4891 from dgarske/multi_test
2022-02-28 15:28:39 +01:00
Sean Parkinson
f3df4400d5
Merge pull request #4886 from dgarske/zd13745
...
Adds CSR userId support in subject name
2022-02-28 10:15:41 +10:00
David Garske
cc2eb0ab71
KCAPI Testing fixes.
2022-02-25 15:16:55 -08:00
Chris Conlon
870ff5b352
Merge pull request #4890 from miyazakh/objinfo
...
fix to use EXT_KEY_USAGE_OID in object_info
2022-02-25 16:02:48 -07:00
David Garske
a2381ba954
Adds CSR userId support in subject name. Minor build fixes for ASN template.
2022-02-25 14:22:59 -08:00
David Garske
a39a1c1d87
More fixups from cppcheck and clang-tidy.
2022-02-25 10:03:17 -08:00
Hayden Roche
c33ae4c245
Improve wolfSSL_i2d_X509_NAME and wolfSSL_i2d_X509_NAME_canon.
...
Like other i2d functions, these functions should be able to take a NULL output
parameter and return the necessary output buffer size. This commit adds this
ability. This commit also removes some redundant code in wolfSSL_i2d_X509_NAME.
2022-02-24 14:48:52 -08:00
Hideki Miyazaki
de81447b2d
fix to use EXT_KEY_USAGE_OID in object_info
2022-02-24 15:18:32 +09:00