X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fopenssl%2Fcipher.c;h=ccd881953d68528e49ebd9212fa93091bddcad96;hb=1fd1d5bd9330e02ab5dc32ad027f654ff2620099;hp=bf999a21f08b355921ddd659267ea1ae56db1ad1;hpb=35d865a6348cd62d2992bb3d353e37471d902889;p=tinc diff --git a/src/openssl/cipher.c b/src/openssl/cipher.c index bf999a21..ccd88195 100644 --- a/src/openssl/cipher.c +++ b/src/openssl/cipher.c @@ -131,7 +131,7 @@ bool cipher_regenerate_key(cipher_t *cipher, bool encrypt) { return false; } -bool cipher_encrypt(cipher_t *cipher, void *indata, size_t inlen, void *outdata, size_t *outlen, bool oneshot) { +bool cipher_encrypt(cipher_t *cipher, const void *indata, size_t inlen, void *outdata, size_t *outlen, bool oneshot) { if(oneshot) { int len = *outlen, pad; if(EVP_EncryptInit_ex(&cipher->ctx, NULL, NULL, NULL, NULL) @@ -152,7 +152,7 @@ bool cipher_encrypt(cipher_t *cipher, void *indata, size_t inlen, void *outdata, return false; } -bool cipher_decrypt(cipher_t *cipher, void *indata, size_t inlen, void *outdata, size_t *outlen, bool oneshot) { +bool cipher_decrypt(cipher_t *cipher, const void *indata, size_t inlen, void *outdata, size_t *outlen, bool oneshot) { if(oneshot) { int len = *outlen, pad; if(EVP_DecryptInit_ex(&cipher->ctx, NULL, NULL, NULL, NULL)