summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/kdf (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Unwrap two linestb2024-07-101-7/+4
|
* Add another empty linetb2024-07-091-1/+2
|
* Turn tls1_prf_alg() into single exittb2024-07-091-9/+11
| | | | | requested by jsing on review ok beck
* Unwrap a few more linestb2024-07-091-9/+5
|
* Unwrap a couple of linestb2024-07-091-5/+3
|
* Align math with t1_enc.ctb2024-07-091-6/+8
| | | | suggested by jsing on review
* Minor cosmetics in pkey_tls1_prf_derive()tb2024-07-091-5/+3
| | | | noticed by jsing on review
* Replace explicit_bzero() plus free() with freezero()tb2024-07-091-3/+2
| | | | This is simpler, if slightly more expensive
* Shuffle things into a more sensible ordertb2024-07-091-63/+58
| | | | no functional change
* Use better order in EVP_PKEY_CTRL_TLS_SECRETtb2024-07-091-6/+5
| | | | Also avoid an unnecessary NULL check.
* Make a NULL check explicittb2024-07-091-2/+2
|
* Zap or align some ugly commentstb2024-07-091-4/+3
|
* Test & assign once moretb2024-07-091-4/+4
|
* sec_len -> secret_lentb2024-07-091-3/+3
|
* Test and assign in tls1_prf_P_hash()tb2024-07-091-5/+8
|
* Fix whitespace around '/'tb2024-07-091-4/+4
|
* Invert logic in tls1_prf_alg()tb2024-07-091-22/+22
|
* olen -> out_lentb2024-07-091-15/+15
|
* Add a few empty linestb2024-07-091-1/+7
|
* seedlen -> seed_lentb2024-07-091-10/+10
|
* seclen -> secret_lentb2024-07-091-7/+7
|
* slen -> secret_lentb2024-07-091-7/+8
|
* sec -> secrettb2024-07-091-17/+17
|
* Replace local typedef with spelling out the struct nametb2024-07-091-8/+8
|
* Remove a few useless commentstb2024-07-091-6/+1
|
* Apply a knfmt(8) sledgehammertb2024-07-091-226/+236
|
* Add an RCS tagtb2024-07-091-1/+1
|
* Replace license stub with full licensetb2024-07-091-5/+55
| | | | | This reverts to the license added in OpenSSL's initial import of this file in commit 1eff3485b63f84956b5f212aa4d853783bf6c8b5
* Replace a malloc() call with calloc()tb2024-07-091-1/+1
|
* Replace an ossl_assert() with an error checktb2024-07-091-2/+1
|
* Use C99 initializers for tls1_prf_pkey_meth()tb2024-07-091-19/+23
|
* Inline an instance of OPENSSL_memdup()tb2024-07-091-2/+11
|
* Tidy up includestb2024-07-091-3/+7
|
* OPENSSL_free() -> free()tb2024-07-091-1/+1
|
* OPENSSL_cleanse() -> explicit_bzero()tb2024-07-091-3/+3
|
* OPENSSL_clear_free() -> freezero()tb2024-07-091-4/+4
|
* OPENSSL_malloc() -> malloc()tb2024-07-091-1/+1
|
* Spell OPENSSL_zalloc() correctly as calloc()tb2024-07-091-1/+1
|
* Mechanically replace KDFerr() with KDFerror()tb2024-07-091-8/+8
|
* Add a verbatim copy of tls1_prf.c from OpenSSL 1.1.1tb2024-07-091-0/+278
| | | | | | | | | | | | From the last public commit b372b1f76450acdfed1e2301a39810146e28b02c of the OpenSSL_1_1_1-stable branch SHA256 (kdf/tls1_prf.c) = a519d3ff721d4ec59befac8586e24624fa87d9d8f6479327f7af58d652b6e4e5 Will be beat (a little bit) into shape in tree before linking it to the build. ok jsing
* Add various defines for TLS1-PRFtb2024-07-092-2/+36
| | | | ok jsing
* libcrypto: constify most error string tablestb2024-06-241-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | These constitute the bulk of the remaining global mutable state in libcrypto. This commit moves most of them into data.rel.ro, leaving out ERR_str_{functs,libraries,reasons} (which require a slightly different approach) and SYS_str_reasons which is populated on startup. The main observation is that if ERR_load_strings() is called with a 0 lib argument, the ERR_STRING_DATA argument is not actually modified. We could use this fact to cast away const on the caller side and be done with it. We can make this cleaner by adding a helper ERR_load_const_strings() which explicitly avoids the assignment to str->error overriding the error code already set in the table. In order for this to work, we need to sprinkle some const in err/err.c. CMS called ERR_load_strings() with non-0 lib argument, but this didn't actually modify the error data since it ored in the value already stored in the table. Annoyingly, we need to cast const away once, namely in the call to lh_insert() in int_err_set_item(). Fixing this would require changing the public API and is going to be tricky since it requires that the LHASH_DOALL_FN_* types adjust. ok jsing
* Adjust EVP_PKEY_CTRL_HKDF_KEY to OpenSSL's semanticstb2023-06-261-2/+9
| | | | | | | | | | | | For some reason there is no NULL check on setting the HKDF key for p2 like in the other cases in the switch, instead OpenSSL fail in memdup, nulling out the key but leaving he key_len at the old value. This looks accidental but our behavior makes some haproxy regress tests segfault. So mimic weird OpenSSL semantics but in addition set the key_len to 0. Reported by Ilya Shipitsin ok jsing
* Make internal header file names consistenttb2022-11-261-2/+2
| | | | | | | | | | | | | | | | Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names used for internal headers. Move all these headers we inherited from OpenSSL to *_local.h, reserving the name *_internal.h for our own code. Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h. constant_time_locl.h is moved to constant_time.h since it's special. Adjust all .c files in libcrypto, libssl and regress. The diff is mechanical with the exception of tls13_quic.c, where #include <ssl_locl.h> was fixed manually. discussed with jsing, no objection bcook
* Remove mkerr.pl remnants from LibreSSLkn2022-07-122-10/+2
| | | | | | | This script is not used at all and files are edited by hand instead. Thus remove misleading comments incl. the obsolete script/config. Feedback OK jsing tb
* Simplify: freezero() is NULL safe; assign + test in one go, as usual.tb2022-05-051-11/+5
| | | | ok jsing
* Avoid malloc(0) in EVP_PKEY_CTX_set1_hkdf_key()tb2022-05-051-2/+2
| | | | ok jsing
* Securely wipe the entire HKDF_PKEY_CTX instead of only taking care oftb2022-05-051-5/+3
| | | | | | a piece of the embedded info array. ok jsing
* Fix argument order in HKDF and HKDF_extract().tb2022-05-051-5/+5
|
* Ditch #defines for tls1_prf and scrypt. Drop unused errors and massagetb2022-05-052-95/+8
| | | | | | some const. ok beck jsing