summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/merge.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-06-22Fix format strings for size_ttb1-5/+5
2022-06-22Fix format string: use %zu for size_t, not %lu.tb1-3/+3
2022-06-22Error out on negative shifts in BN_{r,l}shift()tb1-1/+13
Without these checks in both functions nw = n / BN_BITS2 will be negative and this leads to out-of-bounds accesses via negative array indices and memset with a negative size. Pointed out by cheloha ok jsing
2022-06-20Tweak a commenttb1-2/+2
2022-06-20Flip roles of lowercase and uppercase A and B.tb1-44/+44
This matches Cohen's text better and makes the entire thing easier to read. suggested by jsing
2022-06-20Clean up BN_kronecker()tb1-73/+88
Instead of "Cohen's step N" explain in words what is being done. Things such as (A & B & 2) != 0 being equivalent to (-1)^((A-1)(B-1)/4) being negative are not entirely obvious... Remove the strange error dance and adjust variable names to what Cohen's book uses. Simplify various curly bits. ok jsing
2022-06-20Fix some bizarre indentation and line breaks.tb1-8/+7
2022-06-19Use uppercase for SUCCESS for consistencytb1-2/+2
2022-06-19None of these tests needs to link statically.tb2-4/+4
2022-06-19Drop bogus DPADD += ${LIBSSL}tb3-7/+6
2022-06-18Quick regression test that checks that BN_is_prime_fasttest_ex()tb2-1/+97
recognizes the primes in the primes[] table with and without trial division. Would have caught the bug fixed in bn_primes.c r1.9.
2022-06-18Fix prime recognition when doing trial divisionstb1-2/+2
If gcd(a, primes[i]) == 0 then a could still be a prime, namely in the case that a == primes[i], so check for that case as well. Problem noted by Martin Grenouilloux ok jsing
2022-06-15Switch to using TLS_INT instead of handrolling ittb1-3/+2
2022-06-10More %i vs %d cleanuptb7-20/+20
2022-06-08do not refuse valid IPv6 addresses in -X connect (HTTP CONNECT proxy)djm1-2/+2
support. Identified by Wilmer van der Gaast, ok millert@
2022-06-08KNF, mostly whitespace - no binary change on amd64tb1-22/+19
2022-06-07Fix format strings: change %i, %li, %lli to %d, %ld, %lld and switch totb1-18/+18
%zu for master_key_length, session_id_length and sid_ctx_length, which are now size_t.
2022-06-07Change the loop index from an unsigned int to size_t now that alltb1-2/+2
upper bounds are known to be size_t. ok jsing
2022-06-07Simplify another CBS_write_bytes() call in d2i_SSL_SESSION()tb1-5/+2
ok jsing
2022-06-07Switch sid_ctx_length in SSL, SSL_CTX and SSL_SESSION to a size_ttb1-4/+4
ok jsing
2022-06-07Use CBS_write_bytes() instead of manual unpacking of a CBS and assigningtb1-3/+5
length and using memcpy(). This also provides a missing overflow check (which is done by the only caller, however). ok jsing
2022-06-07Simplify various CBS_write_bytes() callstb3-13/+7
Now that session_id_length is a size_t, we can pass it directly to CBS_write_bytes() instead of using a temporary variable. ok jsing
2022-06-07Switch SSL_SESSION's session_id_length to a size_ttb1-2/+2
ok jsing
2022-06-07Add missing error check call in ssl3_get_new_session_ticket()tb1-4/+9
EVP_Digest() can fail, so handle failure appropriately and prepare switch of session_id_length to a size_t. ok jsing
2022-06-07Another small readability tweak: compare explicitly against 0 and NULL,tb1-4/+3
respectively ok jsing
2022-06-07Tweak readability of a test: compare tmp explicitly against 0 and droptb1-2/+2
redundant parentheses. ok jsing
2022-06-07Add a cast to SSL_SESSION_get_id() to indicate that session_id_lengthtb1-2/+2
is deliberately reduced to an unsigned int. Since the session_id is at most 32 bytes, this is not a concern. ok jsing
2022-06-07fix indenttb1-2/+2
2022-06-07Unindent and simplify remove_session_lock()tb1-21/+22
ok jsing (who informs me he had the same diff in his jungle)
2022-06-07Drop an unnecessary casttb1-2/+2
ok jsing
2022-06-07Simplify CBS_write_bytes() invocationtb1-5/+2
Now that master_key_length is a size_t, we no longer have to fiddle with data_len. We can rather pass a pointer to it to CBS_write_bytes(). ok jsing
2022-06-07The master_key_length can no longer be < 0tb1-2/+2
ok jsing
2022-06-07Switch the SSL_SESSION's master_key_length to a size_ttb1-2/+2
ok jsing
2022-06-07Add error checking to tls_session_secret_cb() callstb2-32/+49
Failure of this undocumented callback was previously silently ignored. Follow OpenSSL's behavior and throw an internal error (for lack of a better choice) if the callback failed or if it set the master_key_length to a negative number. Unindent the success path and clean up some strange idioms. ok jsing
2022-06-06Use SSL3_CK_VALUE_MASK instead of hardcoded 0xffff and remove sometb2-12/+6
SSLv2 remnants. ok jsing
2022-06-06Tweak comment describing the SSL_SESSION ASN.1tb1-4/+5
ok jsing
2022-06-06Minor style cleanup in ssl_txt.ctb1-23/+41
Wrap long lines and fix a bug where the wrong struct member was checked for NULL. ok jsing
2022-06-06Fix comment + spacing.tb1-2/+2
Apparently 60 * 5 + 4 seconds is 5 minutes. Presumably this is the case with sufficiently potent crack, which would explain a few things in here.
2022-06-06Remove incorrect and ungrammattical commenttb1-3/+2
The fallback to SHA-1 if SHA-256 is disabled fell victim to tedu many moons ago when this file was still called s3_clnt.c and had no RCS ID.
2022-06-06Fix spaces before tabstb1-12/+12
2022-06-06Minor tweaks to psk modes regresstb1-3/+3
2022-06-05move the calls to psk kex modes tests down to match order in ssl_tlsext.ctb1-4/+4
2022-06-05Add regress coverage for PSK kex modes tlsext handlers.tb1-2/+210
2022-06-04The parse stubs need to skip over the extension data.tb1-3/+3
Found by anton with tlsfuzzer ok anton
2022-06-04Tweak a comment using review feedback from jsingtb1-4/+4
2022-06-03Add stubbed out handlers for the pre_shared_key extensiontb2-2/+65
ok jsing
2022-06-03Implement handlers for the psk_key_exchange_modes extensions.tb2-3/+96
ok jsing
2022-06-03Add a use_psk_dhe_ke flag to the TLSv1.3 handshake structtb1-1/+4
This will be used to indicate client side support for DHE key establishment. ok jsing
2022-06-03Ensure that a client who sent a PSK extension has also sent a PSKtb1-4/+9
key exchange mode extension, as required by RFC 8446, 4.2.9. ok jsing
2022-06-03Provide #defines for the two currently registered PskKeyExchangeModes.tb1-1/+12
ok jsing