summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/asn1_par.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Avoid potential single byte overread in asn1_parse2().jsing2022-02-121-3/+4
| | | | | | | | | | A fix for this was previously commited in r1.32, however while this added a bounds check the logic means we still fall through and perform the overread. Fix the logic such that we only log the error if the bounds check fails. While here, flip the test around such that we check for validity then print (which is more readable and matches earlier code). ok inoguchi@ tb@
* Add check for BIO_indent return valueinoguchi2022-01-201-2/+3
| | | | | | CID 24869 ok jsing@ millert@ tb@
* Avoid buffer overflow in asn1_parse2inoguchi2022-01-141-2/+2
| | | | | | | | | | | | asn1_par.c r1.29 changed to access p[0] directly, and this pointer could be overrun since ASN1_get_object advances pointer to the first content octet. In case invalid ASN1 Boolean data, it has length but no content, I thought this could be happen. Adding check p with tot (diff below) will avoid this failure. Reported by oss-fuzz 43633 and 43648(later) ok tb@
* Indent goto labels for diffability.jsing2021-12-251-3/+3
| | | | Whitespace change only.
* Consolidate ASN.1 universal tag type data.jsing2021-12-141-23/+1
| | | | | | | | | | | | There are currently three different tables in three different files that contain information about ASN.1 universal class tag types. Range checking is also implemented in three different places (with different implementations). Consolidate all of this into a single table, provide a lookup function that deals with the range checks and wrappers to deal with specific types. ok inoguchi@ tb@
* Remove the last internal use of d2i_ASN1_BOOLEAN.tb2021-12-131-7/+3
| | | | | | From Stephen Henson, OpenSSL 564df0dd ok jsing
* Avoid leak in error path of asn1_parse2inoguchi2020-01-091-17/+21
| | | | ok tb@
* Don't allow asn1_parse2 to recurse arbitrarily deep. Constrain to a maxbeck2019-03-241-1/+5
| | | | | depth of 128 - For oss-fuzz issue 13802 ok jsing@
* Fix a buffer overrun in asn1_parse2().tb2018-11-091-4/+7
| | | | | From Ben L bobsayshilol () live ! co ! uk Similar fixes in BoringSSL and OpensSSL.
* s/M_ASN1_ENUMERATED_free/ASN1_ENUMERATED_free/jsing2015-09-301-2/+2
|
* Replace M_ASN1_OCTET_STRING_(free|new) with ASN1_OCTET_STRING_(free|new).jsing2015-09-301-3/+3
|
* Replace M_ASN1_INTEGER_(new|free) with ASN1_INTEGER_(new|free) - this isjsing2015-09-301-2/+2
| | | | | | | different from the macro expansion, but the result is the same. Also replace some ASN1_STRING_dup() with ASN1_INTEGER_dup(). ok beck@ doug@
* Delete a lot of #if 0 code in libressl.doug2015-02-071-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | There are a few instances where #if 1 is removed but the code remains. Based on the following OpenSSL commits. Some of the commits weren't strictly deletions so they are going to be split up into separate commits. 6f91b017bbb7140f816721141ac156d1b828a6b3 3d47c1d331fdc7574d2275cda1a630ccdb624b08 dfb56425b68314b2b57e17c82c1df42e7a015132 c8fa2356a00cbaada8963f739e5570298311a060 f16a64d11f55c01f56baa62ebf1dec7f8fe718cb 9ccc00ef6ea65567622e40c49aca43f2c6d79cdb 02a938c953b3e1ced71d9a832de1618f907eb96d 75d0ebef2aef7a2c77b27575b8da898e22f3ccd5 d6fbb194095312f4722c81c9362dbd0de66cb656 6f1a93ad111c7dfe36a09a976c4c009079b19ea1 1a5adcfb5edfe23908b350f8757df405b0f5f71f 8de24b792743d11e1d5a0dcd336a49368750c577 a2b18e657ea1a932d125154f4e13ab2258796d90 8e964419603d2478dfb391c66e7ccb2dcc9776b4 32dfde107636ac9bc62a5b3233fe2a54dbc27008 input + ok jsing@, miod@, tedu@
* Use string literals in printf style calls so gcc's -Wformat works.doug2014-10-031-3/+2
| | | | ok tedu@, miod@
* if (x) FOO_free(x) -> FOO_free(x).miod2014-07-121-7/+4
| | | | | | | Improves readability, keeps the code smaller so that it is warmer in your cache. review & ok deraadt@
* Only import cryptlib.h in the four source files that actually need it.jsing2014-07-111-3/+3
| | | | | | | | Remove the openssl public includes from cryptlib.h and add a small number of includes into the source files that actually need them. While here, also sort/group/tidy the includes. ok beck@ miod@
* tags as requested by miod and teduderaadt2014-06-121-1/+1
|
* remove unused shit. from Alexander Schrijvertedu2014-05-251-3/+1
|
* We'll interpret a (void) cast on snprintf() to mean it's been verified thatguenther2014-04-191-4/+4
| | | | | | truncation is either desirable, not an issue, or is detected and handled later ok deraadt@
* More KNF.jsing2014-04-191-162/+189
|
* lob a few more knf grenades in here to soften things up.tedu2014-04-181-100/+43
|
* putting most of the braces in the right column is the very least we can do.tedu2014-04-181-84/+84
|
* fix a few bugs observed on http://www.viva64.com/en/b/0250/tedu2014-04-161-1/+1
| | | | ok krw miod
* Part 1 of eliminating BIO_snprintf(). This fixes mechanical conversionsbeck2014-04-151-4/+4
| | | | | where the return value is ignored changing to (void) snprintf. ok deraadt@
* resolve conflicts, fix local changesdjm2010-10-011-12/+5
|
* resolve conflictsdjm2009-04-061-0/+2
|
* resolve conflictsdjm2008-09-061-17/+41
|
* merge 0.9.7dmarkus2004-04-081-3/+3
|
* merge 0.9.7b with local changes; crank majors for libssl/libcryptomarkus2003-05-121-6/+1
|
* Trivial sprintf() -> snprintf() changes. ok deraadt@ho2003-04-051-3/+3
|
* openssl-engine-0.9.6 mergebeck2000-12-151-5/+43
|
* OpenSSL 0.9.5 mergebeck2000-03-191-52/+26
| | | | | | *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-33/+51
|
* Import of SSLeay-0.9.0b with RSA and IDEA stubbed + OpenBSD buildryker1998-10-051-0/+393
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.