aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins/gcrypt/gcrypt_crypter.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2012-07-06 16:57:17 +0200
committerMartin Willi <martin@revosec.ch>2012-07-16 14:53:38 +0200
commitce73fc19dbc36d089e595e452356deccd8afcd6f (patch)
treeba7f244b7e566bd86d3e87e6992d831203322445 /src/libstrongswan/plugins/gcrypt/gcrypt_crypter.c
parent3b96189a2afa4949e1d9cdf7c9fa8244d8d817f0 (diff)
downloadstrongswan-ce73fc19dbc36d089e595e452356deccd8afcd6f.tar.bz2
strongswan-ce73fc19dbc36d089e595e452356deccd8afcd6f.tar.xz
Add a return value to crypter_t.set_key()
Diffstat (limited to 'src/libstrongswan/plugins/gcrypt/gcrypt_crypter.c')
-rw-r--r--src/libstrongswan/plugins/gcrypt/gcrypt_crypter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstrongswan/plugins/gcrypt/gcrypt_crypter.c b/src/libstrongswan/plugins/gcrypt/gcrypt_crypter.c
index 3627c5064..0b5dc0365 100644
--- a/src/libstrongswan/plugins/gcrypt/gcrypt_crypter.c
+++ b/src/libstrongswan/plugins/gcrypt/gcrypt_crypter.c
@@ -141,7 +141,7 @@ METHOD(crypter_t, get_key_size, size_t,
return len;
}
-METHOD(crypter_t, set_key, void,
+METHOD(crypter_t, set_key, bool,
private_gcrypt_crypter_t *this, chunk_t key)
{
if (this->ctr_mode)
@@ -151,7 +151,7 @@ METHOD(crypter_t, set_key, void,
sizeof(this->ctr.nonce));
key.len -= sizeof(this->ctr.nonce);
}
- gcry_cipher_setkey(this->h, key.ptr, key.len);
+ return gcry_cipher_setkey(this->h, key.ptr, key.len) == 0;
}
METHOD(crypter_t, destroy, void,