X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol_key.c;h=591bb66026d024b8a3e7b017496286563cca116e;hp=e393dd64a945216ce28a36b2dbe88661e9678e18;hb=af95368c0f30955f0e13b587d5d6d4989fd5a83e;hpb=fb1cda2ca4ca74a85e88c39c11b97340e6495a08 diff --git a/src/protocol_key.c b/src/protocol_key.c index e393dd64..591bb660 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -262,7 +262,7 @@ bool ans_key_h(connection_t *c) from->compression = compression; if(from->cipher) - if(!EVP_EncryptInit_ex(&from->packet_ctx, from->cipher, NULL, from->key, from->key + from->cipher->key_len)) { + if(!EVP_EncryptInit_ex(&from->packet_ctx, from->cipher, NULL, (unsigned char *)from->key, (unsigned char *)from->key + from->cipher->key_len)) { logger(LOG_ERR, _("Error during initialisation of key from %s (%s): %s"), from->name, from->hostname, ERR_error_string(ERR_get_error(), NULL)); return false;