summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/a_bitstr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Consolidate code/templates for ASN.1 types.jsing2021-12-251-1/+33
| | | | | | | Where an ASN.1 type has its own file, move the ASN.1 item template and template related functions into the file. Discussed with tb@
* Move ASN1_<type>_* functions to the top, encoding/decoding to the bottom.jsing2021-12-251-122/+122
| | | | No functional change.
* Consolidate various ASN.1 code.jsing2021-12-151-1/+52
| | | | | | | | | Rather than having multiple files per type (with minimal code per file), use one file per type (a_<type>.c). No functional change. Discussed with tb@
* Remove unnecessary zeroing after recallocarray(3)tb2020-09-031-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zap a memset that was redundant since OpenSSL 0.97b was merged by markus in 2003. Nowadays it's otto's recallocarray(3) that does the zeroing. ok beck inoguchi otto PS: ASN1_BIT_STRING_set_bit(3) was committed on Dec 21 1998 by Ralf S. Engelschnall and used this bizarre allocation idiom: if (a->data == NULL) c=(unsigned char *)Malloc(w+1); else c=(unsigned char *)Realloc(a->data,w+1); People complained about Malloc, Realloc and Free being used elsewhere, so on Jun 1 2000, Richarde Levitte swept the OpenSSL tree and it became this. if (a->data == NULL) c=(unsigned char *)OPENSSL_malloc(w+1); else c=(unsigned char *)OPENSSL_realloc(a->data,w+1); Then it was found that existing data should be cleaned, and on Nov 13 2002 Ben Laurie changed the last line to c=(unsigned char *)OPENSSL_realloc_clean(a->data, a->length, w+1);
* Avoid calling memcpy with a length <= 0. Reported due to a GCC 7.3.0tb2018-10-201-5/+6
| | | | | | | compiler warning by Pavel Kraynyukhov. A similar fix was made in OpenSSL commit 369e93398b68b8a328e6c1d766222b. ok inoguchi
* Use recallocarray() instead of OPENSSL_realloc_clean().jsing2018-05-131-5/+2
| | | | | | | Also place all of the OPENSSL_* memory related prototypes under #ifndef LIBRESSL_INTERNAL. ok beck@ tb@
* Cleanup c2i_ASN1_BIT_STRING() code.jsing2018-05-121-20/+23
| | | | | | | | | | Avoid overloading a variable to store both a value and an error code - we can simply inline the error calls (as done everywhere else). Remove a bunch of unnecessary parentheses and tidy a few other things. With input from tb@. ok inoguchi@ tb@
* Add a missing bounds check in c2i_ASN1_BIT_STRING().jsing2018-05-121-1/+6
| | | | | | | | | This could potentially result in a left shift that exceeded the size of the storage type. Issue found by Simon Friedberger, Robert Merget and Juraj Somorovsky. ok inoguchi@ tb@
* Add const to functions in asn1/asn1.h as they did in OpenSSL.tb2018-04-251-3/+4
| | | | | | | BIO_f_asn1() will be taken care of later. Tested in a bulk by sthen ok bcook jca jsing
* Send the function codes from the error functions to the bit bucket,beck2017-01-291-3/+3
| | | | | | as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
* Replace remaining M_ASN1_BIT_STRING_(new|free) macros with calls tojsing2015-09-291-3/+3
| | | | | | ASN1_BIT_STRING_(new|free). ok beck@ doug@
* Expand obsolete M_ASN1.*(cmp|dup|print|set) macros - no change in generatedjsing2015-07-291-2/+2
| | | | | | assembly. ok bcook@
* Drop stupid (int) casts for the arguments of malloc() and friends. This ismiod2015-07-191-2/+2
| | | | | not 16-bit MS-DOS anymore. ok bcook@ tedu@
* Only import cryptlib.h in the four source files that actually need it.jsing2014-07-111-2/+2
| | | | | | | | 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@
* Stop including standard headers via cryptlib.h - pull in the headers thatjsing2014-07-101-1/+3
| | | | | | are needed in the source files that actually require them. ok beck@ miod@
* delete some casts. ok miodtedu2014-07-101-2/+2
|
* tags as requested by miod and teduderaadt2014-06-121-1/+1
|
* more: no need for null check before freederaadt2014-05-301-2/+1
| | | | ok tedu guenther
* improve realloc/calloc/malloc patterns; ok guentherderaadt2014-04-211-6/+2
|
* More KNF.jsing2014-04-181-2/+2
|
* Initial KNF.jsing2014-04-171-130/+144
|
* Change library to use intrinsic memory allocation functions instead ofbeck2014-04-171-3/+3
| | | | | | | | OPENSSL_foo wrappers. This changes: OPENSSL_malloc->malloc OPENSSL_free->free OPENSSL_relloc->realloc OPENSSL_freeFunc->free
* resolve conflicts, fix local changesdjm2010-10-011-0/+23
|
* resolve conflictsdjm2008-09-061-5/+8
|
* resolve conflictsdjm2005-04-291-2/+6
|
* merge 0.9.7b with local changes; crank majors for libssl/libcryptomarkus2003-05-121-1/+3
|
* merge with openssl-0.9.7-stable-SNAP-20020911,markus2002-09-141-0/+6
| | | | | new minor for libcrypto (_X509_REQ_print_ex) tested by miod@, pb@
* Merge OpenSSL 0.9.7-stable-20020605,beck2002-06-071-2/+4
| | | | correctly autogenerate obj_mac.h
* OpenSSL 0.9.7 stable 2002 05 08 mergebeck2002-05-151-52/+1
|
* openssl-engine-0.9.6 mergebeck2000-12-151-23/+51
|
* OpenSSL 0.9.5 mergebeck2000-03-191-3/+12
| | | | | | *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-30/+48
|
* Import of SSLeay-0.9.0b with RSA and IDEA stubbed + OpenBSD buildryker1998-10-051-0/+204
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.