Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Move leaf certificate checks to the last thing after chain validation. | beck | 2022-06-25 | 3 | -20/+317 | |
| | | | | | | | | While seemingly illogical and not what is done in Go's validator, this mimics OpenSSL's behavior so that callback overrides for the expiry of a certificate will not "sticky" override a failure to build a chain. ok jsing@ | |||||
* | Use ints for boolean values. | jsing | 2022-06-25 | 1 | -31/+31 | |
| | | | | | | | Switch to using ints for boolean values and use 0 or 1 for constructed, rather than using 0 the ASN.1 tag encoded value (1 << 5). ok tb@ | |||||
* | Reuse ASN1_INTEGER functions for ASN1_ENUMERATED_{get,set}() | jsing | 2022-06-25 | 2 | -56/+59 | |
| | | | | | | | Instead of having a separate get/set implementation, reuse the ASN1_INTEGER code. Also prepare to provide ASN1_ENUMERATED_{get,set}_int64(). ok beck@ tb@ | |||||
* | Check pointer argument after {d2i,i2d}_ASN1_{BIT_STRING,BOOLEAN,INTEGER}() | jsing | 2022-06-25 | 1 | -2/+46 | |
| | ||||||
* | Add regress for ASN1_INTEGER_{get,set}_{u,}int64() | jsing | 2022-06-25 | 1 | -1/+103 | |
| | ||||||
* | Rewrite ASN1_INTEGER_{get,set}() using CBS/CBB | jsing | 2022-06-25 | 4 | -65/+197 | |
| | | | | | | In the process, prepare to provide ASN1_INTEGER_{get,set}_{u,}int64(). ok beck@ tb@ | |||||
* | Simplify ASN1_INTEGER_cmp() | jsing | 2022-06-25 | 1 | -16/+9 | |
| | | | | ok beck@ tb@ | |||||
* | Add regress for ASN1_INTEGER_cmp() | jsing | 2022-06-25 | 1 | -1/+76 | |
| | ||||||
* | Use dynamic linking correctly. bntest and bn_to_string need static linking. | tb | 2022-06-23 | 1 | -3/+5 | |
| | ||||||
* | Explicitly include fcntl.h and unistd.h for pipe2 | tb | 2022-06-22 | 1 | -1/+4 | |
| | ||||||
* | Fix format strings for size_t | tb | 2022-06-22 | 1 | -5/+5 | |
| | ||||||
* | Fix format string: use %zu for size_t, not %lu. | tb | 2022-06-22 | 1 | -3/+3 | |
| | ||||||
* | Error out on negative shifts in BN_{r,l}shift() | tb | 2022-06-22 | 1 | -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 | |||||
* | Tweak a comment | tb | 2022-06-20 | 1 | -2/+2 | |
| | ||||||
* | Flip roles of lowercase and uppercase A and B. | tb | 2022-06-20 | 1 | -44/+44 | |
| | | | | | | | This matches Cohen's text better and makes the entire thing easier to read. suggested by jsing | |||||
* | Clean up BN_kronecker() | tb | 2022-06-20 | 1 | -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 | |||||
* | Fix some bizarre indentation and line breaks. | tb | 2022-06-20 | 1 | -8/+7 | |
| | ||||||
* | Use uppercase for SUCCESS for consistency | tb | 2022-06-19 | 1 | -2/+2 | |
| | ||||||
* | None of these tests needs to link statically. | tb | 2022-06-19 | 2 | -4/+4 | |
| | ||||||
* | Drop bogus DPADD += ${LIBSSL} | tb | 2022-06-19 | 3 | -7/+6 | |
| | ||||||
* | Quick regression test that checks that BN_is_prime_fasttest_ex() | tb | 2022-06-18 | 2 | -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. | |||||
* | Fix prime recognition when doing trial divisions | tb | 2022-06-18 | 1 | -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 | |||||
* | Switch to using TLS_INT instead of handrolling it | tb | 2022-06-15 | 1 | -3/+2 | |
| | ||||||
* | More %i vs %d cleanup | tb | 2022-06-10 | 7 | -20/+20 | |
| | ||||||
* | do not refuse valid IPv6 addresses in -X connect (HTTP CONNECT proxy) | djm | 2022-06-08 | 1 | -2/+2 | |
| | | | | support. Identified by Wilmer van der Gaast, ok millert@ | |||||
* | KNF, mostly whitespace - no binary change on amd64 | tb | 2022-06-08 | 1 | -22/+19 | |
| | ||||||
* | Fix format strings: change %i, %li, %lli to %d, %ld, %lld and switch to | tb | 2022-06-07 | 1 | -18/+18 | |
| | | | | | %zu for master_key_length, session_id_length and sid_ctx_length, which are now size_t. | |||||
* | Change the loop index from an unsigned int to size_t now that all | tb | 2022-06-07 | 1 | -2/+2 | |
| | | | | | | upper bounds are known to be size_t. ok jsing | |||||
* | Simplify another CBS_write_bytes() call in d2i_SSL_SESSION() | tb | 2022-06-07 | 1 | -5/+2 | |
| | | | | ok jsing | |||||
* | Switch sid_ctx_length in SSL, SSL_CTX and SSL_SESSION to a size_t | tb | 2022-06-07 | 1 | -4/+4 | |
| | | | | ok jsing | |||||
* | Use CBS_write_bytes() instead of manual unpacking of a CBS and assigning | tb | 2022-06-07 | 1 | -3/+5 | |
| | | | | | | | length and using memcpy(). This also provides a missing overflow check (which is done by the only caller, however). ok jsing | |||||
* | Simplify various CBS_write_bytes() calls | tb | 2022-06-07 | 3 | -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 | |||||
* | Switch SSL_SESSION's session_id_length to a size_t | tb | 2022-06-07 | 1 | -2/+2 | |
| | | | | ok jsing | |||||
* | Add missing error check call in ssl3_get_new_session_ticket() | tb | 2022-06-07 | 1 | -4/+9 | |
| | | | | | | | EVP_Digest() can fail, so handle failure appropriately and prepare switch of session_id_length to a size_t. ok jsing | |||||
* | Another small readability tweak: compare explicitly against 0 and NULL, | tb | 2022-06-07 | 1 | -4/+3 | |
| | | | | | | respectively ok jsing | |||||
* | Tweak readability of a test: compare tmp explicitly against 0 and drop | tb | 2022-06-07 | 1 | -2/+2 | |
| | | | | | | redundant parentheses. ok jsing | |||||
* | Add a cast to SSL_SESSION_get_id() to indicate that session_id_length | tb | 2022-06-07 | 1 | -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 | |||||
* | fix indent | tb | 2022-06-07 | 1 | -2/+2 | |
| | ||||||
* | Unindent and simplify remove_session_lock() | tb | 2022-06-07 | 1 | -21/+22 | |
| | | | | ok jsing (who informs me he had the same diff in his jungle) | |||||
* | Drop an unnecessary cast | tb | 2022-06-07 | 1 | -2/+2 | |
| | | | | ok jsing | |||||
* | Simplify CBS_write_bytes() invocation | tb | 2022-06-07 | 1 | -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 | |||||
* | The master_key_length can no longer be < 0 | tb | 2022-06-07 | 1 | -2/+2 | |
| | | | | ok jsing | |||||
* | Switch the SSL_SESSION's master_key_length to a size_t | tb | 2022-06-07 | 1 | -2/+2 | |
| | | | | ok jsing | |||||
* | Add error checking to tls_session_secret_cb() calls | tb | 2022-06-07 | 2 | -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 | |||||
* | Use SSL3_CK_VALUE_MASK instead of hardcoded 0xffff and remove some | tb | 2022-06-06 | 2 | -12/+6 | |
| | | | | | | SSLv2 remnants. ok jsing | |||||
* | Tweak comment describing the SSL_SESSION ASN.1 | tb | 2022-06-06 | 1 | -4/+5 | |
| | | | | ok jsing | |||||
* | Minor style cleanup in ssl_txt.c | tb | 2022-06-06 | 1 | -23/+41 | |
| | | | | | | | Wrap long lines and fix a bug where the wrong struct member was checked for NULL. ok jsing | |||||
* | Fix comment + spacing. | tb | 2022-06-06 | 1 | -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. | |||||
* | Remove incorrect and ungrammattical comment | tb | 2022-06-06 | 1 | -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. | |||||
* | Fix spaces before tabs | tb | 2022-06-06 | 1 | -12/+12 | |
| |