aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/x509/x_name.c
Commit message (Collapse)AuthorAgeFilesLines
* Make X509_NAME_get0_der() conform to OpenSSL styleMatt Caswell2016-08-171-2/+2
| | | | | | | Put the main object first in the params list. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
* Constify ASN1_TYPE_get, ASN1_STRING_type, ASN1_STRING_to_UTF8, ↵FdaSilvaYY2016-07-251-2/+2
| | | | | | | ASN1_TYPE_get_octetstring & co... Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1300)
* Cleanup after sk_push failmrpre2016-07-191-1/+17
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1281)
* Missing NULL check on OBJ_dup result in x509_name_canonFdaSilvaYY2016-06-181-0/+2
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1168)
* Avoid creating an illegal pointerKurt Roeckx2016-06-111-2/+2
| | | | | | | | Found by tis-interpreter Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1164
* Copyright consolidation 09/10Rich Salz2016-05-171-54/+6
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Fix name length limit check.Dr. Stephen Henson2016-05-041-4/+2
| | | | | | | | | | | | | The name length limit check in x509_name_ex_d2i() includes the containing structure as well as the actual X509_NAME. This will cause large CRLs to be rejected. Fix by limiting the length passed to ASN1_item_ex_d2i() which will then return an error if the passed X509_NAME exceeds the length. RT#4531 Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add size limit to X509_NAME structure.Dr. Stephen Henson2016-04-291-0/+11
| | | | | | | | This adds an explicit limit to the size of an X509_NAME structure. Some part of OpenSSL (e.g. TLS) already effectively limit the size due to restrictions on certificate size. Reviewed-by: Matt Caswell <matt@openssl.org>
* The x509_name_canon function doesn't check for an error returnMatt Caswell2016-04-291-2/+5
| | | | | | | i2d_name_canon can return a negative number on error. We should check it before continuing. Reviewed-by: Rich Salz <rsalz@openssl.org>
* GH601: Various spelling fixes.FdaSilvaYY2016-02-051-1/+1
| | | | | Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* Add function to return internal enoding of X509_NAME.Dr. Stephen Henson2016-01-301-0/+13
| | | | | | PR#4280 Reviewed-by: Tim Hudson <tjh@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>
* Only declare stacks in headersDr. Stephen Henson2016-01-071-3/+1
| | | | | | | Don't define stacks in C source files: it causes warnings about unused functions in some compilers. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Rename DECLARE*STACK_OF to DEFINE*STACK_OFDr. Stephen Henson2016-01-071-1/+1
| | | | | | | | | | Applications wishing to include their own stacks now just need to include DEFINE_STACK_OF(foo) in a header file. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Continue standardising malloc style for libcryptoMatt Caswell2015-11-091-3/+3
| | | | | | | Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Fix path in commentsDr. Stephen Henson2015-09-221-1/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Move functions.Dr. Stephen Henson2015-09-221-0/+56
| | | | | | Move various functions tagged onto t_x509.c to more appropriate places. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Enable -Wmissing-variable-declarations andBen Laurie2015-09-111-3/+3
| | | | | | | -Wincompatible-pointer-types-discards-qualifiers (the latter did not require any code changes). Reviewed-by: Rich Salz <rsalz@openssl.org>
* remove 0 assignments.Rich Salz2015-09-031-3/+1
| | | | | | | After openssl_zalloc, cleanup more "set to 0/NULL" assignments. Many are from github feedback. Reviewed-by: Tim Hudson <tjh@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>
* Use safer sizeof variant in mallocRich Salz2015-05-041-2/+2
| | | | | | | | | | | | | For a local variable: TYPE *p; Allocations like this are "risky": p = OPENSSL_malloc(sizeof(TYPE)); if the type of p changes, and the malloc call isn't updated, you could get memory corruption. Instead do this: p = OPENSSL_malloc(sizeof(*p)); Also fixed a few memset() calls that I noticed while doing this. Reviewed-by: Richard Levitte <levitte@openssl.org>
* free null cleanup finaleRich Salz2015-05-011-6/+3
| | | | | | Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* free NULL cleanup 5aRich Salz2015-04-301-9/+6
| | | | | | | | | Don't check for NULL before calling a free routine. This gets X509_.*free: x509_name_ex_free X509_policy_tree_free X509_VERIFY_PARAM_free X509_STORE_free X509_STORE_CTX_free X509_PKEY_free X509_OBJECT_free_contents X509_LOOKUP_free X509_INFO_free Reviewed-by: Richard Levitte <levitte@openssl.org>
* make X509_NAME opaqueDr. Stephen Henson2015-03-251-0/+524
Reviewed-by: Richard Levitte <levitte@openssl.org>