TLS/SSL and crypto library
Find a file
Viktor Dukhovni ed422a2d01 Only CA certificates can be self-issued
At the bottom of https://tools.ietf.org/html/rfc5280#page-12 and
top of https://tools.ietf.org/html/rfc5280#page-13 (last paragraph
of above https://tools.ietf.org/html/rfc5280#section-3.3), we see:

   This specification covers two classes of certificates: CA
   certificates and end entity certificates.  CA certificates may be
   further divided into three classes: cross-certificates, self-issued
   certificates, and self-signed certificates.  Cross-certificates are
   CA certificates in which the issuer and subject are different
   entities.  Cross-certificates describe a trust relationship between
   the two CAs.  Self-issued certificates are CA certificates in which
   the issuer and subject are the same entity.  Self-issued certificates
   are generated to support changes in policy or operations.  Self-
   signed certificates are self-issued certificates where the digital
   signature may be verified by the public key bound into the
   certificate.  Self-signed certificates are used to convey a public
   key for use to begin certification paths.  End entity certificates
   are issued to subjects that are not authorized to issue certificates.

that the term "self-issued" is only applicable to CAs, not end-entity
certificates.  In https://tools.ietf.org/html/rfc5280#section-4.2.1.9
the description of path length constraints says:

   The pathLenConstraint field is meaningful only if the cA boolean is
   asserted and the key usage extension, if present, asserts the
   keyCertSign bit (Section 4.2.1.3).  In this case, it gives the
   maximum number of non-self-issued intermediate certificates that may
   follow this certificate in a valid certification path.  (Note: The
   last certificate in the certification path is not an intermediate
   certificate, and is not included in this limit.  Usually, the last
   certificate is an end entity certificate, but it can be a CA
   certificate.)

This makes it clear that exclusion of self-issued certificates from
the path length count applies only to some *intermediate* CA
certificates.  A leaf certificate whether it has identical issuer
and subject or whether it is a CA or not is never part of the
intermediate certificate count.  The handling of all leaf certificates
must be the same, in the case of our code to post-increment the
path count by 1, so that we ultimately reach a non-self-issued
intermediate it will be the first one (not zeroth) in the chain
of intermediates.

