summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/evp_pbe.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Hide public symbols in evp.hbeck2024-04-091-1/+3
| | | | | | largely mechanically done by the guentherizer 9000 ok tb@
* Clean up use of EVP_MD_CTX_{legacy_clear,cleanup} in PKCS5_PBE_keyivgenjoshua2024-03-251-11/+12
| | | | ok tb@
* Fix namespace buildtb2024-03-241-2/+1
| | | | noticed/ok beck
* Bye bye gost, bye, bye turdinesstb2024-03-241-9/+1
| | | | ok beck
* Remove more PBE stuff from the public APItb2024-03-021-1/+7
| | | | | | | This is still needed internally for CMS and its predecessors. This removal will enable disentangling some of its innards. ok jsing
* Remove most PBEPARAM stuff from public visibilitytb2024-03-021-1/+2
| | | | | | The struct itself needs to remain public, unfortunately. ok jsing
* Remove a lot of PKCS12 garbage from the public APItb2024-03-021-1/+5
| | | | | | | | PKCS12 is a hot mess. Please participate in the survey at the end of https://www.cs.auckland.ac.nz/~pgut001/pubs/pfx.html to increase its credibility and unanimity. ok jsing
* Remove EVP_PBE_* API from public visibilitytb2024-03-021-39/+1
| | | | | | | You can no longer add your custom PBE algorithm. Pity. EVP_PBE_CipherInit() stays for internal use, the rest goes away copmletely. ok jsing
* Use EVP_MD_CTX_legacy_clear() internallytb2024-02-181-2/+2
| | | | ok jsing
* Inline EVP_PBE_find() in its last two callerstb2024-02-011-140/+69
| | | | | | | | | | | | | | | | | This API was already cleaned up quite a bit, but it is unused in the ecosystem and the two internal callers can be simplified a lot when inlining the lookups. EVP_PBE_CipherInit() can walk the table of "outer" PBEs and reach into the matching pbe for its cipher_nid, md_nid and keygen(). PKCS5_v2_PBKDF2_keyivgen() uses EVP_PBE_find() as a way to mapping a PRF (given by the nid of an HMAC with some digest) to the digest's nid. This can be done by a simple switch. Move MD5 to the top and GOST to the end in that switch and wrap the latter in OPENSSL_NO_GOST, so it will go away once we define OPENSSL_NO_GOST. ok beck
* Use ret instead of rv in a few keyivgen functionstb2024-01-271-11/+11
|
* Fold keyivgen functions into evp_pbe.ctb2024-01-271-7/+386
| | | | | These are only used by the EVP_PBE routines and will become internal in the next major bump.
* Throw PKCS5_PBE_add() into the trash bin at the end of evp_pbe.ctb2024-01-271-1/+6
| | | | This has been a noop since forever and will be removed in the next bump.
* Mark the functions at the end of this file for removaltb2024-01-271-1/+5
|
* Support HMAC with SHA-3 as a PBE PRFtb2024-01-271-1/+21
| | | | ok jsing
* Support HMAC with truncated SHA-2 as a PBE PRFtb2024-01-271-1/+11
| | | | ok jsing
* Clean up EVP_PBE_CipherInit() a littletb2023-12-181-25/+18
| | | | | | | | This is mostly stylistic cleanup, making the control flow a bit more obvious. There's one user-visible change: we no longer go out of our way to provide info about the unknown algorithm. The nid is enough. ok joshua jsing
* Move EVP_PBE_find() next to the tablestb2023-12-161-46/+46
| | | | | | | There is no point in having EVP_PBE_CipherInit() between the table and the lookup functions (which it notably uses). No code change.
* Remove OBJ_bsearch_() usage from PBEtb2023-12-161-79/+175
| | | | | | | | | Split the table of built-in password based encryption algorithms into two and use a linear scan over the table corresponding to the type specified in EVP_PBE_find()'s type argument. Use better variable names, make the API a bit safer and generally reduce the eye bleed in here. ok jsing
* Move all the neutered PBE API to the bottom of the filetb2023-12-151-17/+17
|
* Remove unprotected global state from EVP_PBEtb2023-12-151-76/+8
| | | | | | | | | | | | | | | | Nobody adds a custom password-based encryption algorithm, be it a PRF or one that can be an outermost AlgorithmIdentifier in CMS or its precursors. This makes the undocumented and unused EVP_PBE_alg_add{,_type}() always fail. They will be removed in the next major bump. Thus, we no longer need to maintain a global stack of PBE algorithms that one thread can happily modify while another one searches it. In subsequent steps we can then remove another rather pointless use of OBJ_bsearch_(). "Let's optimize the lookup in a table with two dozen entries using about as many glorious layers of obfuscating macros." ok jsing
* Unbreak the namespace build after a broken mk.conf and tool misfire hadbeck2023-07-071-6/+1
| | | | | | | | me aliasing symbols not in the headers I was procesing. This unbreaks the namespace build so it will pass again ok tb@
* Hide symbols in hkdf, evp, err, ecdsa, and ecbeck2023-07-071-1/+6
| | | | | | (part 2 of commit) 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
* Allow GOST R 34.11-2012 in PBE/PBKDF2/PKCS#5.jsing2020-06-051-1/+3
| | | | | | | | Diff from Dmitry Baryshkov <dbaryshkov@gmail.com> Sponsored by ROSA Linux ok inoguchi@ tb@
* Send the function codes from the error functions to the bit bucket,beck2017-01-291-9/+8
| | | | | | as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
* Expand DECLARE_OBJ_BSEARCH_CMP_FN and IMPLEMENT_OBJ_BSEARCH_CMP_FN macros.jsing2017-01-211-3/+19
| | | | No change to generated assembly excluding line numbers.
* Check memory allocation results in EVP_PBE_alg_add_type().miod2015-02-081-3/+10
| | | | ok doug@ jsing@
* Check the result of sk_*_push() operations for failure.miod2014-10-281-4/+8
| | | | ok doug@ jsing@
* In EVP_PBE_alg_add don't use the underlying NID for the ciphermiod2014-07-111-2/+2
| | | | as it may have a non-standard key size; OpenSSL PR #3206 via OpenSSL trunk.
* Only import cryptlib.h in the four source files that actually need it.jsing2014-07-111-2/+3
| | | | | | | | Remove the openssl public includes from cryptlib.h and add a small number of includes into the source files that actually need them. While here, also sort/group/tidy the includes. ok beck@ miod@
* Explicitly include <openssl/opensslconf.h> in every file that referencesjsing2014-07-101-1/+3
| | | | | | | | | an OPENSSL_NO_* define. This avoids relying on something else pulling it in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is never going to do anything, since OPENSSL_NO_XYZ will never defined, due to the fact that opensslconf.h has not been included. This also includes some miscellaneous sorting/tidying of headers.
* Stop including standard headers via cryptlib.h - pull in the headers thatjsing2014-07-101-1/+3
| | | | | | are needed in the source files that actually require them. ok beck@ miod@
* tags as requested by miod and teduderaadt2014-06-121-1/+1
|
* Remove various test stubs. The good ones have been moved by jsingderaadt2014-06-071-24/+0
| | | | | | and others to the regress framework. These remaining ones just muddle us up when re-reading code repeatedly. ok jsing
* KNF.jsing2014-05-081-108/+95
|
* Replace all use of ERR_add_error_data with ERR_asprintf_error_data.beck2014-04-261-1/+1
| | | | | | | | This avoids a lot of ugly gymnastics to do snprintfs before sending the bag of strings to ERR, and eliminates at least one place in dso_dlfctn.c where it was being called with the incorrect number of arguments and using random things off the stack as addresses of strings. ok krw@, jsing@
* use intrinsic strlcpy and strlcat everywhere so we only have one set ofbeck2014-04-191-1/+1
| | | | | | funcitons to check for incorrect use. keep BUF_strlcpy and BUF_strlcat for API comptibility only. ok tedu@
* Change library to use intrinsic memory allocation functions instead ofbeck2014-04-171-2/+2
| | | | | | | | OPENSSL_foo wrappers. This changes: OPENSSL_malloc->malloc OPENSSL_free->free OPENSSL_relloc->realloc OPENSSL_freeFunc->free
* resolve conflictsdjm2012-10-131-0/+5
|
* resolve conflicts, fix local changesdjm2010-10-011-46/+220
|
* resolve conflictsdjm2009-01-091-1/+1
|
* resolve conflictsdjm2008-09-061-2/+3
|
* merge 0.9.7dmarkus2004-04-081-1/+1
|
* merge 0.9.7b with local changes; crank majors for libssl/libcryptomarkus2003-05-121-1/+1
|
* str{cat,cpy}/sprintf cleanup. markus@, deraadt@ okho2003-04-031-1/+1
|
* merge openssl-0.9.7-beta3, tested on vax by miod@markus2002-09-101-1/+1
|
* OpenSSL 0.9.7 stable 2002 05 08 mergebeck2002-05-151-3/+3
|
* openssl-engine-0.9.6 mergebeck2000-12-151-5/+7
|
* OpenSSL 0.9.4 mergebeck1999-09-291-0/+134