boringssl/crypto
David Benjamin 8f1e113a73 Ensure verify error is set when X509_verify_cert() fails.
Set ctx->error = X509_V_ERR_OUT_OF_MEM when verification 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.

(Imported from upstream's 5553a12735e11bc9aa28727afe721e7236788aab.)

Change-Id: I3231a6b2e72a3914cb9316b8e90ebaee009a1c5f
Reviewed-on: https://boringssl-review.googlesource.com/8170
Reviewed-by: David Benjamin <davidben@google.com>
2016-06-09 17:29:39 +00:00
..
aes
asn1 Fix some missing inits 2016-06-07 22:05:10 +00:00
base64 Replace base64 decoding. 2016-05-26 17:59:10 +00:00
bio Add BIO_set_conn_int_port. 2016-06-06 14:49:09 +00:00
bn Split unlock functions into read/write variants. 2016-05-31 21:09:29 +00:00
buf Add BUF_MEM_reserve. 2016-05-18 19:09:06 +00:00
bytestring Make tls_open_record always in-place. 2016-06-08 18:39:07 +00:00
chacha
cipher Be consistent about 𝑥_tests.txt 2016-06-06 15:57:46 +00:00
cmac
conf
curve25519 Add missing copyright header. 2016-06-08 20:13:46 +00:00
des
dh Call |BN_mod_exp_mont_consttime| in crypto/dh. 2016-05-11 22:34:19 +00:00
digest Revert md_len removal from SHA256_CTX and SHA512_CTX. 2016-04-27 19:01:23 +00:00
dsa Fix DSA, preserve BN_FLG_CONSTTIME 2016-06-07 19:29:18 +00:00
ec Use different bit tricks to extend the LSB. 2016-04-25 23:05:20 +00:00
ecdh
ecdsa
engine
err Split unlock functions into read/write variants. 2016-05-31 21:09:29 +00:00
evp Add a no-op OpenSSL_add_all_algorithms_conf. 2016-06-06 15:58:02 +00:00
hkdf Fix HKDF leak. 2016-05-20 15:42:01 +00:00
hmac
lhash Use non-deprecated methods on windows. 2016-05-19 20:30:50 +00:00
md4 Revert md_len removal from SHA256_CTX and SHA512_CTX. 2016-04-27 19:01:23 +00:00
md5 Revert md_len removal from SHA256_CTX and SHA512_CTX. 2016-04-27 19:01:23 +00:00
modes Start assuming MSVC 2015. 2016-05-02 19:46:25 +00:00
newhope Be consistent about 𝑥_tests.txt 2016-06-06 15:57:46 +00:00
obj Split unlock functions into read/write variants. 2016-05-31 21:09:29 +00:00
pem Reject inappropriate private key encryption ciphers. 2016-05-03 16:30:08 +00:00
perlasm
pkcs8
poly1305 Be consistent about 𝑥_tests.txt 2016-06-06 15:57:46 +00:00
rand Split unlock functions into read/write variants. 2016-05-31 21:09:29 +00:00
rc4
rsa Split unlock functions into read/write variants. 2016-05-31 21:09:29 +00:00
sha Revert md_len removal from SHA256_CTX and SHA512_CTX. 2016-04-27 19:01:23 +00:00
stack Fix stack macro const-ness. 2016-05-13 18:24:57 +00:00
test newhope: improve test vectors. 2016-06-02 19:28:00 +00:00
x509 Ensure verify error is set when X509_verify_cert() fails. 2016-06-09 17:29:39 +00:00
x509v3 Split unlock functions into read/write variants. 2016-05-31 21:09:29 +00:00
CMakeLists.txt Banish SSL_add_dir_cert_subjects_to_stack and OPENSSL_DIR_CTX to decrepit. 2016-04-27 18:40:25 +00:00
constant_time_test.c
cpu-aarch64-linux.c
cpu-arm-linux.c Make CRYPTO_is_NEON_capable aware of the buggy CPU. 2016-04-28 16:42:21 +00:00
cpu-arm.c
cpu-intel.c
crypto.c Add CRYPTO_has_asm. 2016-05-17 19:03:31 +00:00
ex_data.c Split unlock functions into read/write variants. 2016-05-31 21:09:29 +00:00
internal.h Switch Windows CRYPTO_MUTEX implementation to SRWLOCK. 2016-05-31 21:11:36 +00:00
mem.c Use non-deprecated methods on windows. 2016-05-19 20:30:50 +00:00
refcount_c11.c
refcount_lock.c Split unlock functions into read/write variants. 2016-05-31 21:09:29 +00:00
refcount_test.c
thread_none.c Split unlock functions into read/write variants. 2016-05-31 21:09:29 +00:00
thread_pthread.c Split unlock functions into read/write variants. 2016-05-31 21:09:29 +00:00
thread_test.c
thread_win.c Switch Windows CRYPTO_MUTEX implementation to SRWLOCK. 2016-05-31 21:11:36 +00:00
thread.c Add some getters for the old lock callbacks. 2016-06-06 14:51:36 +00:00
time_support.c