summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Revert r1.13 since it currently breaks openssl-ruby regress tests.jsing2024-03-251-2/+2
| | | | ok tb@
* Inline sctx in EVP_DigestSignFinaljoshua2024-03-251-11/+8
| | | | ok tb@ jsing@
* Clean up use of EVP_MD_CTX_{legacy_clear,cleanup} in PKCS5_PBE_keyivgenjoshua2024-03-251-11/+12
| | | | ok tb@
* Error on setting an invalid CSR versionjob2024-03-251-2/+2
| | | | | | Reported by David Benjamin (BoringSSL) OK tb@
* Remove unneeded brackets from if statement in EVP_DigestSignFinaljoshua2024-03-251-3/+2
| | | | ok tb@
* Clean up use of EVP_MD_CTX_{legacy_clear,cleanup} in EVP_BytesToKeyjoshua2024-03-251-12/+14
| | | | ok tb@
* Codify more insane CRYPTO_EX_DATA API.jsing2024-03-251-9/+59
| | | | | | The current CRYPTO_EX_DATA implementation allows for data to be set without calling new, indexes can be used without allocation, new can be called without getting an index and dup can be called after new or without calling new.
* Revise for TLS extension parsing/processing changes.jsing2024-03-251-108/+42
|
* Simplify TLS extension parsing and processing.jsing2024-03-251-155/+98
| | | | | | | | | Rather than having a separate parse and process step for each TLS extension, do a first pass that parses all of the TLS outer extensions and retains the extension data, before running a second pass that calls the TLS extension processing code. ok beck@ tb@
* Clean up create_digest()tb2024-03-251-16/+17
| | | | | | | | | The ts code is its own kind of special. I only sent this diff out to hear beck squeal. This diff doesn't actually fix anything, apart from (maybe) appeasing some obscure static analyzer. It is decidedly less bad than a similar change in openssl's issue tracker. ok beck
* Fix time conversion that broke regress.beck2024-03-251-5/+5
| | | | ok tb@
* Move custom sigctx handling out of EVP_DigestSignFinaljoshua2024-03-251-13/+28
| | | | ok tb@
* Fix typo msg_types -> msg_typetb2024-03-251-2/+2
| | | | from jsing
* Revise TLS extension regress for parse/process changes.jsing2024-03-251-43/+108
|
* Clean up EVP_CIPHER_CTX_{legacy_clear,cleanup} usage in evp/bio_enc.cjoshua2024-03-251-39/+49
| | | | | | | Additionally, this tidies up some surrounding code and replaces usage of free with freezero and malloc with calloc. ok tb@
* Final tweaks in x509_trs.c for nowtb2024-03-251-10/+11
| | | | looked over by jsing
* Split TLS extension parsing from processing.jsing2024-03-251-55/+190
| | | | | | | | | | | | | The TLS extension parsing and processing order is currently dependent on the order of the extensions in the handshake message. This means that the processing order (and callback order) is not under our control. Split the parsing from the processing such that the processing (and callbacks) are run in a defined order. Convert ALPN to the new model - other extensions will be split into separate parse/process in following diffs. ok beck@ tb@
* Kill X509_TRUSTtb2024-03-251-79/+31
| | | | | | | | After peeling off enough layers, the entire wacky abstraction turns out to be nothing but dispatching from a trust_id to a trust handler and passing the appropriate nid and the cert. ok beck jsing
* Clean up EVP_MD_CTX_{legacy_clear,cleanup}() usage in x509/x509_cmp.cjoshua2024-03-251-21/+25
| | | | ok tb@
* Decouple TLS extension table order from tlsext_randomize_build_order()jsing2024-03-251-6/+7
| | | | | | | | | The PSK extension must be the last extension in the client hello. This is currently implemented by relying on the fact that it is the last extension in the TLS extension table. Remove this dependency so that we can reorder the table as needed. ok tb@
* Add back trust member of X509_TRUST that I accidentally deletedtb2024-03-251-1/+2
|
* Const correct the trust handlerstb2024-03-251-8/+7
| | | | | | | The certificates no longer need to be modified since we cache the extensions up front. ok beck
* Pass the nid instead of the entire trust structuretb2024-03-251-10/+10
| | | | | | | This code is so ridiculously overengineered that it is an achievement even by early OpenSSL standards. ok beck
* Pull extension caching into X509_check_trust()tb2024-03-251-2/+7
| | | | | | This way the trust handlers can stop modifying the certificates. ok beck
* Remove unnecessary stat() calls from by_dirbeck2024-03-251-14/+15
| | | | | | | | | | | | | | | | | | | | | When searching for a CA or CRL file in by_dir, this stat() was used to short circuit attempting to open the file with X509_load_cert_file(). This was a deliberate TOCTOU introduced to avoid setting an error on the error stack, when what you really want to say is "we couldn't find a CA" and continue merrily on your way. As it so happens you really do not care why the load_file failed in any of these cases, it all boils down to "I can't find the CA or CRL". Instead we just omit the stat call, and clear the error stack if the load_file fails. The fact that you don't have a CA or CRL is caught later in the callers and is what you want, mimicing the non by_dir behaviour instead of possibly some bizzaro file system error. Based on a similar change in Boring. ok tb@
* Add tests for EVP_get_cipherbyname(NULL) and EVP_get_digestbyname(NULL)jca2024-03-241-1/+25
| | | | Requested by and ok tb@
* Restore EVP_get_cipherbyname(NULL)/EVP_get_digestbyname(NULL) handlingjca2024-03-241-1/+7
| | | | | | | | | The previous implementation used the now defunct OBJ_NAME_get() which bailed out when passed a NULL argument. Difference spotted by the regress tests in ports/net/openvpn (regular openvpn use is fine but openvpn --show-ciphers/--show-digests crashes). ok tb@
* Convert libressl to use the BoringSSL style time conversionsbeck2024-03-245-54/+61
| | | | | | | | This gets rid of our last uses of timegm and gmtime in the library and things that ship with it. It includes a bit of refactoring in ocsp_cl.c to remove some obvious ugly. ok tb@
* Rename ax into auxtb2024-03-241-8/+7
|
* Drop redundant NULL checks around two for loopstb2024-03-241-15/+14
| | | | ok beck
* Fix namespace buildtb2024-03-247-29/+7
| | | | noticed/ok beck
* Remove OPENSSL_NO_* #ifdefs from evp_names.ctb2024-03-241-145/+1
| | | | discussed with jsing
* Bye bye gost, bye, bye turdinesstb2024-03-245-751/+5
| | | | ok beck
* Rename arg1 to nid because that's what it istb2024-03-241-11/+11
| | | | | "Yeah, arg1 is always such an imaginative name" ian ok beck
* Drop the unused 'name' member from X509_TRUSTtb2024-03-241-10/+1
| | | | | | | This used to be exposed via an accessor, but this accessor is no longer part of the library, so nuke it. ok beck
* Remove unused flags and arg2 members from X509_TRUSTtb2024-03-231-3/+1
| | | | ok jsing
* Remove unused flags argument from the trust handlerstb2024-03-231-13/+13
| | | | | | | | The public X509_check_trust() takes a flag parameter which we must leave in place. However, we can stop passing the flag parameter around without ever looking at it. ok jsing
* Simplify X509_STORE_free()tb2024-03-221-11/+3
| | | | | | | This had an inlined version of sk_pop_free(). We can just call it the right way. ok jsing
* Remove now unused certificates (which are also soon to expire).jsing2024-03-213-147/+0
|
* Rename the remaining pmod to modtb2024-03-201-13/+13
|
* pmod -> mod in CONF_IMODULEtb2024-03-201-7/+7
| | | | | | | Hungarian notation occasionally helps, but only if it is done consistently. Steve and consistency... cf e.g the last few commits. Accordingly, Hensonian Hungarian notation is a complete disaster. Start cleaning this mess up.
* tmod -> modtb2024-03-201-13/+13
| | | | requested by jsing
* md -> imod for CONF_IMODULEstb2024-03-201-15/+15
| | | | | A CONF_IMODULE is neither an EVP_MD nor a CONF_MODULE, so call it imod instead of md or mod.
* md -> mod for CONF_MODULEstb2024-03-201-12/+12
| | | | A CONF_MODULE is no EVP_MD, so call it mod instead of md.
* Change return type of module_add()tb2024-03-201-17/+21
| | | | | | | There is one caller of this function which returns module_add() != NULL. Make the function return an int instead. suggested by and ok jsing
* Implement imodule_free() and call it from module_finish()tb2024-03-201-4/+15
| | | | ok jsing
* Make module_free() NULL safetb2024-03-201-1/+4
| | | | ok jsing
* Use the new certificates/chains in regress.jsing2024-03-209-32/+33
| | | | | | | | | | The new certificates are more representative of the real world. The old certificates use weak algorithms and expire in the very near future. Most of our regress has already been switched over, this changes the remainder. Thanks to Bernhard M. Wiedemann for reminding us of the upcoming expiry. ok tb@
* Move the OPENSSL_init() stub from o_init.c to crypto_init.ctb2024-03-193-13/+7
|
* Remove OPENSSL/CRYPTO_realloc documentationtb2024-03-191-21/+4
|