summaryrefslogtreecommitdiff
path: root/vchat-ssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vchat-ssl.c')
-rwxr-xr-xvchat-ssl.c5
1 files changed, 3 insertions, 2 deletions
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 @@
18#include <stdio.h> 18#include <stdio.h>
19#include <stdlib.h> 19#include <stdlib.h>
20#include <string.h> 20#include <string.h>
21#include <assert.h>
21 22
22#include <openssl/err.h> 23#include <openssl/err.h>
23#include <openssl/ssl.h> 24#include <openssl/ssl.h>
@@ -219,7 +220,7 @@ int vc_connect_ssl( BIO **conn, vc_x509store_t *vc_store )
219 int j; 220 int j;
220 assert ( ( fingerprint_len > 1 ) && (fingerprint_len * 3 < TMPSTRSIZE )); 221 assert ( ( fingerprint_len > 1 ) && (fingerprint_len * 3 < TMPSTRSIZE ));
221 char * nf = new_fingerprint; 222 char * nf = new_fingerprint;
222 for (j=0; j<(int)fingerprint_len; j++) { 223 for (j=0; j<(int)fingerprint_len; j++)
223 nf += snprintf(nf, 3, "%02X:", fingerprint_bin[j]); 224 nf += snprintf(nf, 3, "%02X:", fingerprint_bin[j]);
224 assert ( nf > new_fingerprint ); 225 assert ( nf > new_fingerprint );
225 nf[-1] = 0; 226 nf[-1] = 0;
@@ -232,7 +233,7 @@ int vc_connect_ssl( BIO **conn, vc_x509store_t *vc_store )
232 233
233 fingerprint_file = fopen(tilde_expand(getstroption(CF_FINGERPRINT)), "r"); 234 fingerprint_file = fopen(tilde_expand(getstroption(CF_FINGERPRINT)), "r");
234 if (fingerprint_file) { 235 if (fingerprint_file) {
235 int r = fgets(old_fingerprint, TMPSTRSIZE, fingerprint_file); 236 char * r = fgets(old_fingerprint, TMPSTRSIZE, fingerprint_file);
236 fclose(fingerprint_file); 237 fclose(fingerprint_file);
237 238
238 /* verify fingerprint matches stored version */ 239 /* verify fingerprint matches stored version */