summaryrefslogtreecommitdiffstats
path: root/crypto/x509v3
AgeCommit message (Collapse)Author
2016-06-10Fix an error path leak in do_ext_nconf()Matt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 8605abf13523579ecab8b1f2a4bcb8354d94af79)
2016-05-19Ensure verify error is set when X509_verify_cert() failsViktor Dukhovni
Set ctx->error = X509_V_ERR_OUT_OF_MEM when verificaiton cannot continue due to malloc failure. Similarly for issuer lookup failures and caller errors (bad parameters or invalid state). Also, when X509_verify_cert() returns <= 0 make sure that the verification status does not remain X509_V_OK, as a last resort set it it to X509_V_ERR_UNSPECIFIED, just in case some code path returns an error without setting an appropriate value of ctx->error. Add new and some missing error codes to X509 error -> SSL alert switch. Reviewed-by: Tim Hudson <tjh@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-18Remove the "eay" c-file-style indicatorsRichard Levitte
Since we don't use the eay style any more, there's no point tryint to tell emacs to use it. Reviewed-by: Ben Laurie <ben@openssl.org>
2015-11-09Fix missing malloc return value checksMatt Caswell
During work on a larger change in master a number of locations were identified where return value checks were missing. This backports the relevant fixes. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-15Fix self signed handling.Dr. Stephen Henson
Don't mark a certificate as self signed if keyUsage is present and certificate signing not asserted. PR#3979 Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit f51e5ed6b4b91d12228da873db72aa28109d1797)
2015-09-15RT4044: Remove .cvsignore files.Rich Salz
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-09-15d2i: don't update input pointer on failureKurt Roeckx
Reviewed-by: Dr. Stephen Henson <steve@openssl.org> MR #1005 (cherry picked from commit a46c9789ce2aecedceef119e9883513c7a49f1ca)
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> (cherry picked from commit fffc2faeb2b5cad4516cc624352d445284aa7522)
2015-07-14Conversion to UTF-8 where neededRichard Levitte
This leaves behind files with names ending with '.iso-8859-1'. These should be safe to remove. If something went wrong when re-encoding, there will be some files with names ending with '.utf8' left behind. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-06-03make updateDr. Stephen Henson
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-05-23Fix the update target and remove duplicate file updatesRichard Levitte
We had updates of certain header files in both Makefile.org and the Makefile in the directory the header file lived in. This is error prone and also sometimes generates slightly different results (usually just a comment that differs) depending on which way the update was done. This removes the file update targets from the top level Makefile, adds an update: target in all Makefiles and has it depend on the depend: or local_depend: targets, whichever is appropriate, so we don't get a double run through the whole file tree. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 0f539dc1a2f45580435c39dada44dd276e79cb88) Conflicts: Makefile.org apps/Makefile test/Makefile
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> (cherry picked from commit 344c271eb339fc2982e9a3584a94e51112d84584)
2015-05-07Fix typo in valid_starViktor Dukhovni
Reviewed-by: Rich Salz <rsalz@akamai.com>
2015-05-05Remove libcrypto to libssl dependencyMatt Caswell
Remove dependency on ssl_locl.h from v3_scts.c, and incidentally fix a build problem with kerberos (the dependency meant v3_scts.c was trying to include krb5.h, but without having been passed the relevanant -I flags to the compiler) Reviewed-by: Dr. Stephen Henson <steve@openssl.org> (cherry picked from commit d13bd6130bd856e9f512c43499e5fc70943bf133) Conflicts: crypto/x509v3/v3_scts.c
2015-04-16Code style: space after 'if'Viktor Dukhovni
Reviewed-by: Matt Caswell <gitlab@openssl.org>
2015-04-11do_dirname: Don't change gen on failuresKurt Roeckx
It would set gen->d.dirn to a freed pointer in case X509V3_NAME_from_section failed. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 8ec5c5dd361343d9017eff8547b19e86e4944ebc)
2015-03-12Fix missing return checks in v3_cpols.cMatt Caswell
Fixed assorted missing return value checks in c3_cpols.c Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit c5f2b5336ab72e40ab91e2ca85639f51fa3178c6)
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> (cherry picked from commit 0923e7df9eafec6db9c75405d7085ec8581f01bd)
2015-01-22Re-align some comments after running the reformat script.OpenSSL_1_0_2-post-reformatMatt Caswell
This should be a one off operation (subsequent invokation of the script should not move them) This commit is for the 1.0.2 changes 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
Conflicts: ssl/s3_lib.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Additional comment changes for reformat of 1.0.2Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Further comment amendments to preserve formatting prior to source reformatMatt Caswell
(cherry picked from commit 4a7fa26ffd65bf36beb8d1cb8f29fc0ae203f5c5) Conflicts: crypto/x509v3/pcy_tree.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22mark all block comments that need format preserving so thatTim Hudson
indent will not alter them when reformatting comments (cherry picked from commit 1d97c8435171a7af575f73c526d79e1ef0ee5960) Conflicts: crypto/bn/bn_lcl.h crypto/bn/bn_prime.c crypto/engine/eng_all.c crypto/rc4/rc4_utl.c crypto/sha/sha.h ssl/kssl.c ssl/t1_lib.c 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> (cherry picked from commit 31d1d3741f16bd80ec25f72dcdbf6bbdc5664374)
2015-01-06RT3662: Allow leading . in nameConstraintsDr. Stephen Henson
Change by SteveH from original by John Denker (in the RT) Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 77ff1f3b8bfaa348956c5096a2b829f2e767b4f1)
2014-09-08RT3031: Need to #undef some names for win32Robin Lee
Copy the ifdef/undef stanza from x509.h to x509v3.h Reviewed-by: Dr. Stephen Henson <steve@openssl.org> (cherry picked from commit 83e4e03eeb22d2fbaec516a466330f2ccab22864)
2014-08-15Fix use after free bug.Istvan Noszticzius
Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit 5afa57fb7b17aa51cfba1ffa94e900fc7a5f0e04)
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(). (cherry picked from commit 297c67fcd817ea643de2fdeff4e434b050d571e2)
2014-07-07Set optional peername when X509_check_host() succeeds.Viktor Dukhovni
Pass address of X509_VERIFY_PARAM_ID peername to X509_check_host(). Document modified interface. (cherry picked from commit ced3d9158a7a8c676be504bb6cd3b5ffb7cc7f13)
2014-06-25More complete input validation of X509_check_mumbleViktor Dukhovni
(cherry picked from commit 29edebe95c2a51470c78c7e769c926719965eeb1)
2014-06-25Drop hostlen from X509_VERIFY_PARAM_ID.Viktor Dukhovni
Just store NUL-terminated strings. This works better when we add support for multiple hostnames. (cherry picked from commit b3012c698a086937319ed413a113ed7bec1edd1a)
2014-06-14Enforce _X509_CHECK_FLAG_DOT_SUBDOMAINS internal-onlyViktor Dukhovni
(cherry picked from commit d435e23959f1c2cb4feadbfba9ad884c59f37db9)
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"). (cherry picked from commit e52c52f10bb8e34aaf8f28f3e5b56939e8f6b357)
2014-06-12make updateDr. Stephen Henson
2014-06-11Separate the SCT List parser from the SCT List viewerRob Stradling
(cherry picked from commit fd2309aa29e3ea00e445f03407820398962c0b94)
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. (cherry picked from commit 397a8e747dc3f964196caed5ca4e08d4b598362a)
2014-04-15Extension checking fixes.Dr. Stephen Henson
When looking for an extension we need to set the last found position to -1 to properly search all extensions. PR#3309. (cherry picked from commit 300b9f0b704048f60776881f1d378c74d9c32fbd)
2014-02-25Don't use BN_ULLONG in n2l8 use SCTS_TIMESTAMP.Dr. Stephen Henson
2014-02-25Fix for v3_scts.cDr. Stephen Henson
Not all platforms define BN_ULLONG. Define SCTS_TIMESTAMP as a type which should work on all platforms.
2014-02-25Parse non-v1 SCTs less awkwardly.Rob Stradling
(cherry picked from commit 19f65ddbab30543415584ae7916e12a3c5249dba)
2014-02-20make updateDr. Stephen Henson
2014-02-20fix WIN32 warningsDr. Stephen Henson
2014-02-20Show the contents of the RFC6962 Signed Certificate Timestamp List ↵Rob Stradling
Certificate/OCSP Extensions. Add the RFC6962 OIDs to the objects table. (backport from master branch)
2014-02-14Include self-signed flag in certificates by checking SKID/AKID as wellDr. Stephen Henson
as issuer and subject names. Although this is an incompatible change it should have little impact in pratice because self-issued certificates that are not self-signed are rarely encountered. (cherry picked from commit b1efb7161f409c81178b9aa95583db3390f90b1b)
2014-02-02Add extension free function.Ben Laurie
2012-12-26Portability fix: use BIO_snprintf and pick up strcasecmp alternativeDr. Stephen Henson
definitions from e_os.h
2012-12-26Oops, add missing v3nametest.cDr. Stephen Henson
2012-12-19Backport X509 hostname, IP address and email checking code from HEAD.Dr. Stephen Henson