aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_bitstr.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove parentheses of return.KaoruToda2017-10-181-6/+6
| | | | | | | | | Since return is inconsistent, I removed unnecessary parentheses and unified them. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4541)
* Remove email addresses from source code.Rich Salz2017-10-131-1/+1
| | | | | | | | | | Names were not removed. Some comments were updated. Replace Andy's address with openssl.org Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/4516)
* Since return is inconsistent, I removed unnecessary parentheses andKaoruToda2017-10-091-3/+3
| | | | | | | | | | | unified them. - return (0); -> return 0; - return (1); -> return 1; - return (-1); -> return -1; Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4500)
* Fix overflow in c2i_ASN1_BIT_STRING.David Benjamin2017-09-191-0/+6
| | | | | | | | | | | | | c2i_ASN1_BIT_STRING takes length as a long but uses it as an int. Check bounds before doing so. Previously, excessively large inputs to the function could write a single byte outside the target buffer. (This is unreachable as asn1_ex_c2i already uses int for the length.) Thanks to NCC for finding this issue. Fix written by Martin Kreichgauer. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4385)
* Avoid calling memcpy with lenght of 0Kurt Roeckx2016-05-271-3/+4
| | | | | | | | | | | We can call memcpy() with a pointer 1 past the last allocated byte and length of 0 and you can argue that that's undefined behaviour. Reported by tis-interpreter Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1132
* Copyright consolidation 08/10Rich Salz2016-05-171-54/+6
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove /* foo.c */ commentsRich Salz2016-01-261-1/+0
| | | | | | | | | | | | This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Rename *_realloc_clean to *_clear_reallocRich Salz2015-12-221-1/+1
| | | | | | | Just like *_clear_free routines. Previously undocumented, used a half-dozen times within OpenSSL source. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Identify and move common internal libcrypto header filesRichard Levitte2015-05-141-1/+1
| | | | | | | | | | | | | There are header files in crypto/ that are used by a number of crypto/ submodules. Move those to crypto/include/internal and adapt the affected source code and Makefiles. The header files that got moved are: crypto/cryptolib.h crypto/md32_common.h Reviewed-by: Rich Salz <rsalz@openssl.org>
* free null cleanup finaleRich Salz2015-05-011-2/+1
| | | | | | Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* realloc of NULL is like mallocRich Salz2015-04-281-4/+1
| | | | | | ANSI C, and OpenSSL's malloc wrapper do this, also. Reviewed-by: Richard Levitte <levitte@openssl.org>
* remove malloc castsRich Salz2015-04-281-4/+3
| | | | | | | Following ANSI C rules, remove the casts from calls to OPENSSL_malloc and OPENSSL_realloc. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Move more internal only functions to asn1_locl.hDr. Stephen Henson2015-03-261-0/+1
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* free NULL cleanupRich Salz2015-03-241-1/+1
| | | | | | | | Start ensuring all OpenSSL "free" routines allow NULL, and remove any if check before calling them. This gets ASN1_OBJECT_free and ASN1_STRING_free. Reviewed-by: Matt Caswell <matt@openssl.org>
* Remove old ASN.1 code.Dr. Stephen Henson2015-03-231-3/+3
| | | | | | | | | Remove old M_ASN1_ macros and replace any occurences with the corresponding function. Remove d2i_ASN1_bytes, d2i_ASN1_SET, i2d_ASN1_SET: no longer used internally. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-180/+189
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Return error when a bit string indicates an invalid amount of bits leftKurt Roeckx2014-12-181-1/+6
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* RT1815: More const'ness improvementsJustin Blanchard2014-08-181-3/+3
| | | | | | | | Add a dozen more const declarations where appropriate. These are from Justin; while adding his patch, I noticed ASN1_BIT_STRING_check could be fixed, too. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Revert the size_t modifications from HEAD that had led to moreGeoff Thorpe2008-11-121-14/+14
| | | | | | knock-on work than expected - they've been extracted into a patch series that can be completed elsewhere, or in a different branch, before merging back to HEAD.
* size_tification.Ben Laurie2008-11-011-14/+14
|
* RFC 3161 compliant time stamp request creation, response generationUlf Möller2006-02-121-0/+23
| | | | | | | and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
* improved error checking and some fixesNils Larsch2005-07-261-1/+3
| | | | | | PR: 1170 Submitted by: Yair Elharrar Reviewed and edited by: Nils Larsch
* Fix various incorrect error function codes.Bodo Möller2005-04-261-1/+1
| | | | ("perl util/ck_errf.pl */*.c */*/*.c" still reports many more.)
* Remove duplicate lines.Dr. Stephen Henson2004-12-121-1/+0
|
* Add lots of checks for memory allocation failure, error codes to indicateDr. Stephen Henson2004-12-051-1/+6
| | | | | | failure and freeing up memory if a failure occurs. PR:620
* Constify d2i, s2i, c2i and r2i functions and other associatedRichard Levitte2004-03-151-3/+4
| | | | | | | | functions and macros. This change has associated tags: LEVITTE_before_const and LEVITTE_after_const. Those will be removed when this change has been properly reviewed.
* Security fixes brought forward from 0.9.7.Ben Laurie2002-11-131-1/+3
|
* Reinstate the check for invalid length BIT STRINGS,Dr. Stephen Henson2002-08-231-0/+6
| | | | which was effectively bypassed in the ASN1 changed.
* Make i2c_ASN1_BIT_STRING return the correct length.Dr. Stephen Henson2002-05-291-2/+4
|
* ASN1_BIT_STRING_set_bit() didn't clear previously set bitsRichard Levitte2002-02-031-0/+1
|
* Merge from the ASN1 branch of new ASN1 codeDr. Stephen Henson2000-12-081-52/+0
| | | | | | to main trunk. Lets see if the makes it to openssl-cvs :-)
* For n > 7, we might get uninitialized (unzeroed) data.Richard Levitte2000-08-061-2/+2
| | | | Spotted by "Kyoungho Jeon" <k.h.jeon@securesoft.co.kr>.
* Fix some typose in the i2d/d2i functions thatDr. Stephen Henson2000-07-101-1/+1
| | | | | | | | | | | | | call the i2c/c2i (they were not using the content length for the headers). Fix ASN1 long form tag encoding. This never worked but it was never tested since it is only used for tags > 30. New options to smime program to allow the PKCS#7 format to be specified and the content supplied externally.
* New ASN1 functions that just deal withDr. Stephen Henson2000-07-071-17/+45
| | | | content octets, not tag+length.
* There have been a number of complaints from a number of sources that namesRichard Levitte2000-06-011-4/+4
| | | | | | | | | like Malloc, Realloc and especially Free conflict with already existing names on some operating systems or other packages. That is reason enough to change the names of the OpenSSL memory allocation macros to something that has a better chance of being unique, like prepending them with OPENSSL_. This change includes all the name changes needed throughout all C files.
* Seek out and destroy another evil cast.Ulf Möller2000-01-301-1/+1
|
* Don't return stuff from void functions.Ben Laurie1999-10-231-1/+1
|
* Replace the macros in asn1.h with function equivalents. Also make UTF8StringsDr. Stephen Henson1999-10-201-2/+11
| | | | tolerated in certificates.
* Remove NOPROTO definitions and error code comments.Ulf Möller1999-04-261-4/+0
|
* Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller1999-04-231-1/+1
| | | | | | Submitted by: Reviewed by: PR:
* Change functions to ANSI C.Ulf Möller1999-04-191-14/+5
|
* Import of old SSLeay release: SSLeay 0.9.1b (unreleased)Ralf S. Engelschall1998-12-211-11/+42
|
* Import of old SSLeay release: SSLeay 0.9.0bRalf S. Engelschall1998-12-211-1/+47
|
* Import of old SSLeay release: SSLeay 0.8.1bRalf S. Engelschall1998-12-211-0/+158