changeset 2198:1591518a33b9

Minor change of the prototype for fingerprint_to_hex()
author Mikael Berthe <mikael@lilotux.net>
date Sun, 11 Oct 2015 17:19:15 +0200
parents 189abf03ef24
children 527ba1c1873e
files mcabber/mcabber/utils.c mcabber/mcabber/utils.h mcabber/mcabber/xmpp.c
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/mcabber/utils.c	Sun Oct 11 17:17:35 2015 +0200
+++ b/mcabber/mcabber/utils.c	Sun Oct 11 17:19:15 2015 +0200
@@ -155,9 +155,10 @@
   return g_strdup(fname);
 }
 
-void fingerprint_to_hex(const unsigned char *fpr, char hex[48])
+void fingerprint_to_hex(const char *fprstr, char hex[48])
 {
   int i;
+  const unsigned char *fpr = (const unsigned char *)fprstr;
   char *p;
 
   hex[0] = 0;
--- a/mcabber/mcabber/utils.h	Sun Oct 11 17:17:35 2015 +0200
+++ b/mcabber/mcabber/utils.h	Sun Oct 11 17:19:15 2015 +0200
@@ -21,7 +21,7 @@
                   const char *resource);
 gboolean jid_equal(const char *jid1, const char *jid2);
 
-void fingerprint_to_hex(const unsigned char *fpr, char hex[48]);
+void fingerprint_to_hex(const char *fpr, char hex[48]);
 gboolean hex_to_fingerprint(const char *hex, char fpr[17]);
 
 void ut_init_debug(void);
--- a/mcabber/mcabber/xmpp.c	Sun Oct 11 17:17:35 2015 +0200
+++ b/mcabber/mcabber/xmpp.c	Sun Oct 11 17:19:15 2015 +0200
@@ -715,8 +715,7 @@
     break;
   case LM_SSL_STATUS_CERT_FINGERPRINT_MISMATCH: {
       char fpr[49] = {0};
-      fingerprint_to_hex((const unsigned char*)lm_ssl_get_fingerprint(ssl),
-                         fpr);
+      fingerprint_to_hex(lm_ssl_get_fingerprint(ssl), fpr);
       scr_LogPrint(LPRINT_LOGNORM,
                 "Certificate fingerprint does not match expected fingerprint!");
       scr_LogPrint(LPRINT_LOGNORM, "Remote fingerprint: %s", fpr);