aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1/f_int.c
AgeCommit message (Collapse)AuthorFilesLines
2020-11-26Update copyright yearMatt Caswell1-1/+1
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13533)
2020-11-13Convert all {NAME}err() in crypto/ to their corresponding ERR_raise() callRichard Levitte1-5/+4
This includes error reporting for libcrypto sub-libraries in surprising places. This was done using util/err-to-raise Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13318)
2019-09-28Reorganize private crypto header filesDr. Matthias St. Pierre1-1/+1
Currently, there are two different directories which contain internal header files of libcrypto which are meant to be shared internally: While header files in 'include/internal' are intended to be shared between libcrypto and libssl, the files in 'crypto/include/internal' are intended to be shared inside libcrypto only. To make things complicated, the include search path is set up in such a way that the directive #include "internal/file.h" could refer to a file in either of these two directoroes. This makes it necessary in some cases to add a '_int.h' suffix to some files to resolve this ambiguity: #include "internal/file.h" # located in 'include/internal' #include "internal/file_int.h" # located in 'crypto/include/internal' This commit moves the private crypto headers from 'crypto/include/internal' to 'include/crypto' As a result, the include directives become unambiguous #include "internal/file.h" # located in 'include/internal' #include "crypto/file.h" # located in 'include/crypto' hence the superfluous '_int.h' suffixes can be stripped. The files 'store_int.h' and 'store.h' need to be treated specially; they are joined into a single file. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9333)
2018-12-06Following the license change, modify the boilerplates in crypto/asn1/Richard Levitte1-1/+1
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7772)
2017-10-18Remove parentheses of return.KaoruToda1-3/+3
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)
2017-08-22This has been added to avoid the situation where some host ctype.h functionsPauli1-14/+3
return true for characters > 127. I.e. they are allowing extended ASCII characters through which then cause problems. E.g. marking superscript '2' as a number then causes the common (ch - '0') conversion to number to fail miserably. Likewise letters with diacritical marks can also cause problems. If a non-ASCII character set is being used (currently only EBCDIC), it is adjusted for. The implementation uses a single table with a bit for each of the defined classes. These functions accept an int argument and fail for values out of range or for characters outside of the ASCII set. They will work for both signed and unsigned character inputs. Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4102)
2017-02-17Fix a slightly confusing if condition in a2i_ASN1_INTEGER.Bernd Edlinger1-1/+1
Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2640)
2016-08-18Constify i2a*Dr. Stephen Henson1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-18Convert X509_REVOKED* functions to use const gettersMatt Caswell1-1/+1
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
2016-08-05Free buffer in a2i_ASN1_INTEGER() on error path.Dr. Stephen Henson1-0/+1
Thank to Shi Lei for reporting this bug. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-06-01Free buffer on error in a2i_ASN1_INTEGER()Matt Caswell1-0/+1
The function a2i_ASN1_INTEGER() allocates a buffer |s| but then fails to free it on error paths. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-17Copyright consolidation 09/10Rich Salz1-54/+6
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-16Use OPENSSL_hexchar2intRich Salz1-8/+2
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-29Fix building with -DCHARSET_EBCDICMatt Caswell1-0/+1
Building with -DCHARSET_EBCDIC and using --strict-warnings resulted in lots of miscellaneous errors. This fixes it. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz1-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>
2015-12-22Rename *_realloc_clean to *_clear_reallocRich Salz1-1/+1
Just like *_clear_free routines. Previously undocumented, used a half-dozen times within OpenSSL source. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-18ASN1 INTEGER refactor.Dr. Stephen Henson1-0/+13
Rewrite and tidy ASN1_INTEGER and ASN1_ENUMERATED handling. Remove code duplication. New functions to convert between int64_t and ASN.1 types without the quirks of the old long conversion functions. Add documentation. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-14Identify and move common internal libcrypto header filesRichard Levitte1-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>
2015-05-01Remove goto inside an if(0) blockRich Salz1-13/+9
There were a dozen-plus instances of this construct: if (0) { label: ..... } Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-01free null cleanup finaleRich Salz1-2/+1
Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-28realloc of NULL is like mallocRich Salz1-4/+1
ANSI C, and OpenSSL's malloc wrapper do this, also. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-28remove malloc castsRich Salz1-2/+1
Following ANSI C rules, remove the casts from calls to OPENSSL_malloc and OPENSSL_realloc. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell1-149/+145
Reviewed-by: Tim Hudson <tjh@openssl.org>
2002-11-13Security fixes brought forward from 0.9.7.Ben Laurie1-2/+1
2001-01-19Fixes to various ASN1_INTEGER routines for negative case.Dr. Stephen Henson1-1/+7
Enhance s2i_ASN1_INTEGER().
2000-06-01There have been a number of complaints from a number of sources that namesRichard Levitte1-3/+3
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.
2000-01-30Seek out and destroy another evil cast.Ulf Möller1-1/+1
1999-07-24Don't include x509.h when we just need asn1.hBodo Möller1-1/+1
1999-06-04Support the EBCDIC character set and BS2000/OSD-POSIX (work in progress).Ulf Möller1-0/+9
Submitted by: Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>
1999-04-23Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller1-2/+2
Submitted by: Reviewed by: PR:
1999-04-19Change functions to ANSI C.Ulf Möller1-8/+2
1999-04-17Massive constification.Ben Laurie1-1/+1
1998-12-21Import of old SSLeay release: SSLeay 0.9.0bRalf S. Engelschall1-1/+1
1998-12-21Import of old SSLeay release: SSLeay 0.8.1bRalf S. Engelschall1-0/+211