mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 10:40:28 +09:00
Fixed building with Gcrypt and arith with void*
This commit is contained in:
@@ -263,11 +263,11 @@ static int des3_1_set_key(struct crypto_struct *cipher, void *key, void *IV) {
|
||||
SAFE_FREE(cipher->key);
|
||||
return -1;
|
||||
}
|
||||
if (gcry_cipher_setkey(cipher->key[1], key + 8, 8)) {
|
||||
if (gcry_cipher_setkey(cipher->key[1], (unsigned char *)key + 8, 8)) {
|
||||
SAFE_FREE(cipher->key);
|
||||
return -1;
|
||||
}
|
||||
if (gcry_cipher_setiv(cipher->key[1], IV + 8, 8)) {
|
||||
if (gcry_cipher_setiv(cipher->key[1], (unsigned char *)IV + 8, 8)) {
|
||||
SAFE_FREE(cipher->key);
|
||||
return -1;
|
||||
}
|
||||
@@ -277,11 +277,11 @@ static int des3_1_set_key(struct crypto_struct *cipher, void *key, void *IV) {
|
||||
SAFE_FREE(cipher->key);
|
||||
return -1;
|
||||
}
|
||||
if (gcry_cipher_setkey(cipher->key[2], key + 16, 8)) {
|
||||
if (gcry_cipher_setkey(cipher->key[2], (unsigned char *)key + 16, 8)) {
|
||||
SAFE_FREE(cipher->key);
|
||||
return -1;
|
||||
}
|
||||
if (gcry_cipher_setiv(cipher->key[2], IV + 16, 8)) {
|
||||
if (gcry_cipher_setiv(cipher->key[2], (unsigned char *)IV + 16, 8)) {
|
||||
SAFE_FREE(cipher->key);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user