diff options
author | Kenny Root <kroot@google.com> | 2015-07-24 21:02:57 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-24 21:02:57 +0000 |
commit | 3b2c60656d36f47063e972b9aa2c11ef235253a6 (patch) | |
tree | 4d210b442e8e6742e9b0ff9dca4fc158c1a6a03e /src/ssl/test/bssl_shim.cc | |
parent | ffd8e0a5b40ce124e6dce4cb7546a26680d33d16 (diff) | |
parent | 07f4f42347557420f105a72d9a93bc8ee88a3dc5 (diff) | |
download | external_boringssl-3b2c60656d36f47063e972b9aa2c11ef235253a6.zip external_boringssl-3b2c60656d36f47063e972b9aa2c11ef235253a6.tar.gz external_boringssl-3b2c60656d36f47063e972b9aa2c11ef235253a6.tar.bz2 |
am 07f4f423: Merge changes Icdc56a50,I63d5dc28,Ia7d0c5d8,I47406533
* commit '07f4f42347557420f105a72d9a93bc8ee88a3dc5':
Handle RDRAND failures.
dsa_pub_encode: Write out DSA parameters (p, q, g) in addition to key.
Fix for CVE-2015-1789.
Fixes for CVE-2015-1791.
Diffstat (limited to 'src/ssl/test/bssl_shim.cc')
-rw-r--r-- | src/ssl/test/bssl_shim.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ssl/test/bssl_shim.cc b/src/ssl/test/bssl_shim.cc index 40cb149..3b95d7e 100644 --- a/src/ssl/test/bssl_shim.cc +++ b/src/ssl/test/bssl_shim.cc @@ -838,6 +838,20 @@ static bool DoExchange(ScopedSSL_SESSION *out_session, SSL_CTX *ssl_ctx, return false; } } + + if (!config->is_server) { + /* Clients should expect a peer certificate chain iff this was not a PSK + * cipher suite. */ + if (config->psk.empty()) { + if (SSL_get_peer_cert_chain(ssl.get()) == nullptr) { + fprintf(stderr, "Missing peer certificate chain!\n"); + return false; + } + } else if (SSL_get_peer_cert_chain(ssl.get()) != nullptr) { + fprintf(stderr, "Unexpected peer certificate chain!\n"); + return false; + } + } } if (config->export_keying_material > 0) { |