- Copyright (C) 1999-2005 Ivo Timmermans <ivo@tinc-vpn.org>,
- 2000-2005 Guus Sliepen <guus@tinc-vpn.org>
+ Copyright (C) 1999-2005 Ivo Timmermans,
+ 2000-2006 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
bin2hex(from->key, key, from->keylength);
key[from->keylength * 2] = '\0';
bin2hex(from->key, key, from->keylength);
key[from->keylength * 2] = '\0';
- 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;
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;