src/pgp_gpg.c
branchfdik_sync
changeset 1690 62610d1dcbca
parent 1689 0579d2132265
     1.1 --- a/src/pgp_gpg.c	Fri Mar 24 12:22:23 2017 +0100
     1.2 +++ b/src/pgp_gpg.c	Fri Mar 24 15:40:17 2017 +0100
     1.3 @@ -255,6 +255,12 @@
     1.4              "gpgme_op_encrypt");
     1.5          assert(gpg.gpgme_op_encrypt);
     1.6  
     1.7 +        gpg.gpgme_op_sign
     1.8 +            = (gpgme_op_verify_t) (intptr_t) dlsym(gpgme,
     1.9 +            "gpgme_op_sign");
    1.10 +        assert(gpg.gpgme_op_sign);
    1.11 +
    1.12 +
    1.13          gpg.gpgme_op_verify_result
    1.14              = (gpgme_op_verify_result_t) (intptr_t) dlsym(gpgme,
    1.15              "gpgme_op_verify_result");
    1.16 @@ -1065,8 +1071,7 @@
    1.17      gpgme_data_t plain, detached_sig;
    1.18      gpgme_key_t *rcpt;
    1.19      gpgme_sig_mode_t sig_mode = GPGME_SIG_MODE_DETACH;
    1.20 -    const stringlist_t *_keylist;
    1.21 -    int i, j;
    1.22 +    int j;
    1.23  
    1.24      assert(session);
    1.25      assert(keylist);
    1.26 @@ -1114,7 +1119,7 @@
    1.27      if (!keylist->value)
    1.28          return PEP_KEY_NOT_FOUND;
    1.29          
    1.30 -    gpgme_error = gpg.gpgme_get_key(session->ctx, _keylist->value,
    1.31 +    gpgme_error = gpg.gpgme_get_key(session->ctx, keylist->value,
    1.32          &rcpt[0], 0);
    1.33          
    1.34      gpgme_error = _GPGERR(gpgme_error);
    1.35 @@ -1152,8 +1157,6 @@
    1.36              gpg.gpgme_data_release(detached_sig);
    1.37              return PEP_GET_KEY_FAILED;
    1.38      }
    1.39 -
    1.40 -    sig_mode = GPGME_SIG_MODE_NORMAL;
    1.41      
    1.42      gpgme_error = gpg.gpgme_op_sign(session->ctx, plain, detached_sig, sig_mode);
    1.43