Mon, 12 Oct 2015 14:36:54 +0200
fixed some cases of incompatible types in crypto functions
libidav/crypto.c | file | annotate | diff | comparison | revisions | |
libidav/resource.c | file | annotate | diff | comparison | revisions |
--- 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 }
--- 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; }