Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/utils.c @ 2248:377b6a52b25f
Prepare for loudmouth with sha256 support (>=1.5.3)
author | franky |
---|---|
date | Sat, 13 Feb 2016 11:05:07 +0100 |
parents | 170597f5365b |
children | 5a107c907e71 |
comparison
equal
deleted
inserted
replaced
2247:fe89cdd66446 | 2248:377b6a52b25f |
---|---|
153 return g_strdup_printf("%s%s", homedir, fname+1); | 153 return g_strdup_printf("%s%s", homedir, fname+1); |
154 } | 154 } |
155 return g_strdup(fname); | 155 return g_strdup(fname); |
156 } | 156 } |
157 | 157 |
158 #ifndef LOUDMOUTH_USES_SHA256 | |
158 // fingerprint_to_hex(fprstr, hex, fpr_len) | 159 // fingerprint_to_hex(fprstr, hex, fpr_len) |
159 // Convert the binary fingerprint fprstr (which is fpr_len bytes long) | 160 // Convert the binary fingerprint fprstr (which is fpr_len bytes long) |
160 // to a NULL-terminated hexadecimal string hex. | 161 // to a NULL-terminated hexadecimal string hex. |
161 // The destination array hex should have been preallocated by the caller, | 162 // The destination array hex should have been preallocated by the caller, |
162 // and should be big enough (i.e. >= 3*fpr_len bytes). | 163 // and should be big enough (i.e. >= 3*fpr_len bytes). |
197 return FALSE; | 198 return FALSE; |
198 fpr[i] = (char)g_ascii_strtoull(p, NULL, 16); | 199 fpr[i] = (char)g_ascii_strtoull(p, NULL, 16); |
199 } | 200 } |
200 return TRUE; | 201 return TRUE; |
201 } | 202 } |
203 #endif | |
202 | 204 |
203 static gboolean tracelog_create(void) | 205 static gboolean tracelog_create(void) |
204 { | 206 { |
205 FILE *fp; | 207 FILE *fp; |
206 struct stat buf; | 208 struct stat buf; |