From: Steffan Karger Date: Sun, 27 Apr 2014 07:55:48 +0000 (+0200) Subject: Change signedness of hash in x509_get_sha1_hash(), fixes compiler warning. X-Git-Tag: v2.4_alpha1~437 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4309c21d9cde43c777985e373242afa78afefa1;p=thirdparty%2Fopenvpn.git 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 Acked-by: Gert Doering 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 --- diff --git a/src/openvpn/ssl_verify_openssl.c b/src/openvpn/ssl_verify_openssl.c index a9205f315..0f571d9ae 100644 --- a/src/openvpn/ssl_verify_openssl.c +++ b/src/openvpn/ssl_verify_openssl.c @@ -241,7 +241,7 @@ backend_x509_get_serial (openvpn_x509_cert_t *cert, struct gc_arena *gc) unsigned char * x509_get_sha1_hash (X509 *cert, struct gc_arena *gc) { - char *hash = gc_malloc(SHA_DIGEST_LENGTH, false, gc); + unsigned char *hash = gc_malloc(SHA_DIGEST_LENGTH, false, gc); memcpy(hash, cert->sha1_hash, SHA_DIGEST_LENGTH); return hash; }