summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/reallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-03-02Remove BIO_set()tb5-15/+3
This used to be a dangerous implementation detail of BIO_new() that was never used outside of libcrypto. ok jsing
2024-03-02Remove BIO_dump_*{cb,fp}()tb5-53/+5
These were disabled and the internals that need to remain were fixed. Time for this garbage to go. ok jsing
2024-03-02Remove BIO_{sn,v,vsn}printf(3)tb8-138/+18
Unsued printing functionality. If something should need this we can readily add it back. ok jsing
2024-03-02Expose OPENSSL_{gmtime,posix_to_tm,timegm,tm_to_posix}()tb2-3/+5
Apart from OPENSSL_gmtime(), which is OpenSSL API, this is BoringSSL's interface to deal with the time related portability and code mess. ok jsing
2024-03-02Garbage collect ASN1_TIME_set_tm()tb2-13/+2
This was a public helper that is no longer used internally either. ok jsing
2024-03-02Remove beck's ASN.1 time API from public visibilitytb7-20/+10
This API was needed since OpenSSL didn't have one. We now have variants of OpenSSL's API and will also expose BoringSSL's complementary API. The users of this API were ported to the OpenSSL variants and some may switch to BoringSSL's in the future. Part of it is still used internally. ASN1_time_tm_clamp_notafter() is still used by libtls (and only libtls). This will be fixed in a future bump. ok jsing
2024-03-02Remove ASN1_PCTX nonsensetb5-144/+3
This is only used by the fuzzing code. Another bit of poorly thought out extensibility that makes people pass NULL pointers to a bunch of APIs. ok jsing
2024-03-02Make ASN1_add_oid_module internaltb6-17/+5
ok jsing
2024-03-02Remove unused M_ASN1_* macrostb1-14/+1
The last comsumer, telephony/asterisk, was adjusted a few months back. pointed out by brad ok jsing
2024-03-02Remove unused, incomplete ub_* macrostb1-12/+1
The only consumer, a_strnid.c, has its own, slightly more complete, up to date, and less incorrect, version of these. ok jsing
2024-03-02Remove DECLARE_STACK_OF(ASN1_STRING_TABLE)tb1-4/+1
Another remnant of the unused ASN1_STRING_TABLE extensibility goes away. ok jsing
2024-03-02Remove ASN1_STRING_TABLE_{add,cleanup}tb5-27/+3
This was API for the ASN1_STRING_TABLE extensibility which has been neutered for months and was completely unused in the ecosystem. ok jsing
2024-03-02const correct ASN1_STRING_TABLE_get()tb2-7/+6
The ability of modifying the ASN1_STRING_TABLE was removed and the table is now static. Stop casting away const. The only consumer, security/xca, is already fixed. ok jsing
2024-03-01Add mkdtemps(3), like mkdtemp(3) but with a suffix.millert2-8/+32
OK deraadt@ tb@
2024-03-01Fix OPENSSL_{gmtime,timegm} in namespace buildtb2-4/+3
These were incorrectly added to asn1.h. OPENSSL_gmtime is in crypto.h and OPENSSL_timegm is already in posix_time.h
2024-03-01Remove the ciphers_by_values_test()tb1-56/+0
2024-03-01exporter: use the atrocious SSL_CIPHER_find() rather than get_by_id()tb1-2/+5
2024-03-01ssltest: drop another use of CRYPTO_mem_leaks()tb1-2/+1
2024-02-29Detect OPENSSL_NO_GOST correctlytb1-1/+2
2024-02-29CRYPTO_mem_leaks* will go away. Remove calls in legacy teststb3-6/+3
2024-02-29Link x509_algor test statically and switch to the internaltb2-9/+18
X509_ALGOR_set0_evp_md()
2024-02-29OBJ_NAME_TYPE_PKEY_METH is no longer supportedtb1-5/+1
2024-02-29Stop testing EVP_PKEY_GOST{IMIT,R01}tb1-3/+1
2024-02-29Prepare freenull test for GOST removaltb1-1/+3
2024-02-28Expand only ever user of PBEPARAM_free() outside of libcryptotb1-2/+3
2024-02-28Small tweak for X509_check_purpose()tb1-4/+6
ok jsing
2024-02-28Use an accessor instead of reaching into X509_PURPOSEtb1-2/+2
ok jsing
2024-02-27align read-only sections on masm/windows to 64 bytesbcook1-1/+9
Avoid conflicts where alignment is specified later in the underlying assembly. ok tb@
2024-02-26Neuter OBJ_bsearch{_,ex_}()tb2-31/+40
Make these functions always fail. A copy of OBJ_bsearch_ex_() is kept in stack.c, where it is still used by internal_find() for sk_find{,_ex}(). sk_find_ex() will be removed in the upcoming bump, and then we can simplify or rewrite what's still needed. ok jsing
2024-02-24Add a few missing endbr64 to libcryptotb2-0/+6
gcm_{gmult,ghash}_4bit(), aesni_ccm64_decrypt_blocks(), aes_cbc_encrypt(), and aesni_xts_{en,de}crypt() were overlooked in previous passes. Found with a diff for ld.lld by kettenis ok kettenis
2024-02-24Replace uses of endbr64 with _CET_ENDBR from cet.htb30-110/+132
cet.h is needed for other platforms to emit the relevant .gnu.properties sections that are necessary for them to enable IBT. It also avoids issues with older toolchains on macOS that explode on encountering endbr64. based on a diff by kettenis ok beck kettenis
2024-02-24Remove custom key length handlingtb1-5/+1
No cipher in libcrypto is marked EVP_CIPH_CUSTOM_KEY_LENGTH and no control handler deals with EVP_CTRL_SET_KEY_LENGTH, which means that this code is dead as far as libcrypto is concerned. Almost nothing uses EVP_CIPHER_meth* (this was added for a single project) and nothing sets a custom ctrl. This isn't going to change anyway since EVP_CIPHER_meth* is deprecated in order to promote more provider beauty. ok beck jsing
2024-02-24Remove last calls to CRYPTO_{push,pop}_info()tb1-9/+3
These don't do anything but return 0 and will be garbage collected in the upcoming bump. ok jsing
2024-02-24err.c: fix incorrect line wrappingtb1-5/+5
2024-02-23Prepare to provide X509_STORE_get1_objects()tb4-3/+73
The OpenSSL 1.1 API X509_STORE_get0_objects() is not thread safe. It exposes a naked internal pointer containing certificates, CRLs and cached objects added by X509_LOOKUP_hash_dir(). Thus, if the store is shared between threads, it is not possible to inspect this pointer safely since another thread could concurrently add to it. This may happen in particular during certificate verification. This API led to security issues in rust-openssl and is also problematic in current Python. Other consumers of X509_STORE_get0_objects() are haproxy, isync, openvpn. The solution is to take a snapshot of the state under a lock and return that. This is what X509_STORE_get1_objects() does. It returns a newly allocated stack that needs to be freed with sk_X509_OBJECT_pop_free(), passing X509_OBJECT_free as a second argument. Based on a diff by David Benjamin for BoringSSL. https://boringssl-review.googlesource.com/c/boringssl/+/65787 ok beck jsing PS: Variants of this have landed in Python and OpenSSL 3 as well. There the sk_*deep_copy() API is used, which in OpenSSL relies on evaluating function pointers after casts (BoringSSL fixed that). Instead of using this macro insanity and exposing that garbage in public, we can do this by implementing a pedestrian, static sk_X509_OBJECT_deep_copy() by hand.
2024-02-23Remove ASN1_time_clamp_notafter() prototypetb1-3/+1
There is now a prototype in x509_internal.h, so no need to repeat that here.
2024-02-20x509_asid: NULL out min/max on extract_min_max() failuretb1-1/+3
requested by/ok jsing
2024-02-19x509_asid: fix some KNF botchestb1-37/+19
When this file was brought into KNF, a few things became particularly ugly. This makes {a,b}{,_{min,max}} have function scope in canonize/is_canonical, which removes unfortunate line wraps and some other silliness. ok job
2024-02-19pk7_attr.c: tidy includestb1-6/+4
2024-02-18asn1time: remove some debugging codetb1-3/+1
2024-02-18Tweak previoustb1-7/+6
2024-02-18Adjust regress test for memset() requested by jsing on reviewtb1-4/+18
2024-02-18Add regress coverage for the new APItb2-2/+197
This exercises the new API, in particular with respect to overflow behavior around the years 0/9999, which are special for GeneralizedTime/X.509.
2024-02-18Update ASN1_TIME_set(3)tb1-5/+44
Document OPENSSL_{posix_to_tm,tm_to_posix}() and fix the documentation of OPENSSL_{gmtime,timegm}(). ok jsing
2024-02-18Add posix_time.h from BoringSSLtb8-60/+160
This is prepares to expose some internal API as OPENSSL_tm_to_posix() and OPENSSL_posix_to_tm(). They will be used in libtls and ocspcheck(8) to get rid of the portability nightmare that is timegm(). Also fix the location of OPENSSL_gmtime() and OPENSSL_timegm() (this API is not yet exposed). The former is from OpenSSL and surprisingly lives in crypto.h, not asn1.h, and the latter is BoringSSL API and lives in the new posix_time.h. Initial diff from beck, this pulls in further upstream work after review feedback. ok jsing
2024-02-18Align EVP_CIPHER_CTX_init() and _legacy_clear()tb1-2/+2
2024-02-18Hide EVP_{CIPHER,MD}_CTX_init() from internalstb1-1/+5
ok jsing
2024-02-18Use EVP_MD_CTX_legacy_clear() internallytb12-33/+33
ok jsing
2024-02-18Use EVP_CIPHER_CTX_legacy_clear() internallytb5-13/+13
ok jsing
2024-02-18Add EVP_MD_CTX_legacy_clear()tb2-2/+9
This is analogous to EVP_CIPHER_CTX_legacy_clear() and will serve as an internal replacement for EVP_MD_CTX_init() until the conversion to heap allocated ctx is completed. This way EVP_MD_CTX_init() can be changed to match the OpenSSL 1.1 API. ok jsing