Added PKA stuff
This commit is contained in:
parent
1fc25af357
commit
3c1c9ed572
4
NEWS
4
NEWS
@ -21,8 +21,7 @@ Noteworthy changes in version 1.1.1 (unreleased)
|
||||
|
||||
* New status codes GPGME_PKA_TRUST_GOOD and GPGME_PKA_TRUST_BAD.
|
||||
They are analyzed by the verify handlers and made available in the
|
||||
new PKA_TRUST field of the signature result structure.
|
||||
|
||||
new PKA_TRUST and PKA_ADDRESS fields of the signature result structure.
|
||||
|
||||
* Interface changes relative to the 1.1.0 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -32,6 +31,7 @@ gpgme_free NEW
|
||||
GPGME_STATUS_PKA_TRUST_BAD NEW
|
||||
GPGME_STATUS_PKA_TRUST_GOOD NEW
|
||||
gpgme_signature_t EXTENDED: New field pka_trust.
|
||||
gpgme_signature_t EXTENDED: New field pka_address.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@ min_automake_version="1.9.3"
|
||||
|
||||
# Version number: Remember to change it immediately *after* a release.
|
||||
# Make sure to run "svn up" before a "make dist".
|
||||
AC_INIT(gpgme, 1.2.0-cvs, [bug-gpgme@gnupg.org])
|
||||
AC_INIT(gpgme, 1.1.1-cvs, [bug-gpgme@gnupg.org])
|
||||
# LT Version numbers, remember to change them just *before* a release.
|
||||
# (Code changed: REVISION++)
|
||||
# (Interfaces added/removed/changed: CURRENT++, REVISION=0)
|
||||
|
@ -8,11 +8,17 @@
|
||||
* w32-glib-io.c (find_channel): Set channel to unbuffered.
|
||||
(_gpgme_io_select): Fix debug output.
|
||||
|
||||
2005-12-23 Werner Koch <wk@g10code.com>
|
||||
|
||||
* gpgme.h (struct _gpgme_signature): Append field PKA_ADDRESS.
|
||||
* verify.c (release_op_data, _gpgme_verify_status_handler): Set
|
||||
this field.
|
||||
|
||||
2005-12-20 Werner Koch <wk@g10code.com>
|
||||
|
||||
* gpgme.h (gpgme_status_code_t): Added GPGME_STATUS_PKA_TRUST_BAD
|
||||
and GPGME_STATUS_PKA_TRUST_GOOD.
|
||||
(gpgme_signature_t): New field pka_trust.
|
||||
(struct _gpgme_signature): New field pka_trust.
|
||||
* verify.c (_gpgme_verify_status_handler): Set pka_trust.
|
||||
|
||||
2005-12-06 Werner Koch <wk@g10code.com>
|
||||
|
@ -72,7 +72,7 @@ extern "C" {
|
||||
AM_PATH_GPGME macro) check that this header matches the installed
|
||||
library. Warning: Do not edit the next line. configure will do
|
||||
that for you! */
|
||||
#define GPGME_VERSION "1.2.0-cvs"
|
||||
#define GPGME_VERSION "1.1.1-cvs"
|
||||
|
||||
|
||||
|
||||
@ -1334,6 +1334,9 @@ struct _gpgme_signature
|
||||
|
||||
/* The hash algorithm used to create the signature. */
|
||||
gpgme_hash_algo_t hash_algo;
|
||||
|
||||
/* The mailbox from the PKA information or NULL. */
|
||||
char *pka_address;
|
||||
};
|
||||
typedef struct _gpgme_signature *gpgme_signature_t;
|
||||
|
||||
|
@ -64,6 +64,8 @@ release_op_data (void *hook)
|
||||
|
||||
if (sig->fpr)
|
||||
free (sig->fpr);
|
||||
if (sig->pka_address)
|
||||
free (sig->pka_address);
|
||||
free (sig);
|
||||
sig = next;
|
||||
}
|
||||
@ -588,6 +590,7 @@ _gpgme_verify_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
void *hook;
|
||||
op_data_t opd;
|
||||
gpgme_signature_t sig;
|
||||
char *end;
|
||||
|
||||
err = _gpgme_op_data_lookup (ctx, OPDATA_VERIFY, &hook, -1, NULL);
|
||||
opd = hook;
|
||||
@ -654,10 +657,15 @@ _gpgme_verify_status_handler (void *priv, gpgme_status_code_t code, char *args)
|
||||
case GPGME_STATUS_PKA_TRUST_BAD:
|
||||
case GPGME_STATUS_PKA_TRUST_GOOD:
|
||||
opd->only_newsig_seen = 0;
|
||||
if (sig && !sig->pka_trust)
|
||||
/* Check that we only get one of these status codes per
|
||||
signature; if not the crypto backend misbehaves. */
|
||||
if (!sig || sig->pka_trust || sig->pka_address)
|
||||
return gpg_error (GPG_ERR_INV_ENGINE);
|
||||
sig->pka_trust = code == GPGME_STATUS_PKA_TRUST_GOOD? 2 : 1;
|
||||
/* FIXME: We should set the mailbox which is the argument to
|
||||
these status codes into a new field. */
|
||||
end = strchr (args, ' ');
|
||||
if (end)
|
||||
*end = 0;
|
||||
sig->pka_address = strdup (args);
|
||||
break;
|
||||
|
||||
case GPGME_STATUS_ERROR:
|
||||
|
Loading…
Reference in New Issue
Block a user