diff options
author | Werner Koch <[email protected]> | 2017-03-31 18:03:52 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2017-03-31 18:07:20 +0000 |
commit | 8f2671d2cc022af2f564e296bdeb3bb2d2734ef4 (patch) | |
tree | 0a5dfac0bb36cf364e313b000967863e42783793 /g10/skclist.c | |
parent | gpg: Consistent use of preprocessor conditionals. (diff) | |
download | gnupg-8f2671d2cc022af2f564e296bdeb3bb2d2734ef4.tar.gz gnupg-8f2671d2cc022af2f564e296bdeb3bb2d2734ef4.zip |
gpg: Pass CTRL to many more functions.
--
For proper operations as a server we need to avoid global variables.
Thus we need to pass the session state CTRL to most functions. Quite
a lot of changes but fortunately straightforward to do.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/skclist.c')
-rw-r--r-- | g10/skclist.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/g10/skclist.c b/g10/skclist.c index 7a791b302..a016b621f 100644 --- a/g10/skclist.c +++ b/g10/skclist.c @@ -59,14 +59,14 @@ release_sk_list (SK_LIST sk_list) * the string "(insecure!)" or "not secure" or "do not use" * in one of the user ids. */ static int -is_insecure (PKT_public_key *pk) +is_insecure (ctrl_t ctrl, PKT_public_key *pk) { u32 keyid[2]; KBNODE node = NULL, u; int insecure = 0; keyid_from_pk (pk, keyid); - node = get_pubkeyblock (keyid); + node = get_pubkeyblock (ctrl, keyid); for (u = node; u; u = u->next) { if (u->pkt->pkttype == PKT_USER_ID) @@ -150,7 +150,7 @@ build_sk_list (ctrl_t ctrl, { SK_LIST r; - if (random_is_faked () && !is_insecure (pk)) + if (random_is_faked () && !is_insecure (ctrl, pk)) { log_info (_("key is not flagged as insecure - " "can't use it with the faked RNG!\n")); @@ -231,7 +231,7 @@ build_sk_list (ctrl_t ctrl, get_inv_recpsgnr_code (GPG_ERR_WRONG_KEY_USAGE), locusr->d, strlen (locusr->d), -1); } - else if (random_is_faked () && !is_insecure (pk)) + else if (random_is_faked () && !is_insecure (ctrl, pk)) { log_info (_("key is not flagged as insecure - " "can't use it with the faked RNG!\n")); |