X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=gcrypt.c;h=f9a849067f3ef1084b36e36ccef72cf1826a12a9;hb=HEAD;hp=763fa6de3252d2f5f188fc3f447f2029d0f5775a;hpb=81bc7110ff6a4c2d002618b94fcf5aa60cd4cad2;p=paraslash.git diff --git a/gcrypt.c b/gcrypt.c index 763fa6de..b46f8f95 100644 --- a/gcrypt.c +++ b/gcrypt.c @@ -114,7 +114,6 @@ void crypt_shutdown(void) struct asymmetric_key { gcry_sexp_t sexp; - int num_bytes; }; static const char *gcrypt_strerror(gcry_error_t gret) @@ -457,10 +456,9 @@ int apc_get_pubkey(const char *key_file, struct asymmetric_key **result) } PARA_INFO_LOG("successfully read %u bit ssh public key\n", bits); key = alloc(sizeof(*key)); - key->num_bytes = ret; key->sexp = sexp; *result = key; - ret = bits; + ret = bits / 8; release_n: gcry_mpi_release(n); release_e: @@ -564,8 +562,6 @@ int apc_pub_encrypt(struct asymmetric_key *pub, unsigned char *inbuf, size_t nbytes; int ret; - PARA_INFO_LOG("encrypting %u byte input with %d-byte key\n", len, pub->num_bytes); - /* get pub key */ pub_key = gcry_sexp_find_token(pub->sexp, "public-key", 0); if (!pub_key)