]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
gcrypt: Initialize variables when en-/decrypting with RSA to avoid warnings
authorTobias Brunner <tobias@strongswan.org>
Thu, 21 Apr 2022 13:40:12 +0000 (15:40 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 22 Apr 2022 07:49:37 +0000 (09:49 +0200)
src/libstrongswan/plugins/gcrypt/gcrypt_rsa_private_key.c
src/libstrongswan/plugins/gcrypt/gcrypt_rsa_public_key.c

index 5ef7daf61011ce790810df43c62cc544be756a88..c9526cac87c5aee3b1c5a33609144a12402fc2b5 100644 (file)
@@ -281,8 +281,8 @@ METHOD(private_key_t, decrypt, bool,
        void *params, chunk_t encrypted, chunk_t *plain)
 {
        gcry_error_t err;
-       gcry_sexp_t in, out;
-       chunk_t label = chunk_empty, decrypted;
+       gcry_sexp_t in, out = NULL;
+       chunk_t label = chunk_empty, decrypted = chunk_empty;
        u_char *sexp;
 
        switch (scheme)
index 2200a21187bfc26f61f17b19f76eb15220c37767..61e8514987fe6e391896b48afd75305240e43b97 100644 (file)
@@ -240,7 +240,7 @@ METHOD(public_key_t, encrypt_, bool,
        void *params, chunk_t plain, chunk_t *encrypted)
 {
        gcry_error_t err;
-       gcry_sexp_t in, out;
+       gcry_sexp_t in, out = NULL;
        chunk_t label = chunk_empty;
        u_char *sexp;