summaryrefslogtreecommitdiff
path: root/receiver.cpp
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2021-01-16 16:49:45 +0100
committerDirk Engling <erdgeist@erdgeist.org>2021-01-16 16:49:45 +0100
commitebac6ef50524919831863c6338903027399abd36 (patch)
tree55515645c4f8587a466a9158f550a8bfcd4089c6 /receiver.cpp
parentbc08d753b4daf3b4412252daf91e557f13582ce0 (diff)
std::hex changes cerr's state, so reset it after hex dumping error codes
Diffstat (limited to 'receiver.cpp')
-rw-r--r--receiver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/receiver.cpp b/receiver.cpp
index 46ab71a..2fa2d8a 100644
--- a/receiver.cpp
+++ b/receiver.cpp
@@ -318,7 +318,7 @@ int main() {
318 ret = mbedtls_pk_decrypt(&pk, packet + 1 + SESSION_ID_LENGTH, len - 1 - SESSION_ID_LENGTH, 318 ret = mbedtls_pk_decrypt(&pk, packet + 1 + SESSION_ID_LENGTH, len - 1 - SESSION_ID_LENGTH,
319 rsa_plain_text, &olen, sizeof(rsa_plain_text), mbedtls_ctr_drbg_random, &ctr_drbg); 319 rsa_plain_text, &olen, sizeof(rsa_plain_text), mbedtls_ctr_drbg_random, &ctr_drbg);
320 if (ret < 0) { 320 if (ret < 0) {
321 std::cerr << "Error: Failed to decrypt key (error " << -ret << ") for session " << std::hex << session_id << std::endl; 321 std::cerr << "Error: Failed to decrypt key (error -" << -ret << " == -" << std::hex << -ret << ") for session " << session_id << std::dec << std::endl;
322 break; 322 break;
323 } 323 }
324 324