diff options
Diffstat (limited to '')
-rw-r--r-- | g10/call-dirmngr.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/g10/call-dirmngr.c b/g10/call-dirmngr.c index 17f5fdcf3..21edab639 100644 --- a/g10/call-dirmngr.c +++ b/g10/call-dirmngr.c @@ -1249,72 +1249,6 @@ gpg_dirmngr_dns_cert (ctrl_t ctrl, const char *name, const char *certtype, } -/* Ask the dirmngr for PKA info. On success the retrieved fingerprint - is returned in a malloced buffer at R_FPR and its length is stored - at R_FPRLEN. If an URL is available it is stored as a malloced - string at R_URL. On error all return values are set to NULL/0. */ -gpg_error_t -gpg_dirmngr_get_pka (ctrl_t ctrl, const char *userid, - unsigned char **r_fpr, size_t *r_fprlen, - char **r_url) -{ - gpg_error_t err; - assuan_context_t ctx; - struct dns_cert_parm_s parm; - char *line = NULL; - - memset (&parm, 0, sizeof parm); - if (r_fpr) - *r_fpr = NULL; - if (r_fprlen) - *r_fprlen = 0; - if (r_url) - *r_url = NULL; - - err = open_context (ctrl, &ctx); - if (err) - return err; - - line = es_bsprintf ("DNS_CERT --pka -- %s", userid); - if (!line) - { - err = gpg_error_from_syserror (); - goto leave; - } - if (strlen (line) + 2 >= ASSUAN_LINELENGTH) - { - err = gpg_error (GPG_ERR_TOO_LARGE); - goto leave; - } - - err = assuan_transact (ctx, line, dns_cert_data_cb, &parm, - NULL, NULL, dns_cert_status_cb, &parm); - if (err) - goto leave; - - if (r_fpr && parm.fpr) - { - *r_fpr = parm.fpr; - parm.fpr = NULL; - } - if (r_fprlen) - *r_fprlen = parm.fprlen; - - if (r_url && parm.url) - { - *r_url = parm.url; - parm.url = NULL; - } - - leave: - xfree (parm.fpr); - xfree (parm.url); - xfree (line); - close_context (ctrl, ctx); - return err; -} - - /* Ask the dirmngr to retrieve a key via the Web Key Directory * protocol. If QUICK is set the dirmngr is advised to use a shorter |