Reviewed-by: Matt Caswell <matt@openssl.org>
2018-10-18 00:07:27 -04:00
.github Remind people to have 'Fixes #XXXX' in the commit message 2017-04-02 21:51:47 +02:00
apps Fix: 'openssl ca' command crashes when used with 'rand_serial' option 2018-10-17 12:02:29 +02:00
boringssl@2070f8ad91 Update ossl_config.json for later BoringSSL commit 2017-03-14 12:12:13 +00:00
Configurations Build file templates: look at *all* defines 2018-10-17 10:57:17 +02:00
crypto Only CA certificates can be self-issued 2018-10-18 00:07:27 -04:00
demos Add a GMAC demonstration program. 2018-09-19 11:38:43 +10:00
doc s390x assembly pack: add OPENSSL_s390xcap man page. 2018-10-17 14:03:59 +02:00
engines Change the build of engines to use ordinal files for symbol export 2018-10-05 08:22:42 +02:00
external/perl Update copyright year 2018-09-11 13:45:17 +01:00
fuzz print() is a function in Python 3 2018-10-17 07:31:25 +02:00
include Deprecate ECDH_KDF_X9_62() 2018-10-17 13:22:14 +03:00
krb5@b9ad6c4950 [extended tests] Enable krb5 tests in Travis 2017-04-18 19:10:25 +02:00
ms Update copyright year 2018-05-01 13:34:30 +01:00
os-dep Move Haiku configuration to separate config file to denote 2016-05-19 22:39:52 +02:00
pyca-cryptography@09403100de Update the pyca-cryptography submodule 2018-09-10 12:04:03 +01:00
ssl Add a missing check on s->s3->tmp.pkey 2018-10-17 09:22:14 +01:00
test DRBG: fix reseeding via RAND_add()/RAND_seed() with large input 2018-10-16 22:15:43 +02:00
tools Update copyright year 2018-03-20 13:08:46 +00:00
util s390x assembly pack: add OPENSSL_s390xcap man page. 2018-10-17 14:03:59 +02:00
VMS Simplify the handling of shared library version numbers 2017-07-26 22:53:03 +02:00
.gitattributes crypto/pkcs12: facilitate accessing data with non-interoperable password. 2016-08-22 13:52:59 +02:00
.gitignore Ignore libcrypto.ld and libssl.ld 2018-10-03 16:40:18 +01:00
.gitmodules [extended tests] Enable krb5 tests in Travis 2017-04-18 19:10:25 +02:00
.travis-apt-pin.preferences Fix travis clang-3.9 builds 2017-06-23 17:57:02 +01:00
.travis-create-release.sh Reduce travis-ci log output 2018-03-08 21:18:35 +01:00
.travis.yml Revert ".travis.yml: omit linux-ppc64le target." 2018-08-31 10:56:35 +02:00
ACKNOWLEDGEMENTS Refer to website for acknowledgements. 2015-12-08 16:07:09 -05:00
appveyor.yml CI config: no need to make both install and install_docs 2018-05-14 17:51:48 +02:00
AUTHORS Update AUTHORS list, add commentary 2018-07-08 20:32:04 -04:00
build.info Refactor util/mkdef.pl for clearer separation of functionality 2018-10-03 22:16:10 +02:00
CHANGES Deprecate ECDH_KDF_X9_62() 2018-10-17 13:22:14 +03:00
config Configure: move --noexecstack probe to Configure. 2018-05-05 20:44:56 +02:00
config.com Update copyright year 2018-02-13 13:59:25 +00:00
Configure Configure: use correct variable to infer the .ld file location 2018-10-05 08:22:42 +02:00
CONTRIBUTING Add a note on CHANGES and NEWS in CONTRIBUTING 2018-05-17 13:51:11 +02:00
e_os.h test/secmemtest: test secure memory only if it is implemented 2018-10-05 12:19:48 +02:00
FAQ Move FAQ to the web. 2015-08-16 19:02:29 -04:00
INSTALL typo-fixes: miscellaneous typo fixes 2018-09-21 23:55:22 +02:00
LICENSE Update the license end year 2018-01-20 10:02:23 +01:00
NEWS The next version in master is at least 1.1.2, not 1.1.1x 2018-09-11 16:51:38 +02:00
NOTES.ANDROID INSTALL,NOTES.ANDROID: minor updates. 2018-08-07 08:53:12 +02:00
NOTES.DJGPP Slight cleanup of the collection of READMEs, INSTALLs and NOTES 2016-05-23 16:02:53 +02:00
NOTES.PERL Tweaks to NOTES.PERL 2016-06-03 17:10:16 +01:00
NOTES.UNIX NOTES.UNIX: add "Linking your application" paragraph 2018-06-26 12:28:06 +02:00
NOTES.VMS More typo fixes 2017-03-29 07:14:29 +02:00
NOTES.WIN INSTALL,NOTES.WIN: classify no-asm as non-production option. 2018-07-25 15:47:12 +02:00
README The next version in master is at least 1.1.2, not 1.1.1x 2018-09-11 16:51:38 +02:00
README.ENGINE Remove bsd_cryptodev engine 2017-06-19 09:31:45 -04:00
README.FIPS Remove more (rest?) of FIPS build stuff. 2016-01-06 12:07:26 -05:00

 OpenSSL 1.1.2-dev

 Copyright (c) 1998-2018 The OpenSSL Project
 Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
 All rights reserved.

 DESCRIPTION
 -----------

 The OpenSSL Project is a collaborative effort to develop a robust,
 commercial-grade, fully featured, and Open Source toolkit implementing the
 Transport Layer Security (TLS) protocols (including SSLv3) as well as a
 full-strength general purpose cryptographic library.

 OpenSSL is descended from the SSLeay library developed by Eric A. Young
 and Tim J. Hudson.  The OpenSSL toolkit is licensed under a dual-license (the
 OpenSSL license plus the SSLeay license), which means that you are free to
 get and use it for commercial and non-commercial purposes as long as you
 fulfill the conditions of both licenses.

 OVERVIEW
 --------

 The OpenSSL toolkit includes:

 libssl (with platform specific naming):
     Provides the client and server-side implementations for SSLv3 and TLS.

 libcrypto (with platform specific naming):
     Provides general cryptographic and X.509 support needed by SSL/TLS but
     not logically part of it.

 openssl:
     A command line tool that can be used for:
        Creation of key parameters
        Creation of X.509 certificates, CSRs and CRLs
        Calculation of message digests
        Encryption and decryption
        SSL/TLS client and server tests
        Handling of S/MIME signed or encrypted mail
        And more...

 INSTALLATION
 ------------

 See the appropriate file:
        INSTALL         Linux, Unix, Windows, OpenVMS, ...
        NOTES.*         INSTALL addendums for different platforms

 SUPPORT
 -------

 See the OpenSSL website www.openssl.org for details on how to obtain
 commercial technical support. Free community support is available through the
 openssl-users email list (see
 https://www.openssl.org/community/mailinglists.html for further details).

 If you have any problems with OpenSSL then please take the following steps
 first:

    - Download the latest version from the repository
      to see if the problem has already been addressed
    - Configure with no-asm
    - Remove compiler optimization flags

 If you wish to report a bug then please include the following information
 and create an issue on GitHub:

    - OpenSSL version: output of 'openssl version -a'
    - Configuration data: output of 'perl configdata.pm --dump'
    - OS Name, Version, Hardware platform
    - Compiler Details (name, version)
    - Application Details (name, version)
    - Problem Description (steps that will reproduce the problem, if known)
    - Stack Traceback (if the application dumps core)

 Just because something doesn't work the way you expect does not mean it
 is necessarily a bug in OpenSSL. Use the openssl-users email list for this type
 of query.

 HOW TO CONTRIBUTE TO OpenSSL
 ----------------------------

 See CONTRIBUTING

 LEGALITIES
 ----------

 A number of nations restrict the use or export of cryptography. If you
 are potentially subject to such restrictions you should seek competent
 professional legal advice before attempting to develop or distribute
 cryptographic code.