X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fopenssl%2Fcipher.c;h=2481a5206c4dfd21d88400650db22d55b6d10aad;hb=07a560eab66b575f382428a956550817697e25e2;hp=bf999a21f08b355921ddd659267ea1ae56db1ad1;hpb=1b8f8918360b40a2749d40355266ed7dedbe41b5;p=tinc diff --git a/src/openssl/cipher.c b/src/openssl/cipher.c index bf999a21..2481a520 100644 --- a/src/openssl/cipher.c +++ b/src/openssl/cipher.c @@ -45,7 +45,7 @@ bool cipher_open_by_name(cipher_t *cipher, const char *name) { if(cipher->cipher) return cipher_open(cipher); - logger(LOG_DEBUG, _("Unknown cipher name '%s'!"), name); + logger(LOG_DEBUG, "Unknown cipher name '%s'!", name); return false; } @@ -55,7 +55,7 @@ bool cipher_open_by_nid(cipher_t *cipher, int nid) { if(cipher->cipher) return cipher_open(cipher); - logger(LOG_DEBUG, _("Unknown cipher nid %d!"), nid); + logger(LOG_DEBUG, "Unknown cipher nid %d!", nid); return false; } @@ -93,7 +93,7 @@ bool cipher_set_key(cipher_t *cipher, void *key, bool encrypt) { if(result) return true; - logger(LOG_ERR, _("Error while setting key: %s"), ERR_error_string(ERR_get_error(), NULL)); + logger(LOG_ERR, "Error while setting key: %s", ERR_error_string(ERR_get_error(), NULL)); return false; } @@ -110,7 +110,7 @@ bool cipher_set_key_from_rsa(cipher_t *cipher, void *key, size_t len, bool encry if(result) return true; - logger(LOG_ERR, _("Error while setting key: %s"), ERR_error_string(ERR_get_error(), NULL)); + logger(LOG_ERR, "Error while setting key: %s", ERR_error_string(ERR_get_error(), NULL)); return false; } @@ -127,11 +127,11 @@ bool cipher_regenerate_key(cipher_t *cipher, bool encrypt) { if(result) return true; - logger(LOG_ERR, _("Error while regenerating key: %s"), ERR_error_string(ERR_get_error(), NULL)); + logger(LOG_ERR, "Error while regenerating key: %s", ERR_error_string(ERR_get_error(), NULL)); 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) @@ -148,11 +148,11 @@ bool cipher_encrypt(cipher_t *cipher, void *indata, size_t inlen, void *outdata, } } - logger(LOG_ERR, _("Error while encrypting: %s"), ERR_error_string(ERR_get_error(), NULL)); + logger(LOG_ERR, "Error while encrypting: %s", ERR_error_string(ERR_get_error(), NULL)); 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) @@ -169,7 +169,7 @@ bool cipher_decrypt(cipher_t *cipher, void *indata, size_t inlen, void *outdata, } } - logger(LOG_ERR, _("Error while encrypting: %s"), ERR_error_string(ERR_get_error(), NULL)); + logger(LOG_ERR, "Error while encrypting: %s", ERR_error_string(ERR_get_error(), NULL)); return false; }