summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_cert.c
AgeCommit message (Collapse)Author
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-11-27Remove redundant checks in ssl_cert_dup. This was causing spurious error ↵Matt Caswell
messages when using GOST PR#3613 Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit fc3968a25ce0c16cab8730ec0d68a59856158029)
2014-08-28Custom extension revision.Dr. Stephen Henson
Use the same structure for client and server custom extensions. Add utility functions in new file t1_ext.c. Use new utility functions to handle custom server and client extensions and remove a lot of code duplication. Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit ecf4d660902dcef6e0afc51d52926f00d409ee6b) Conflicts: ssl/ssl_lib.c ssl/ssl_locl.h ssl/t1_lib.c
2014-08-28Revision of custom extension code.Dr. Stephen Henson
Move custom extension structures from SSL_CTX to CERT structure. This change means the form can be revised in future without binary compatibility issues. Also since CERT is part of SSL structures so per-SSL custom extensions could be supported in future as well as per SSL_CTX. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit b83294fe3022b9d5d525ccdcfeb53d39c25b05bd) Conflicts: ssl/ssl.h ssl/ssl_cert.c ssl/ssl_locl.h
2014-06-10Remove experimental DANE code.Dr. Stephen Henson
Remove experimental DANE/dnssec code: not ready for use in an official release yet.
2014-05-20Fix signed/unsigned warning.Ben Laurie
2014-04-21Fix SSL_CTX_get{first,next}_certificate.Kaspar Brand
Fix typo that stopped SSL_CTX_get_{first,next}_certificate from working. (cherry picked from commit 9330a85e0499f10752434c451977d65d80d8de19)
2014-03-27Update chain building function.Dr. Stephen Henson
Don't clear verification errors from the error queue unless SSL_BUILD_CHAIN_FLAG_CLEAR_ERROR is set. If errors occur during verification and SSL_BUILD_CHAIN_FLAG_IGNORE_ERROR is set return 2 so applications can issue warnings.
2014-03-25Allow duplicate certs in ssl_build_cert_chainEmilia Kasper
2014-02-23Only set current certificate to valid values.Dr. Stephen Henson
When setting the current certificate check that it has a corresponding private key. (cherry picked from commit 358d352aa244b4f2ef655bccff6658d92d5ce03c)
2014-02-23New chain building flags.Dr. Stephen Henson
New flags to build certificate chains. The can be used to rearrange the chain so all an application needs to do is add all certificates in arbitrary order and then build the chain to check and correct them. Add verify error code when building chain. Update docs. (cherry picked from commit 13dc3ce9ab483cade378bcf3844c92bacd817316)
2014-02-21ssl/ssl_cert.c: DANE update.Andy Polyakov
2014-02-08Add callbacks supporting generation and retrieval of supplemental data ↵Scott Deboy
entries, facilitating RFC 5878 (TLS auth extensions) Removed prior audit proof logic - audit proof support was implemented using the generic TLS extension API Tests exercising the new supplemental data registration and callback api can be found in ssltest.c. Implemented changes to s_server and s_client to exercise supplemental data callbacks via the -auth argument, as well as additional flags to exercise supplemental data being sent only during renegotiation. (cherry picked from commit 36086186a9b90cdad0d2cd0a598a10f03f8f4bcc) Conflicts: Configure apps/s_client.c apps/s_server.c ssl/ssl.h ssl/ssl3.h ssl/ssltest.c
2014-02-02New ctrl to set current certificate.Dr. Stephen Henson
New ctrl sets current certificate based on certain criteria. Currently two options: set the first valid certificate as current and set the next valid certificate as current. Using these an application can iterate over all certificates in an SSL_CTX or SSL structure. (cherry picked from commit 0f78819c8ccb7c526edbe90d5b619281366ce75c)
2013-11-13Allow match selecting of current certificate.Dr. Stephen Henson
If pointer comparison for current certificate fails check to see if a match using X509_cmp succeeds for the current certificate: this is useful for cases where the certificate pointer is not available. (cherry picked from commit 6856b288a6e66edd23907b7fa264f42e05ac9fc7)
2013-11-13Additional "chain_cert" functions.Rob Stradling
PR#3169 This patch, which currently applies successfully against master and 1_0_2, adds the following functions: SSL_[CTX_]select_current_cert() - set the current certificate without disturbing the existing structure. SSL_[CTX_]get0_chain_certs() - get the current certificate's chain. SSL_[CTX_]clear_chain_certs() - clear the current certificate's chain. The patch also adds these functions to, and fixes some existing errors in, SSL_CTX_add1_chain_cert.pod. (cherry picked from commit 2f56c9c015dbca45379c9a725915b3b8e765a119)
2013-07-31Cosmetic touchups.Trevor
2013-07-03Trying cherrypick:Trevor
Add support for arbitrary TLS extensions. Contributed by Trevor Perrin. Conflicts: CHANGES ssl/ssl.h ssl/ssltest.c test/testssl Fix compilation due to #endif. Cherrypicking more stuff. Cleanup of custom extension stuff. serverinfo rejects non-empty extensions. Omit extension if no relevant serverinfo data. Improve error-handling in serverinfo callback. Cosmetic cleanups. s_client documentation. s_server documentation. SSL_CTX_serverinfo documentation. Cleaup -1 and NULL callback handling for custom extensions, add tests. Cleanup ssl_rsa.c serverinfo code. Whitespace cleanup. Improve comments in ssl.h for serverinfo. Whitespace. Cosmetic cleanup. Reject non-zero-len serverinfo extensions. Whitespace. Make it build. Conflicts: test/testssl
2013-05-15RFC6689 support: add missing commit (git noob alert).Andy Polyakov
2012-12-26Add ctrl and utility functions to retrieve raw cipher list sent by client inDr. Stephen Henson
client hello message. Previously this could only be retrieved on an initial connection and it was impossible to determine the cipher IDs of any uknown ciphersuites. (backport from HEAD)
2012-12-26Add three Suite B modes to TLS code, supporting RFC6460.Dr. Stephen Henson
(backport from HEAD)
2012-12-26New function X509_chain_up_ref to dup and up the reference count ofDr. Stephen Henson
a STACK_OF(X509): replace equivalent functionality in several places by the equivalent call. (backport from HEAD)
2012-12-26Make tls1_check_chain return a set of flags indicating checks passedDr. Stephen Henson
by a certificate chain. Add additional tests to handle client certificates: checks for matching certificate type and issuer name comparison. Print out results of checks for each candidate chain tested in s_server/s_client. (backport from HEAD)
2012-12-26Add support for certificate stores in CERT structure. This makes itDr. Stephen Henson
possible to have different stores per SSL structure or one store in the parent SSL_CTX. Include distint stores for certificate chain verification and chain building. New ctrl SSL_CTRL_BUILD_CERT_CHAIN to build and store a certificate chain in CERT structure: returing an error if the chain cannot be built: this will allow applications to test if a chain is correctly configured. Note: if the CERT based stores are not set then the parent SSL_CTX store is used to retain compatibility with existing behaviour. (backport from HEAD)
2012-12-26Add new ctrl to retrieve client certificate types, print outDr. Stephen Henson
details in s_client. Also add ctrl to set client certificate types. If not used sensible values will be included based on supported signature algorithms: for example if we don't include any DSA signing algorithms the DSA certificate type is omitted. Fix restriction in old code where certificate types would be truncated if it exceeded TLS_CT_NUMBER. (backport from HEAD)
2012-12-26Separate client and server permitted signature algorithm support: by defaultDr. Stephen Henson
the permitted signature algorithms for server and client authentication are the same but it is now possible to set different algorithms for client authentication only. (backport from HEAD)
2012-12-26Add certificate callback. If set this is called whenever a certificateDr. Stephen Henson
is required by client or server. An application can decide which certificate chain to present based on arbitrary criteria: for example supported signature algorithms. Add very simple example to s_server. This fixes many of the problems and restrictions of the existing client certificate callback: for example you can now clear existing certificates and specify the whole chain. (backport from HEAD)
2012-12-26Add new "valid_flags" field to CERT_PKEY structure which determines whatDr. Stephen Henson
the certificate can be used for (if anything). Set valid_flags field in new tls1_check_chain function. Simplify ssl_set_cert_masks which used to have similar checks in it. Add new "cert_flags" field to CERT structure and include a "strict mode". This enforces some TLS certificate requirements (such as only permitting certificate signature algorithms contained in the supported algorithms extension) which some implementations ignore: this option should be used with caution as it could cause interoperability issues. (backport from HEAD)
2012-12-26Reorganise supported signature algorithm extension processing.Dr. Stephen Henson
Only store encoded versions of peer and configured signature algorithms. Determine shared signature algorithms and cache the result along with NID equivalents of each algorithm. (backport from HEAD)
2012-12-26Add support for application defined signature algorithms for use withDr. Stephen Henson
TLS v1.2. These are sent as an extension for clients and during a certificate request for servers. TODO: add support for shared signature algorithms, respect shared algorithms when deciding which ciphersuites and certificates to permit. (backport from HEAD)
2012-12-26Make it possible to delete all certificates from an SSL structure.Dr. Stephen Henson
(backport from HEAD)
2012-06-27don't use pseudo digests for default values of keysDr. Stephen Henson
2012-05-29RFC 5878 support.Ben Laurie
2012-04-11use different variable for chain iterationDr. Stephen Henson
2012-04-06Add support for automatic ECDH temporary key parameter selection. WhenDr. Stephen Henson
enabled instead of requiring an application to hard code a (possibly inappropriate) parameter set and delve into EC internals we just automatically use the preferred curve. (backport from HEAD)
2012-04-06New ctrls to retrieve supported signature algorithms and curves andDr. Stephen Henson
extensions to s_client and s_server to print out retrieved valued. Extend CERT structure to cache supported signature algorithm data. (backport from HEAD)
2012-04-06Add support for distinct certificate chains per key type and per SSLDr. Stephen Henson
structure. Before this the only way to add a custom chain was in the parent SSL_CTX (which is shared by all key types and SSL structures) or rely on auto chain building (which is performed on each handshake) from the trust store. (backport from HEAD)
2012-04-06Backport: code tidy (from HEAD)Dr. Stephen Henson
2012-04-06Backport: Revise ssl code to use CERT_PKEY structure when outputting a ↵Dr. Stephen Henson
certificate chain (from HEAD)
2012-04-06Backport: tidy/enhance certificate chain output code (from HEAD)Dr. Stephen Henson
2011-05-11Backport TLS v1.2 support from HEAD.Dr. Stephen Henson
This includes TLS v1.2 server and client support but at present client certificate support is not implemented.
2010-03-24PR: 1731 and maybe 2197Dr. Stephen Henson
Clear error queue in a few places in SSL code where errors are expected so they don't stay in the queue.
2009-06-30Redundant check: s->param is always non-NULL, it is set in SSL_new().Dr. Stephen Henson
2009-06-30Inherit parameters properly in SSL contexts: any parameters set shouldDr. Stephen Henson
replace those in the current list.
2007-09-07Change safestack reimplementation to match 0.9.8.Dr. Stephen Henson
Fix additional gcc 4.2 value not used warnings.
2007-02-17Reorganize the data used for SSL ciphersuite pattern matching.Bodo Möller
This change resolves a number of problems and obviates multiple kludges. A new feature is that you can now say "AES256" or "AES128" (not just "AES", which enables both). In some cases the ciphersuite list generated from a given string is affected by this change. I hope this is just in those cases where the previous behaviour did not make sense.
2006-06-14Thread-safety fixesBodo Möller
2006-02-24fix no-dh configure option; patch supplied by Peter MeerwaldNils Larsch
2005-08-08a ssl object needs it's own instance of a ecdh key; remove obsolete commentNils Larsch
2005-07-16makeNils Larsch
./configure no-deprecated [no-dsa] [no-dh] [no-ec] [no-rsa] make depend all test work again PR: 1159