summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/asn1_err.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* libcrypto: constify most error string tablestb2024-06-241-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | These constitute the bulk of the remaining global mutable state in libcrypto. This commit moves most of them into data.rel.ro, leaving out ERR_str_{functs,libraries,reasons} (which require a slightly different approach) and SYS_str_reasons which is populated on startup. The main observation is that if ERR_load_strings() is called with a 0 lib argument, the ERR_STRING_DATA argument is not actually modified. We could use this fact to cast away const on the caller side and be done with it. We can make this cleaner by adding a helper ERR_load_const_strings() which explicitly avoids the assignment to str->error overriding the error code already set in the table. In order for this to work, we need to sprinkle some const in err/err.c. CMS called ERR_load_strings() with non-0 lib argument, but this didn't actually modify the error data since it ored in the value already stored in the table. Annoyingly, we need to cast const away once, namely in the call to lh_insert() in int_err_set_item(). Fixing this would require changing the public API and is going to be tricky since it requires that the LHASH_DOALL_FN_* types adjust. ok jsing
* Hide symbols in asn1 and biobeck2023-07-051-1/+2
| | | | ok jsing@
* Provide ASN1_R_TYPE_NOT_PRIMITIVE.jsing2022-08-291-1/+2
| | | | | | Needed for an upcoming change. ok tb@
* Remove mkerr.pl remnants from LibreSSLkn2022-07-121-7/+1
| | | | | | | This script is not used at all and files are edited by hand instead. Thus remove misleading comments incl. the obsolete script/config. Feedback OK jsing tb
* Rewrite ASN1_INTEGER_{get,set}() using CBS/CBBjsing2022-06-251-2/+5
| | | | | | In the process, prepare to provide ASN1_INTEGER_{get,set}_{u,}int64(). ok beck@ tb@
* Fix a NULL dereference in GENERAL_NAME_cmp()tb2020-12-081-1/+2
| | | | | | | | | | | | Comparing two GENERAL_NAME structures containing an EDIPARTYNAME can lead to a crash. This enables a denial of service attack for an attacker who can control both sides of the comparison. Issue reported to OpenSSL on Nov 9 by David Benjamin. OpenSSL shared the information with us on Dec 1st. Fix from Matt Caswell (OpenSSL) with a few small tweaks. ok jsing
* Limit ASN.1 constructed types recursive definition depthinoguchi2018-03-291-1/+2
| | | | | | | | Fixes for CVE-2018-0739. Copied from commit below, and modified for adaption to our code. https://github.com/openssl/openssl/commit/9310d45087ae546e27e61ddf8f6367f29848220d ok bcook@ beck@ jsing@
* Send the function codes from the error functions to the bit bucket,beck2017-01-291-122/+2
| | | | | | as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
* Regenmiod2015-02-151-123/+124
|
* Explicitly include <openssl/opensslconf.h> in every file that referencesjsing2014-07-101-1/+4
| | | | | | | | | 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.
* tags as requested by miod and teduderaadt2014-06-121-1/+1
|
* More KNF.jsing2014-04-191-250/+248
|
* lob a few more knf grenades in here to soften things up.tedu2014-04-181-2/+1
|
* putting most of the braces in the right column is the very least we can do.tedu2014-04-181-8/+8
|
* Merge conflicts; remove MacOS, Netware, OS/2, VMS and Windows build machinery.miod2014-04-131-1/+1
|
* resolve conflictsdjm2012-10-131-1/+4
|
* resolve conflicts, fix local changesdjm2010-10-011-5/+17
|
* resolve conflictsdjm2009-04-061-0/+2
|
* resolve conflictsdjm2008-09-061-15/+76
|
* resolve conflictsdjm2006-06-271-159/+165
|
* resolve conflictsdjm2005-04-291-1/+7
|
* merge 0.9.7b with local changes; crank majors for libssl/libcryptomarkus2003-05-121-1/+3
|
* OpenSSL 0.9.7 stable 2002 05 08 mergebeck2002-05-151-159/+47
|
* OpenSSL 0.9.5a mergebeck2000-04-151-1/+2
|
* OpenSSL 0.9.5 mergebeck2000-03-191-2/+22
| | | | | | *warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2 if you are using the ssl26 packages for ssh and other things to work you will need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
* OpenSSL 0.9.4 mergebeck1999-09-291-146/+211
|
* Import of SSLeay-0.9.0b with RSA and IDEA stubbed + OpenBSD buildryker1998-10-051-0/+266
functionality for shared libs. Note that routines such as sslv2_init and friends that use RSA will not work due to lack of RSA in this library. Needs documentation and help from ports for easy upgrade to full functionality where legally possible.