mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
parent
5e208460a1
commit
002f51031a
9 changed files with 178 additions and 80 deletions
|
@ -125,10 +125,12 @@ do_encode_raw_pkcs1 (const byte *md, size_t mdlen, unsigned int nbits,
|
|||
|
||||
|
||||
/* SIGN whatever information we have accumulated in CTRL and return
|
||||
the signature S-Expression. */
|
||||
the signature S-expression. LOOKUP is an optional function to
|
||||
provide a way for lower layers to ask for the caching TTL. */
|
||||
int
|
||||
agent_pksign_do (ctrl_t ctrl, const char *desc_text,
|
||||
gcry_sexp_t *signature_sexp, cache_mode_t cache_mode)
|
||||
gcry_sexp_t *signature_sexp,
|
||||
cache_mode_t cache_mode, lookup_ttl_t lookup_ttl)
|
||||
{
|
||||
gcry_sexp_t s_skey = NULL, s_sig = NULL;
|
||||
unsigned char *shadow_info = NULL;
|
||||
|
@ -138,7 +140,8 @@ agent_pksign_do (ctrl_t ctrl, const char *desc_text,
|
|||
return gpg_error (GPG_ERR_NO_SECKEY);
|
||||
|
||||
rc = agent_key_from_file (ctrl, desc_text, ctrl->keygrip,
|
||||
&shadow_info, cache_mode, &s_skey);
|
||||
&shadow_info, cache_mode, lookup_ttl,
|
||||
&s_skey);
|
||||
if (rc)
|
||||
{
|
||||
log_error ("failed to read the secret key\n");
|
||||
|
@ -238,7 +241,7 @@ agent_pksign (ctrl_t ctrl, const char *desc_text,
|
|||
size_t len = 0;
|
||||
int rc = 0;
|
||||
|
||||
rc = agent_pksign_do (ctrl, desc_text, &s_sig, cache_mode);
|
||||
rc = agent_pksign_do (ctrl, desc_text, &s_sig, cache_mode, NULL);
|
||||
if (rc)
|
||||
goto leave;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue