From a944d2092bb8663be21f863bbe27fa475966c9d9 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Tue, 10 Aug 2010 15:56:10 +0200 Subject: Use bits instead of bytes for a private/public key --- src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c') diff --git a/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c b/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c index 7eae5949d..a49a6e5e2 100644 --- a/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c +++ b/src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c @@ -228,10 +228,10 @@ METHOD(public_key_t, encrypt_, bool, return !!encrypted->len; } -METHOD(public_key_t, get_keysize, size_t, +METHOD(public_key_t, get_keysize, int, private_gcrypt_rsa_public_key_t *this) { - return gcry_pk_get_nbits(this->key) / 8; + return gcry_pk_get_nbits(this->key); } METHOD(public_key_t, get_encoding, bool, -- cgit v1.2.3