summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/lhash (unfollow)
Commit message (Collapse)AuthorFilesLines
11 daysRemove mention of X509_NAME_print(3) in the docstb3-46/+13
12 daysec_asn1_test: Prepare for upcoming bumptb2-8/+11
Linking statically, pull in ec_local.h and provide a prototype for EC_GROUP_new(), which will be removed from the public API.
12 daysAdjust signature of CRYPTO_set_mem_functions and remove _get_ docstb1-23/+5
12 daysRename CRYPTO_get_mem_functions.3 to CRYPTO_set_mem_functions.3tb2-4/+4
12 daysRemove EC_POINT_method_of() docstb1-19/+1
12 daysRemove X509_OBJECT_free_contets() docstb1-20/+3
12 daysRemove X509_OBJECT_up_ref_count() documentationtb1-23/+2
12 daysRemove EC_PIONT_{get,set}_Jprojective_coordinates_GFp docstb1-53/+1
12 daysRemove EC_POINTs_{make_affine,mul}() docstb1-67/+2
12 daysRemove EC_GROUP_{,have_}precompute_mult() docstb1-31/+4
12 daysRemove EC_GROUP_method_of() docstb1-20/+1
12 daysRemove EC_GFp_* and EC_METHOD_get_field_type docstb7-156/+12
12 daysInline _CONF_get_section_values() in its last caller and remove ittb3-19/+9
NCONF_get_section() isn't any clearer by using this indirection. ok jsing
13 daysProvide an accelerated SHA-256 assembly implementation for aarch64.jsing4-2/+232
This provides a SHA-256 assembly implementation that makes use of the ARM Cryptographic Extension (CE), which is found on many arm64 CPUs. This gives a performance gain of up to 7.5x on an Apple M2 (dependent on block size). If an aarch64 machine does not have SHA2 support, then we'll fall back to using the existing C implementation. ok kettenis@ tb@
13 days_CONF_new_section: error check hash insertiontb1-1/+5
Don't leak v if its insertion into the hash failed and properly free it instead. ok jsing
13 days_CONF_new_section(): avoid silly ok dancetb1-11/+8
ok jsing
13 days_CONF_new_section(): replace hand-rolled strdup() with the real thingtb1-5/+3
ok jsing
13 days_CONF_new_section(): malloc() -> calloc()tb1-4/+2
ok jsing
2025-03-06asn1_multi: remove a pointless casttb1-2/+2
There's no need to cast away const from a const char * if you're going to pass it to a const char * argument of a function.
2025-03-06Rename X509V3_get_section() to X509V3_get0_section()tb6-15/+15
This makes it clear for those fluent in OpenSSL API gibberish that nothing needs to be freed here. This is because it returns something hanging off a hash entry owned by cnf. ok jsing
2025-03-06Garbage collect X509V3_section_free()tb6-25/+8
Historically, X509V3_section_free() could be customized by the conf db method to release memory allocated by X509V3_get_section(). This is no longer supported, so it is always a noop and can be removed. ok jsing
2025-03-04unifdef OPENSSL_NO_CHAIN_VERIFYtb1-6/+3
ok jsing
2025-03-01Zap trailing whitespace in dsa.htb1-7/+7
2025-03-01Remove offensive whitespace from x509.htb1-27/+27
2025-03-01conf.h: remove outdated commenttb1-4/+1
Despite the claim in this comment, the "new" conf code did replace the "old" conf code (which no longer exists in the public API).
2025-02-27Rename the crl_inf_cb() to crl_info_cb()tb1-3/+3
2025-02-27Hoist X509_REVOKED_cmp() above its only callertb1-9/+7
This way we don't need a prototype and things that belong together are together. Slight KNF tweak while there
2025-02-26obj_dat: remove parens from returntb1-9/+9
2025-02-26asn1object: improve error message to include returned valuetb1-2/+2
From Kenjiro Nakayama
2025-02-26obj_dat: don't shift a->length into the sign bittb1-2/+2
For an OID of excessive length >= 2^12, a->length << 20L is undefined, so add a cast to the target type of (unsigned long). From Kenjiro Nakayama
2025-02-26obj_dat: don't shift ca->type into the sign bittb1-2/+2
This is undefined for a ca->type of ADDED_LNAME (2) and ADDED_NID (3) when ca->type << 30L results in a shift into the sign bit, so add a cast to the target type of unsigned long. From Kenjiro Nakayama
2025-02-25openssl ca: use BN_bn2hex() rather than reimplementing ittb1-28/+18
ok jsing
2025-02-24x_crl.c: remove two NULL checks before *_free()tb1-5/+3
2025-02-21Remove unused name member from x509_sttb2-11/+2
As far as I can tell this has never been used since the beginning of git history with SSLeay 0.8.1b, so we can simplify the x509_cb() a little. ok jsing miod
2025-02-20Remove unused valid member of x509_sttb2-4/+2
internal_verify() (now x509_vfy_internal_verify()) used to cache the validity of the signature of a cert in this field. This is no longer the case since x509_vfy.c 1.57 (2017).
2025-02-18pkey_ec_derive(): simplify keylen calculationtb1-5/+3
ok jsing
2025-02-17Simplify ECDH_size() by using BN_num_bytes()tb1-3/+3
ok jsing
2025-02-14Replace Makefile based SHA*_ASM defines with HAVE_SHA_* defines.jsing20-58/+120
Currently, SHA{1,256,512}_ASM defines are used to remove the C implementation of sha{1,256,512}_block_data_order() when it is provided by assembly. However, this prevents the C implementation from being used as a fallback. Rename the C sha*_block_data_order() to sha*_block_generic() and provide a sha*_block_data_order() that calls sha*_block_generic(). Replace the Makefile based SHA*_ASM defines with two HAVE_SHA_* defines that allow these functions to be compiled in or removed, such that machine specific verisons can be provided. This should effectively be a no-op on any platform that defined SHA{1,256,512}_ASM. ok tb@
2025-02-13ec_mont_group_set_curve: convert to BN_MONT_CTX_create() and simplifytb1-20/+7
This removes the penultimate internal call of BN_MONT_CTX_new(). The last one could be removed at the cost of introducing a BN_MONT_CTX_dup(), which probably isn't worth it. ok jsing
2025-02-13dsa_gen: convert to BN_MONT_CTX_create()tb1-5/+2
This can now be a single call before the BN_MONT_CTX is actually used rather than two calls separated by 170 lines. ok jsing
2025-02-13Convert bn_exp to BN_MONT_CTX_create()tb1-53/+38
This simplifies the handling of the BN_MONT_CTX passed in and unifies the exit paths. Also zap some particularly insightful comments by our favorite captain. ok jsing
2025-02-13Convert BPSW to BN_MONT_CTX_create()tb1-5/+2
ok jsing
2025-02-13Convert BN_MONT_CTX_set_locked() to BN_MONT_CTX_create()tb1-4/+2
ok jsing
2025-02-13bn: add internal BN_MONT_CTX_create()tb2-2/+22
This does what the public BN_MONT_CTX_new() should have done in the first place rather than doing the toolkit thing of returning an invalid object that you need to figure out how to populate and with what because the docs are abysmal. It takes the required arguments and calls BN_MONT_CTX_set(), which all callers do immediately after _new() (except for DSA which managed to squeeze 170 lines of garbage between the two calls). ok jsing
2025-02-12recp -> reciprocal renaming in teststb2-7/+7
2025-02-12Rename BN_mod_exp_recp() to BN_mod_exp_reciprocal()tb2-5/+5
(leaving out a dotasm comment that would become harder to read than it already is)
2025-02-08Cache CRLs in issuer cachetb2-18/+37
The issuer cache holds a pair of SHA-512 of parent and child cert plus the result of the signature verification. Since CRLs also have a cached hash of their DER, we can easily add them to the same cache. This way we also avoid the cost of repeated signature verification for CRLs. For ordinary workloads the cache is larger than necessary and it won't currently take up more space than ~8M anyway, so the cost of doing this is negligible. For applications like rpki-client where the same (CA, CRL) pair is used to verify multiple EE certs, the gain is significant. In fact, the current worst case is a single pair being used for > 50k EE certs, responsible for about 20-25% of the total runtime of an ordinary rpki-client run if a hw-accelerated version of SHA-2 is available and even more if it isn't. In both cases the cost of processing of this pair is reduced by more than an order of magnitude. The implementation is a translation of x509_verify_parent_signature() to the case of CRLs and is entirely trivial thanks to the cache's design. Found while investigating a performance bottleneck found by job tested by job ok beck
2025-02-08Move X509_NAME_print() next to its only internal callertb2-93/+91
Fix includes while there
2025-02-08x509_verify_parent_signature(): no need to bump pkey's refcounttb1-4/+2
The parent certificate outlives the signature check, so we don't have to take a refcount of its pubkey and then release it again. ok beck
2025-02-08x509_verify: missing verify error on cached signature mismatchtb1-2/+5
If a signature mismatch is cached, the same error should be passed to the verify callback as if the mismatch was detected by doing the calculation, rather than falling back to the "unable to find the issuer cert locally". ok beck