diff options
author | lloyd <[email protected]> | 2012-07-09 16:43:21 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-07-09 16:43:21 +0000 |
commit | a73ace1185febb9a9dfa9e6ba93c883beedbd938 (patch) | |
tree | 73170167ab016e9af2346921aa9da2afd5ed25b2 /src/tls | |
parent | 4e43080954be57e362feb1cc8202bfd42117e286 (diff) |
The messages for assertion checks were done both ways, both "assertion
X is true" and "assertion X is false". Convert all of them to the form
"assertion X is true" thus making it clear what it is that we are
attempting to assert by testing the expression provided.
Diffstat (limited to 'src/tls')
-rw-r--r-- | src/tls/c_kex.cpp | 2 | ||||
-rw-r--r-- | src/tls/s_kex.cpp | 6 | ||||
-rw-r--r-- | src/tls/tls_channel.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/tls/c_kex.cpp b/src/tls/c_kex.cpp index 54c5af5c3..836edf8ce 100644 --- a/src/tls/c_kex.cpp +++ b/src/tls/c_kex.cpp @@ -276,7 +276,7 @@ Client_Key_Exchange::Client_Key_Exchange(const std::vector<byte>& contents, if(kex_algo == "RSA") { BOTAN_ASSERT(state->server_certs && !state->server_certs->cert_chain().empty(), - "No server certificate to use for RSA"); + "RSA key exchange negotiated so server sent a certificate"); const Private_Key* private_key = state->server_rsa_kex_key; diff --git a/src/tls/s_kex.cpp b/src/tls/s_kex.cpp index 694462082..e6ea14dbe 100644 --- a/src/tls/s_kex.cpp +++ b/src/tls/s_kex.cpp @@ -123,7 +123,7 @@ Server_Key_Exchange::Server_Key_Exchange(Record_Writer& writer, if(state->suite.sig_algo() != "") { - BOTAN_ASSERT(signing_key, "No signing key set"); + BOTAN_ASSERT(signing_key, "Signing key was set"); std::pair<std::string, Signature_Format> format = state->choose_sig_format(signing_key, m_hash_algo, m_sig_algo, false, policy); @@ -279,14 +279,14 @@ bool Server_Key_Exchange::verify(const X509_Certificate& cert, const Private_Key& Server_Key_Exchange::server_kex_key() const { - BOTAN_ASSERT(m_kex_key, "Key is non-NULL"); + BOTAN_ASSERT_NONNULL(m_kex_key); return *m_kex_key; } // Only valid for SRP negotiation SRP6_Server_Session& Server_Key_Exchange::server_srp_params() { - BOTAN_ASSERT(m_srp_params, "SRP params are non-NULL"); + BOTAN_ASSERT_NONNULL(m_srp_params); return *m_srp_params; } } diff --git a/src/tls/tls_channel.cpp b/src/tls/tls_channel.cpp index e3188cafa..1b4cb407e 100644 --- a/src/tls/tls_channel.cpp +++ b/src/tls/tls_channel.cpp @@ -181,7 +181,7 @@ void Channel::read_handshake(byte rec_type, m_state->handshake_reader()->add_input(&rec_buf[0], rec_buf.size()); } - BOTAN_ASSERT(m_state, "Handshake message recieved without state in place"); + BOTAN_ASSERT_NONNULL(m_state); while(true) { |