From fa05d4cd2867e856311330f5e647819e7a1312a3 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Fri, 15 Apr 2016 13:34:56 +0200 Subject: More fixes to fingerprint checker code --- vchat-ssl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vchat-ssl.c') diff --git a/vchat-ssl.c b/vchat-ssl.c index 6699243..e584f6c 100755 --- a/vchat-ssl.c +++ b/vchat-ssl.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -219,7 +220,7 @@ int vc_connect_ssl( BIO **conn, vc_x509store_t *vc_store ) int j; assert ( ( fingerprint_len > 1 ) && (fingerprint_len * 3 < TMPSTRSIZE )); char * nf = new_fingerprint; - for (j=0; j<(int)fingerprint_len; j++) { + for (j=0; j<(int)fingerprint_len; j++) nf += snprintf(nf, 3, "%02X:", fingerprint_bin[j]); assert ( nf > new_fingerprint ); nf[-1] = 0; @@ -232,7 +233,7 @@ int vc_connect_ssl( BIO **conn, vc_x509store_t *vc_store ) fingerprint_file = fopen(tilde_expand(getstroption(CF_FINGERPRINT)), "r"); if (fingerprint_file) { - int r = fgets(old_fingerprint, TMPSTRSIZE, fingerprint_file); + char * r = fgets(old_fingerprint, TMPSTRSIZE, fingerprint_file); fclose(fingerprint_file); /* verify fingerprint matches stored version */ -- cgit v1.2.3