summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2024-03-02Remove DECLARE_STACK_OF(X509_TRUST)Theo Buehler
Unused since the extensibility was neutered. ok jsing
2024-03-02Remove unused public X509_TRUST APITheo Buehler
Another thing that should never have leaked out of the library. It will become internal entirely, where the code can be simplified greatly. ok jsing
2024-03-02const correct X509_PURPOSE_get0{,_{,s}name}()Theo Buehler
Unfortunately, PHP and rust-openssl still need this API. At least we can make the table read-only now since we disabled its extensibility. ok jsing
2024-03-02Make X509_PURPOSE opaqueTheo Buehler
Code using details of X509_PURPOSE does so by using API. So we can make this struct opaque. ok jsing
2024-03-02Remove unused parts of the purpose APITheo Buehler
Most of this is the ability to add custom purposes. Also the astounding X509_STORE_CTX_purpose_inherit(). The names are used by PHP, and M2Crypto exposes X509_check_purpose(), so these remain public. Some weird, most likely invalid, uses also remain in rust-openssl. ok jsing
2024-03-02Remove X509V3_EXT extensibility APITheo Buehler
You used to be able to define your own X.509 extension handlers. Great. Even greater: the verifier would ignore any custom extensions. So this was only ever useful for serialization and deserialization. In other words, almost entirely pointless. The API was also unused except for a hack in kore-acme, which was fixed recently. ok jsing
2024-03-02Remove X509_ALGOR_set_md()Theo Buehler
One of those void APIs that are super hard to use safely since they can fail but can't communicate failure. Nothing uses this. Internal uses have been converted to error checked X509_ALGOR_set_evp_md(). ok jsing
2024-03-02Adjust signature of ERR_load_strings()Theo Buehler
This aligns the prototypes with OpenSSL 1.1. ok jsing
2024-03-02Remove ERR_get_stateTheo Buehler
The ERR_STATE struct is an unused implementation detail of the horrific error stack code. It is the last public consumer of CRYPTO_THREAD internals. Make this and its accessor internal so we can make the CRYPTO_THREAD struct opaque. ok jsing
2024-03-02Simplify engine.hTheo Buehler
Garbage collect some more of this former horror show. ok jsing
2024-03-02Garbage collect CUSTOM_KEY_LENGTH/SET_KEY_LENGTHTheo Buehler
These are unused defines that used to add unwanted complications in EVP_CIPHER_CTX_set_key_lenght(). ok jsing
2024-03-02Remove more PBE stuff from the public APITheo Buehler
This is still needed internally for CMS and its predecessors. This removal will enable disentangling some of its innards. ok jsing
2024-03-02Remove most PBEPARAM stuff from public visibilityTheo Buehler
The struct itself needs to remain public, unfortunately. ok jsing
2024-03-02Remove a lot of PKCS12 garbage from the public APITheo Buehler
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
2024-03-02Remove RC4-HMAC-MD5 and AES-{128,256}-CBC-HMAC-SHA-1Theo Buehler
"Stitched" mode AEADs were removed from libssl a long time ago. Nothing uses these CIPHERs anymore. ok jsing
2024-03-02Make legacy cipher methods internalTheo Buehler
These are ASN.1 handlers for CIPHERs, still used by CMS and its predecessors. They should never have been public. ok jsing
2024-03-02Remove EVP_PBE_* API from public visibilityTheo Buehler
You can no longer add your custom PBE algorithm. Pity. EVP_PBE_CipherInit() stays for internal use, the rest goes away copmletely. ok jsing
2024-03-02Remove EVP_PKEY_meth_*() APITheo Buehler
After ameth, the second bit of custom EVP_PKEY API removal. ok jsing
2024-03-02Remove the ameth libTheo Buehler
This is accessor API for ASN.1 methods needed for custom PKEYs. Nothing has ever used this. This has been neutered for months. The EVP_PKEY_asn1_* API that needs to stay was moved elsewhere. ok jsing
2024-03-02Remove EVP_MD_meth* againTheo Buehler
Erlang upstream disabled the otp_test_engine for LibreSSL >= 3.5 without explanation. It was the only reason we added this garbage API in the first place. Meanwhile libfido2 started using it for a mock up of OpenSSL 3's broken fetch design with old API. This is pointless, so all this garbage goes away again (in particular we can remove the absolutely horrifying EVP_MD_meth_set_app_datasize() again). ok jsing
2024-03-02Fix signature and semantics of EVP_{CIPHER,MD}_CTX_init()Theo Buehler
When the EVP_CIPHER_CTX and the EVP_MD_CTX were still expected to live on the stack, these initialization APIs were wrappers around memset. In OpenSSL 1.1, somebody removed them and carelessly made _init() an alias of _reset() aka _cleanup(). As a consequence, both signature and semantics changed. Unsurprisingly, there is now code out there that actually uses the new semantics, which causes leaks on LibreSSL and older OpenSSL. This aligns our _init() with OpenSSL 1.1 semantics. ok jsing
2024-03-02Remove unused OBJ_create_and_add_object()Theo Buehler
This is an alias for OBJ_create(). I haven't dug into its history. ok jsing
2024-03-02Remove no longer supported OBJ_NAME_TYPEsTheo Buehler
OBJ_NAME_TYPE_PKEY_METH and OBJ_NAME_TYPE_COMP_METH were never used as far as I can tell. Unfortunately, PHP and Python still use the weirdly named OBJ_NAME_do_all*() API to list available ciphers and digests, so the MD and CIPHER variants need to remain public. ok jsing
2024-03-02Make OBJ_add_object() staticTheo Buehler
This is another implementation detail that should never have leaked out of the library. Only OBJ_create() ever used this. ok jsing
2024-03-02Remove OBJ_bsearch_()Theo Buehler
The only reason this has still been part of the public API was that libssl used it for cipher lookup. This was fixed by replacing the lookup by proper bsearch() -- why OpenSSL felt the need to reinvent ANSI C API badly will forever remain a mystery. The stack code in libcrypto still uses a version of this. This should be rewritten. It will be a bit easier once sk_find_ex() is removed. ok jsing
2024-03-02Switch name member of OBJ_NAME to const void *Theo Buehler
Because this is the type it should have had from the get go. ok jsing
2024-03-02Remove unused public OBJ_NAME_* APITheo Buehler
This functionality has been disabled for a few months. Now it is high time to garbage collect it. ok jsing
2024-03-02Remove EVP_{add,delete}_{cipher,digest}_alias()Theo Buehler
These are macro wrappers around the neutered OBJ_NAME_{add,remove}() API (notice the consistency), which will be removed shortly. Only security/xca used to use this. ok jsing
2024-03-02Remove EVP_add_{cipher,digest}() from public APITheo Buehler
Ciphers and digests are now handled in a static lookup table and no longer by the associative array that used to underlie the OBJ_NAME API. Adding ciphers is no longer possible. What uses this API does so for historic reasons coming from a time where SHA-2 and some AES variants needed to be enabled explicitly. Ports doing this (PHP and DANE code) were fixed. ok jsing
2024-03-02Remove DSA_generate_parametersTheo Buehler
This was deprecated in 0.9.8 and used until recently by rust-openssl and by keynote (keynote has the excuse that it was written before the deprecation). Fortunately Paul Kehrer fixed this in rust-openssl, so we can garbage collect this turd. (It was replaced with the less ergonomic DSA_generate_parameters_ex() to expose a new fancy way of displaying dots, stars and pluses on key generation). ok jsing
2024-03-02Remove CMAC_resume()Theo Buehler
While it is a neat design detail of CMAC that you can resume it after having finalized it, nothing uses this functionality and it adds some gross things such as retaining intermediate secrets in the CMAC ctx. Once this is gone, we can simplify the CMAC code a bit. ok jsing
2024-03-02Make BN_mod_exp2_mont() and BN_mod_exp_mont_word() internalTheo Buehler
The former could be useful but nothing uses it. The latter is a dangerous implementation detail of Montgomery exponentiation that should never have been leaked out of the library. Fix this. ok jsing
2024-03-02Make BN_mod_exp_simple() internalTheo Buehler
This function is very slow and useful for testing purposes only. It should never have been part of the public API. Remove it from there. ok jsing
2024-03-02Remove BIO_set()Theo Buehler
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}()Theo Buehler
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)Theo Buehler
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}()Theo Buehler
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()Theo Buehler
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 visibilityTheo Buehler
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 nonsenseTheo Buehler
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 internalTheo Buehler
ok jsing
2024-03-02Remove unused M_ASN1_* macrosTheo Buehler
The last comsumer, telephony/asterisk, was adjusted a few months back. pointed out by brad ok jsing
2024-03-02Remove unused, incomplete ub_* macrosTheo Buehler
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)Theo Buehler
Another remnant of the unused ASN1_STRING_TABLE extensibility goes away. ok jsing
2024-03-02Remove ASN1_STRING_TABLE_{add,cleanup}Theo Buehler
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()Theo Buehler
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.Todd C. Miller
OK deraadt@ tb@
2024-03-01Fix OPENSSL_{gmtime,timegm} in namespace buildTheo Buehler
These were incorrectly added to asn1.h. OPENSSL_gmtime is in crypto.h and OPENSSL_timegm is already in posix_time.h
2024-02-28Small tweak for X509_check_purpose()Theo Buehler
ok jsing
2024-02-28Use an accessor instead of reaching into X509_PURPOSETheo Buehler
ok jsing