# HG changeset patch # User Mike Becker # Date 1444653414 -7200 # Node ID b85248a8aee27dc6c8b427b59c2d45a2efb68ce2 # Parent 3cfb4670d9e65c94973e0e7cc9f61dedc5585a33 fixed some cases of incompatible types in crypto functions diff -r 3cfb4670d9e6 -r b85248a8aee2 libidav/crypto.c --- a/libidav/crypto.c Mon Oct 12 14:36:16 2015 +0200 +++ b/libidav/crypto.c Mon Oct 12 14:36:54 2015 +0200 @@ -292,8 +292,8 @@ void dav_get_hash(SHA256_CTX *sha256, char *buf) { #ifdef __sun - SHA256Final(buf, sha256); + SHA256Final((unsigned char*)buf, sha256); #else - SHA256_Final(buf, sha256); + SHA256_Final((unsigned char*)buf, sha256); #endif } diff -r 3cfb4670d9e6 -r b85248a8aee2 libidav/resource.c --- a/libidav/resource.c Mon Oct 12 14:36:16 2015 +0200 +++ b/libidav/resource.c Mon Oct 12 14:36:54 2015 +0200 @@ -678,7 +678,7 @@ // get hash char sha[SHA256_DIGEST_LENGTH]; dav_get_hash(&dec->sha256, sha); - hash = util_hexstr(sha, 32); + hash = util_hexstr((unsigned char*)sha, 32); aes_decrypter_close(dec); } @@ -694,7 +694,7 @@ if(res_hash) { size_t len = 0; char *dec_hash = aes_decrypt(res_hash, &len, key); - char *hex_hash = util_hexstr(dec_hash, 32); + char *hex_hash = util_hexstr((unsigned char*)dec_hash, 32); if(strcmp(hash, hex_hash)) { verify_failed = 1; }