openssl/apps
Viktor Dukhovni c0a445a9f2 Suppress DANE TLSA reflection when verification fails
As documented both SSL_get0_dane_authority() and SSL_get0_dane_tlsa()
are expected to return a negative match depth and nothing else when
verification fails.  However, this only happened when verification
failed during chain construction.  Errors in verification of the
constructed chain did not have the intended effect on these functions.

This commit updates the functions to check for verify_result ==
X509_V_OK, and no longer erases any accumulated match information
when chain construction fails.  Sophisticated developers can, with
care, use SSL_set_verify_result(ssl, X509_V_OK) to "peek" at TLSA
info even when verification fail.  They must of course first check
and save the real error, and restore the original error as quickly
as possible.  Hiding by default seems to be the safer interface.

Introduced X509_V_ERR_DANE_NO_MATCH code to signal failure to find
matching TLSA records.  Previously reported via X509_V_ERR_CERT_UNTRUSTED.

This also changes the "-brief" output from s_client to include
verification results and TLSA match information.

Mentioned session resumption in code example in SSL_CTX_dane_enable(3).
Also mentioned that depths returned are relative to the verified chain
which is now available via SSL_get0_verified_chain(3).

Added a few more test-cases to danetest, that exercise the new
code.

Resolved thread safety issue in use of static buffer in
X509_verify_cert_error_string().

