summaryrefslogtreecommitdiff
path: root/src/cipher.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2012-09-25 11:55:47 +0000
committerChristian Pointner <equinox@anytun.org>2012-09-25 11:55:47 +0000
commitb85d2641b20159f25a4416d7c1322ec98c04eb0c (patch)
tree42779543116fee6f8963e1b172e767871bd1aed8 /src/cipher.c
parent-Wall cleanup (diff)
added clang support
Diffstat (limited to 'src/cipher.c')
-rw-r--r--src/cipher.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cipher.c b/src/cipher.c
index 8913f64..427ce9a 100644
--- a/src/cipher.c
+++ b/src/cipher.c
@@ -210,8 +210,6 @@ int cipher_aesctr_init(cipher_t* c)
if(!c->params_)
return -2;
- cipher_aesctr_param_t* params = c->params_;
-
#ifndef USE_SSL_CRYPTO
int algo;
switch(c->key_length_) {
@@ -224,6 +222,7 @@ int cipher_aesctr_init(cipher_t* c)
}
}
+ cipher_aesctr_param_t* params = c->params_;
gcry_error_t err = gcry_cipher_open(&params->handle_, algo, GCRY_CIPHER_MODE_CTR, 0);
if(err) {
log_printf(ERROR, "failed to open cipher: %s", gcry_strerror(err));
@@ -240,9 +239,8 @@ void cipher_aesctr_close(cipher_t* c)
return;
if(c->params_) {
- cipher_aesctr_param_t* params = c->params_;
-
#ifndef USE_SSL_CRYPTO
+ cipher_aesctr_param_t* params = c->params_;
if(params->handle_)
gcry_cipher_close(params->handle_);
#endif