Browse code

Change signedness of hash in x509_get_sha1_hash(), fixes compiler warning.

hash was cast from char * to unsigned char * at the return of the function.
This patch removes the implicit cast by declaring hash as unsigned char * .

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1398585348-7969-1-git-send-email-steffan@karger.me>
URL: http://article.gmane.org/gmane.network.openvpn.devel/8647
Signed-off-by: Gert Doering <gert@greenie.muc.de>

Steffan Karger authored on 2014/04/27 16:55:48
Showing 1 changed files
... ...
@@ -241,7 +241,7 @@ backend_x509_get_serial (openvpn_x509_cert_t *cert, struct gc_arena *gc)
241 241
 unsigned char *
242 242
 x509_get_sha1_hash (X509 *cert, struct gc_arena *gc)
243 243
 {
244
-  char *hash = gc_malloc(SHA_DIGEST_LENGTH, false, gc);
244
+  unsigned char *hash = gc_malloc(SHA_DIGEST_LENGTH, false, gc);
245 245
   memcpy(hash, cert->sha1_hash, SHA_DIGEST_LENGTH);
246 246
   return hash;
247 247
 }