summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2016-04-15 16:39:41 +0200
committerDirk Engling <erdgeist@erdgeist.org>2016-04-15 16:39:41 +0200
commita5ec5af96fc0e91ddc86087b4c8c73774c2320e4 (patch)
treec21d276ddd8a89d2be28a8b9d4b079a0af5f2cea
parent8eeac2d7d208a8940bf917a4c4d8fcf27a167c9c (diff)
Reformat fingerprint display for better readability
-rwxr-xr-xvchat-ssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vchat-ssl.c b/vchat-ssl.c
index b052d84..2d8c970 100755
--- a/vchat-ssl.c
+++ b/vchat-ssl.c
@@ -223,7 +223,7 @@ int vc_connect_ssl( BIO **conn, vc_x509store_t *vc_store )
223 fp += sprintf(fp, "%02X:", fingerprint_bin[j]); 223 fp += sprintf(fp, "%02X:", fingerprint_bin[j]);
224 assert ( fp > fingerprint ); 224 assert ( fp > fingerprint );
225 fp[-1] = 0; 225 fp[-1] = 0;
226 snprintf(tmpstr, TMPSTRSIZE, "[SSL FINGERPRINT ] from server: %s", fingerprint); 226 snprintf(tmpstr, TMPSTRSIZE, "[SSL FINGERPRINT ] %s (from server)", fingerprint);
227 writecf(FS_SERV, tmpstr); 227 writecf(FS_SERV, tmpstr);
228 228
229 /* we don't need the peercert anymore */ 229 /* we don't need the peercert anymore */
@@ -250,7 +250,7 @@ int vc_connect_ssl( BIO **conn, vc_x509store_t *vc_store )
250 return 0; 250 return 0;
251 } 251 }
252 252
253 snprintf(tmpstr, TMPSTRSIZE, "[SSL FINGERPRINT ] from %s: %s", getstroption(CF_FINGERPRINT), r ? old_fingerprint : "<FILE READ ERROR>" ); 253 snprintf(tmpstr, TMPSTRSIZE, "[SSL FINGERPRINT ] %s (from %s)", r ? old_fingerprint : "<FILE READ ERROR>", getstroption(CF_FINGERPRINT));
254 writecf(FS_ERR, tmpstr); 254 writecf(FS_ERR, tmpstr);
255 writecf(FS_ERR, "[SSL CONNECT ERROR] Fingerprint mismatch! Server cert updated?"); 255 writecf(FS_ERR, "[SSL CONNECT ERROR] Fingerprint mismatch! Server cert updated?");
256 return 1; 256 return 1;