]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
gcrypt: Remove pointless state variable.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 2 May 2023 21:10:49 +0000 (23:10 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 15 May 2023 18:06:50 +0000 (20:06 +0200)
The variable is set but then only used for an unimportant log message.
So let's drop the message and the variable.

gcrypt.c

index f9a849067f3ef1084b36e36ccef72cf1826a12a9..b46f8f9555824eb86b7bbf600b4352558ed2db26 100644 (file)
--- 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,7 +456,6 @@ 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 / 8;
@@ -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)