Fixed long-stating issue in apps/s_cb.c which always sets verify_error
to either X509_V_OK or "chain to long", code elsewhere (e.g.
s_time.c), seems to expect the actual error.  [ The new chain
construction code is expected to correctly generate "chain
too long" errors, so at some point we need to drop the
work-arounds, once SSL_set_verify_depth() is also fixed to
propagate the depth to X509_STORE_CTX reliably. ]

Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-08 14:46:09 -05:00
..
demoCA
demoSRP
app_rand.c Add a no-egd option to disable EGD-related code 2016-01-14 13:02:51 -05:00
apps.c Fix pkeyutl/rsautl empty encrypt-input/decrypt-output handling 2016-02-02 23:24:12 -05:00
apps.h commands help cleanup 2016-02-06 14:06:52 -05:00
asn1pars.c commands help cleanup 2016-02-06 14:06:52 -05:00
build.info unified build scheme: add build.info files 2016-02-01 12:46:58 +01:00
ca-cert.srl
ca-key.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
ca-req.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
ca.c Fix engine key support in utilities. 2016-02-08 15:11:08 +00:00
CA.com Replace "SSLeay" in API with OpenSSL 2015-10-30 17:21:42 -04:00
CA.pl.in Generate warning text 2016-01-25 21:19:59 +01:00
cert.pem
ciphers.c Support disabling any or all TLS or DTLS versions 2016-01-19 09:57:15 -05:00
client.pem
cms.c Refactor apps load_certs/load_crls to work incrementally 2016-01-20 19:04:26 -05:00
crl.c New function X509_get0_pubkey 2015-12-14 23:06:14 +00:00
crl2p7.c Fix option value parsing in crl2pkcs7 -certfile 2015-12-13 21:31:03 -05:00
dgst.c Fix engine key support in utilities. 2016-02-08 15:11:08 +00:00
dh1024.pem
dh2048.pem
dh4096.pem
dhparam.c Continue standardisation of malloc handling in apps 2015-11-09 22:48:41 +00:00
dsa-ca.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
dsa-pca.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
dsa.c Fix engine key support in utilities. 2016-02-08 15:11:08 +00:00
dsa512.pem
dsa1024.pem
dsap.pem
dsaparam.c RT4227: Range-check in apps. 2016-01-12 01:00:31 -05:00
ec.c Add ec -check option 2016-02-04 15:28:33 +00:00
ecparam.c Fix memory leak and print out keygen errors. 2016-02-01 15:11:18 +00:00
enc.c Adapt all EVP_CIPHER users for it becoming opaque 2016-01-12 13:52:22 +01:00
engine.c RT4194: Restore old engine parameter parsing. 2016-02-06 09:19:04 -05:00
errstr.c Big apps cleanup (option-parsing, etc) 2015-04-24 15:26:15 -04:00
gendsa.c Remove useless code 2015-10-23 19:52:08 +02:00
genpkey.c Continue standardisation of malloc handling in apps 2015-11-09 22:48:41 +00:00
genrsa.c Remove more (rest?) of FIPS build stuff. 2016-01-06 12:07:26 -05:00
install-apps.com
makeapps.com Big apps cleanup (option-parsing, etc) 2015-04-24 15:26:15 -04:00
Makefile.in Enhance and clear the support of linker flags 2016-02-06 17:57:19 +01:00
nseq.c Continue standardisation of malloc handling in apps 2015-11-09 22:48:41 +00:00
ocsp.c Refactor apps load_certs/load_crls to work incrementally 2016-01-20 19:04:26 -05:00
openssl-vms.cnf Remove outdated legacy crypto options 2016-01-27 19:05:50 -05:00
openssl.c If memory debugging enabled return error on leaks. 2016-02-05 16:02:21 +00:00
openssl.cnf Use better defaults for TSA. 2015-11-20 13:40:53 +00:00
opt.c commands help cleanup 2016-02-06 14:06:52 -05:00
passwd.c Rename some BUF_xxx to OPENSSL_xxx 2015-12-16 16:14:49 -05:00
pca-cert.srl
pca-key.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
pca-req.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
pkcs7.c Centralise loading default apps config file 2015-10-12 22:31:00 +01:00
pkcs8.c RT4227: Range-check in apps. 2016-01-12 01:00:31 -05:00
pkcs12.c fix various formatting issues 2016-02-08 18:43:49 +00:00
pkey.c Fix engine key support in utilities. 2016-02-08 15:11:08 +00:00
pkeyparam.c Centralise loading default apps config file 2015-10-12 22:31:00 +01:00
pkeyutl.c more doc fixes 2016-02-07 23:14:12 -05:00
prime.c Fix "primarility" typo 2015-11-21 14:37:24 +01:00
privkey.pem
progs.h more doc fixes 2016-02-07 23:14:12 -05:00
progs.pl more doc fixes 2016-02-07 23:14:12 -05:00
rand.c RT4227: Range-check in apps. 2016-01-12 01:00:31 -05:00
rehash.c Rename some BUF_xxx to OPENSSL_xxx 2015-12-16 16:14:49 -05:00
req.c GH634: fix potential memory leak 2016-02-06 09:25:54 -05:00
req.pem
rsa.c Fix engine key support in utilities. 2016-02-08 15:11:08 +00:00
rsa8192.pem
rsautl.c Fix engine key support in utilities. 2016-02-08 15:11:08 +00:00
s512-key.pem
s512-req.pem
s1024key.pem
s1024req.pem
s_apps.h Suppress DANE TLSA reflection when verification fails 2016-02-08 14:46:09 -05:00
s_cb.c Suppress DANE TLSA reflection when verification fails 2016-02-08 14:46:09 -05:00
s_client.c Suppress DANE TLSA reflection when verification fails 2016-02-08 14:46:09 -05:00
s_server.c Deprecate undocumented SSL_cache_hit(). 2016-02-08 16:57:07 +00:00
s_socket.c Refactoring BIO: Adapt s_client and s_server 2016-02-03 20:36:49 +01:00
s_time.c Address Windows warnings in apps/. 2015-10-05 09:25:06 +02:00
server.pem
server.srl
server2.pem
sess_id.c Fix NSS format session output 2016-01-11 10:03:27 +00:00
smime.c Refactor apps load_certs/load_crls to work incrementally 2016-01-20 19:04:26 -05:00
speed.c RT3755: Remove duplicate #include 2016-01-31 09:42:53 -05:00
spkac.c Continue standardisation of malloc handling in apps 2015-11-09 22:48:41 +00:00
srp.c Fix quoting error in SRP printf 2016-01-22 15:06:21 -05:00
testCA.pem
testdsa.h Big apps cleanup (option-parsing, etc) 2015-04-24 15:26:15 -04:00
testrsa.h Remove /* foo.c */ comments 2016-01-26 16:40:43 -05:00
timeouts.h Remove /* foo.c */ comments 2016-01-26 16:40:43 -05:00
ts.c Cleanup: fix all sources that used EVP_MD_CTX_(create|init|destroy) 2015-12-07 17:40:20 +01:00
tsget
verify.c Multiple -trusted/-untrusted/-CRLfile options in verify 2016-01-20 19:04:33 -05:00
version.c Replace "SSLeay" in API with OpenSSL 2015-10-30 17:21:42 -04:00
vms_decc_init.c Fix some missing or faulty header file inclusions 2015-12-30 14:54:29 +01:00
winrand.c Big apps cleanup (option-parsing, etc) 2015-04-24 15:26:15 -04:00
x509.c Fix engine key support in utilities. 2016-02-08 15:11:08 +00:00