diff options
author | Werner Koch <[email protected]> | 2001-12-18 17:37:48 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2001-12-18 17:37:48 +0000 |
commit | 56172ce393437be1434d5af11f775c85ed72c1b0 (patch) | |
tree | 73821dd5f67e3f6c7a911d75676aea7041bd6e7a /sm/call-agent.c | |
parent | * gpgsm.c (main): Renamed the default key database to "keyring.kbx". (diff) | |
download | gnupg-56172ce393437be1434d5af11f775c85ed72c1b0.tar.gz gnupg-56172ce393437be1434d5af11f775c85ed72c1b0.zip |
Changes to be used with the new libksba interface.
libgcrypt-1.1.5 is required (cvs or tarball)
Diffstat (limited to 'sm/call-agent.c')
-rw-r--r-- | sm/call-agent.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sm/call-agent.c b/sm/call-agent.c index 5facd6990..6952e22f7 100644 --- a/sm/call-agent.c +++ b/sm/call-agent.c @@ -273,7 +273,7 @@ inq_ciphertext_cb (void *opaque, const char *keyword) the hex string KEYGRIP. */ int gpgsm_agent_pkdecrypt (const char *keygrip, - const char *ciphertext, size_t ciphertextlen, + KsbaConstSexp ciphertext, char **r_buf, size_t *r_buflen ) { int rc; @@ -282,11 +282,16 @@ gpgsm_agent_pkdecrypt (const char *keygrip, struct cipher_parm_s cipher_parm; size_t n, len; char *buf, *endp; + size_t ciphertextlen; if (!keygrip || strlen(keygrip) != 40 || !ciphertext || !r_buf || !r_buflen) return GNUPG_Invalid_Value; *r_buf = NULL; + ciphertextlen = gcry_sexp_canon_len (ciphertext, 0, NULL, NULL); + if (!ciphertextlen) + return GNUPG_Invalid_Value; + rc = start_agent (); if (rc) return rc; |