summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/memccpy.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-03-31Inline only use of TS_VERIFY_CTX_init()tb1-2/+2
Since TS_VERIFY_CTX is now opaque, the only thing TS_VERIFY_CTX_init() is good for outside the library is memory leaks. Inside the library it's also useless, since as a much more familiar name is memset(). It will soon be able to join all the other nonsense that should never have leaked out of this library.
2023-03-31Add a regress for the recent BIO_new_NDEF() write after freetb1-2/+59
This is a simple reproducer for a write after free that avoids all the mess with CMS, PKCS7 and SMIME. This now mostly allows ASAN to check that the memory handling in this marvellous function is correct.
2023-03-30i2d_ECDSA_SIG() may return a negative value in case of error. Handlebluhm1-5/+14
this in ossl_ecdsa_sign() and propagate the return code. OK jsing@ tb@
2023-03-30Call bn_copy() unconditionally in BN_mul() and BN_sqr()tb2-11/+6
bn_copy() does the right thing if source and target are the same, so there is no need for an additional check. Requested by jsing
2023-03-30bio_ndef: add an empty line before returntb1-1/+2
2023-03-30Rework BN_exp() a bittb1-27/+28
This mostly only cleans up the mess that it was - which doesn't stand out because of the horror that lurks in the rest of this file. It avoids copying the partial calculation out on error and does away with some other weirdness. with/ok jsing
2023-03-29Rework test failure printingtb1-25/+33
Make sure it's always printed to stderr. Use a wrapper for printing a BIGNUM rather than repeating the same ugly pattern over and over again.
2023-03-29Dedup print functions on test failuretb1-29/+14
2023-03-29Fix printfs that escaped defensive greppingtb1-5/+5
2023-03-29Dedup generate_test_triple() and generate_test_quintuple()tb1-50/+20
2023-03-29Use more consistent names for the main test functionstb1-7/+7
2023-03-29Remove one of those ugly function tablestb1-34/+9
The only reason there were two of them was to avoid some pointless comparisons. The gain is not worth the price.
2023-03-29Rename a few variables for readabilitytb1-45/+43
2023-03-29More whitespace fixes.jsing1-51/+51
Another set of mechnical replacements for "a,b" with "a, b". No change in generated assembly.
2023-03-29Whitespace fixes.jsing1-133/+133
Mechanically replace "a,b" with "a, b". No change to generated assembly.
2023-03-29Whitespace fixes.jsing1-68/+68
Mechanically replace "a,b" with "a, b", followed with some manual indentation clean up. No change in generated assembly.
2023-03-29Use multiple statements instead of a statement with multiple expressions.jsing1-4/+5
No change in generated assembly.
2023-03-29Mop up MD32_XARRAY from SHA1.jsing1-162/+135
MD32_XARRAY (formerly SHA_XARRAY) was added as a workaround for a broken HP C compiler (circa 1999). Clean it up to simplify the code. No change in generated assembly. ok miod@ tb@
2023-03-29Inline initial hash data values for SHA1.jsing1-13/+9
This follows what is done for other SHA implementations. ok miod@ tb@
2023-03-27Reorder functions/code.jsing1-238/+238
No intended functional change.
2023-03-27Replace the remaining BN_copy() with bn_copy()tb19-116/+116
ok jsing
2023-03-27Convert BN_copy() with missing error checks to bn_copy()tb4-11/+18
ok jsing
2023-03-27Convert BN_copy() with explicit comparison against NULL to bn_copy()tb7-25/+25
ok jsing
2023-03-27Use bn_copy() rather than inlining ittb1-2/+2
ok jsing
2023-03-27Tidy includes.jsing1-5/+4
2023-03-27Avoid errno is EINVAL after OpenSSL initializationjan1-1/+5
ok tb@
2023-03-27bn_mod_exp: make this test a bit less noisy on failuretb1-7/+7
While it is good to run more tests on failure, it is pointless to try broken things thousands of times.
2023-03-27Switch regress to using bn_copy()tb2-13/+13
2023-03-27Drop unnecessary parentheses.tb1-3/+3
ok jsing
2023-03-27Convert bn_nist.c to BN_copy()tb1-6/+6
Like everything else in this file, the use of BN_copy() needs to be ... special. Simplify using the new bn_copy(). ok jsing
2023-03-27Add bn_copy(), a sane wrapper of BN_copy() for internal usetb2-2/+10
ok jsing
2023-03-26Remove the now almost empty and unused bn_mod_exp2_mont.ctb1-22/+0
2023-03-26Unhook bn_mod_exp2_mont testtb1-2/+1
2023-03-26Fold the small BN_mod_exp2_mont() crash test into bn_mod_exp.ctb2-23/+27
2023-03-26Test negative modulus as well.tb1-5/+7
Lower the number of rounds. These tests are expensive.
2023-03-26Align bn_mod_exp_zero_test() with bn_mod_exp_test()tb1-11/+11
2023-03-26Fix copy-paste errortb1-2/+2
2023-03-26Replace HASH_BLOCK_DATA_ORDER with sha1_block_data_order.jsing1-4/+4
The only reason to use HASH_BLOCK_DATA_ORDER in the implementation is to make the code harder to read.
2023-03-26Remove unnecessary HIDDEN_DECLS.jsing1-6/+1
2023-03-26Removes some unwanted spaces.jsing1-7/+7
2023-03-26Whack sha1dgst.c with the style(9) stick again.jsing1-193/+246
2023-03-26Add regress coverage for some BIO_f_asn1() bugs fixed before releasetb2-1/+176
2023-03-26Minor whitespace tidyingtb2-6/+7
2023-03-26Tidy up includes.jsing1-9/+5
2023-03-26Inline sha_local.h in sha1dgst.c.jsing1-3/+360
Nothing other than sha1dst.c uses this header - pull it in to sha1dgst.c directly (sha_local.h will be removed at a later date).
2023-03-26Fix a typo in dump_exp_results()tb1-2/+2
2023-03-26Add more extensive regress coverage for BN_mod_exp2_mont()tb1-1/+191
2023-03-26Rename dump_results() into dump_exp_results()tb1-4/+4
This prepares for consistency with an upcoming diff. While here fix an argument order bug.
2023-03-26Move the N_MOD_EXP_TESTS up to where it belongstb1-3/+3
2023-03-26Make several calls to BN_nnmod() unconditionaltb1-19/+10
This removes a potential branch in a sensitive function and makes the code a lot simpler. It is a really bad idea optimize here for what davidben aptly calls "calculator" purposes. ok jsing