diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-11-22 14:27:02 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-11-22 14:27:02 +0100 |
commit | 895b751c92775f7610869a205d58a0a7c98632e0 (patch) | |
tree | a2182b8a5ddee92e0d649968e50842572072addf /common/rfb/CSecurityDH.cxx | |
parent | 9366d8e54c5ee1c2cfcf333a17b7fd4bdbd13993 (diff) | |
download | tigervnc-895b751c92775f7610869a205d58a0a7c98632e0.tar.gz tigervnc-895b751c92775f7610869a205d58a0a7c98632e0.zip |
Capitalize some more logging and exceptions
Diffstat (limited to 'common/rfb/CSecurityDH.cxx')
-rw-r--r-- | common/rfb/CSecurityDH.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/rfb/CSecurityDH.cxx b/common/rfb/CSecurityDH.cxx index d8308cbf..2f0365a6 100644 --- a/common/rfb/CSecurityDH.cxx +++ b/common/rfb/CSecurityDH.cxx @@ -112,7 +112,7 @@ void CSecurityDH::writeCredentials() std::vector<uint8_t> bBytes(keyLength); if (!rs.hasData(keyLength)) - throw std::runtime_error("failed to generate DH private key"); + throw std::runtime_error("Failed to generate DH private key"); rs.readBytes(bBytes.data(), bBytes.size()); nettle_mpz_set_str_256_u(b, bBytes.size(), bBytes.data()); mpz_powm(k, A, b, p); @@ -132,13 +132,13 @@ void CSecurityDH::writeCredentials() uint8_t buf[128]; if (!rs.hasData(128)) - throw std::runtime_error("failed to generate random padding"); + throw std::runtime_error("Failed to generate random padding"); rs.readBytes(buf, 128); if (username.size() >= 64) - throw std::out_of_range("username is too long"); + throw std::out_of_range("Username is too long"); memcpy(buf, username.c_str(), username.size() + 1); if (password.size() >= 64) - throw std::out_of_range("password is too long"); + throw std::out_of_range("Password is too long"); memcpy(buf + 64, password.c_str(), password.size() + 1); aes128_encrypt(&aesCtx, 128, buf, buf); |