summaryrefslogtreecommitdiffstats
path: root/crypto/x509v3/v3_utl.c
AgeCommit message (Collapse)Author
2016-04-18Make string_to_hex/hex_to_string publicRich Salz
Give the API new names, document it. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-18Rename some lowercase API'sRich Salz
Make OBJ_name_cmp internal Rename idea_xxx to IDEA_xxx Rename get_rfc_xxx to BN_get_rfc_xxx Rename v3_addr and v3_asid functions to X509v3_... Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-09Add X509_CHECK_FLAG_NEVER_CHECK_SUBJECT flagViktor Dukhovni
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-02-24GH480: Don't break statements with CPP stuff.Flavio Medeiros
This is also RT 4137 Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-02-22Remove unused parameters from internal functionsRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz
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>
2016-01-15NGX-2040 - fix wildcard match on punycode/IDNA DNS namesZi Lin
- bugfix: should not treat '--' as invalid domain substring. - '-' should not be the first letter of a domain Signed-off-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-16Rename some BUF_xxx to OPENSSL_xxxRich Salz
Rename BUF_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} to OPENSSL_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} Add #define's for the old names. Add CRYPTO_{memdup,strndup}, called by OPENSSL_{memdup,strndup} macros. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-11-09Continue standardising malloc style for libcryptoMatt Caswell
Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-09-02Cleaner handling of "cnid" in do_x509_checkViktor Dukhovni
Avoid using cnid = 0, use NID_undef instead, and return early instead of trying to find an instance of that in the subject DN. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-08-31make X509_REQ opaqueDr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-14Identify and move common internal libcrypto header filesRichard Levitte
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-11Use p==NULL not !p (in if statements, mainly)Rich Salz
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-11Add missing NULL check in X509V3_parse_list()Kurt Cancemi
Matt's note: I added a call to X509V3err to Kurt's original patch. RT#3840 Signed-off-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-07Fix typo in valid_starViktor Dukhovni
Reviewed-by: Rich Salz <rsalz@akamai.com>
2015-05-06Use "==0" instead of "!strcmp" etcRich Salz
For the various string-compare routines (strcmp, strcasecmp, str.*cmp) use "strcmp()==0" instead of "!strcmp()" Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-04Use safer sizeof variant in mallocRich Salz
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>
2015-05-01free null cleanup finaleRich Salz
Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-30free NULL cleanup 8Rich Salz
Do not check for NULL before calling a free routine. This addresses: ASN1_BIT_STRING_free ASN1_GENERALIZEDTIME_free ASN1_INTEGER_free ASN1_OBJECT_free ASN1_OCTET_STRING_free ASN1_PCTX_free ASN1_SCTX_free ASN1_STRING_clear_free ASN1_STRING_free ASN1_TYPE_free ASN1_UTCTIME_free M_ASN1_free_of Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-04-28remove malloc castsRich Salz
Following ANSI C rules, remove the casts from calls to OPENSSL_malloc and OPENSSL_realloc. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-02-10Fix hostname validation in the command-line tool to honour negative return ↵Emilia Kasper
values. Specifically, an ASN.1 NumericString in the certificate CN will fail UTF-8 conversion and result in a negative return value, which the "x509 -checkhost" command-line option incorrectly interpreted as success. Also update X509_check_host docs to reflect reality. Thanks to Sean Burford (Google) for reporting this issue. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-02-02Dead code cleanup: crypto/*.c, x509v3, demosRich Salz
Some of the #if 0 code in demo's was kept, but given helpful #ifdef names, to show more sample code. Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-01-22More comment realignmentmaster-post-reformatMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22More indent fixes for STACK_OFMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-12Allow multiple IDN xn-- indicatorsRich Salz
Update the X509v3 name parsing to allow multiple xn-- international domain name indicators in a name. Previously, only allowed one at the beginning of a name, which was wrong. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2014-08-15Fix use after free bug.Istvan Noszticzius
Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-07-07Update API to use (char *) for email addresses and hostnamesViktor Dukhovni
Reduces number of silly casts in OpenSSL code and likely most applications. Consistent with (char *) for "peername" value from X509_check_host() and X509_VERIFY_PARAM_get0_peername().
2014-07-06Set optional peername when X509_check_host() succeeds.Viktor Dukhovni
Pass address of X509_VERIFY_PARAM_ID peername to X509_check_host(). Document modified interface.
2014-06-22More complete input validation of X509_check_mumbleViktor Dukhovni
2014-06-22Drop hostlen from X509_VERIFY_PARAM_ID.Viktor Dukhovni
Just store NUL-terminated strings. This works better when we add support for multiple hostnames.
2014-06-14Enforce _X509_CHECK_FLAG_DOT_SUBDOMAINS internal-onlyViktor Dukhovni
2014-06-12Client-side namecheck wildcards.Viktor Dukhovni
A client reference identity of ".example.com" matches a server certificate presented identity that is any sub-domain of "example.com" (e.g. "www.sub.example.com). With the X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS flag, it matches only direct child sub-domains (e.g. "www.sub.example.com").
2014-05-21Fixes to host checking.Viktor Dukhovni
Fixes to host checking wild card support and add support for setting host checking flags when verifying a certificate chain.
2012-11-21Submitted by: Florian Weimer <fweimer@redhat.com>Dr. Stephen Henson
PR: 2909 Update test cases to cover internal error return values. Remove IDNA wildcard filter.
2012-11-18PR: 2909Dr. Stephen Henson
Contributed by: Florian Weimer <fweimer@redhat.com> Fixes to X509 hostname and email address checking. Wildcard matching support. New test program and manual page.
2012-10-08New functions to check a hostname email or IP address against aDr. Stephen Henson
certificate. Add options to s_client, s_server and x509 utilities to print results of checks.
2009-07-27Update from 1.0.0-stableDr. Stephen Henson
2009-02-14PR: 1835Dr. Stephen Henson
Submitted by: Damien Miller <djm@mindrot.org> Approved by: steve@openssl.org Fix various typos.
2008-12-08Oops should check zero_pos >= 0.Dr. Stephen Henson
2008-12-07Handle case where v6stat.zero_pos == 0 correctly.Dr. Stephen Henson
Reported by: Kurt Roeckx <kurt@roeckx.be>, Tobias Ginzler <ginzler@fgan.de> (Debian bug #506111)
2008-11-05Update obsolete email address...Dr. Stephen Henson
2008-07-04Avoid warnings with -pedantic, specifically:Dr. Stephen Henson
Conversion between void * and function pointer. Value computed not used. Signed/unsigned argument.
2008-06-04More type-checking.Ben Laurie
2007-09-26Support for certificate status TLS extension.Dr. Stephen Henson
2007-04-11Constification.Dr. Stephen Henson
2007-02-03Update from fips2 branch.Dr. Stephen Henson
2006-11-27Add RFC 3779 support.Ben Laurie
2006-03-06unused functionUlf Möller
2006-02-12RFC 3161 compliant time stamp request creation, response generationUlf Möller
and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller