From fae6eebcff9e872b9f2535a6d64db26645ca8dfb Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 14 Aug 2003 17:32:18 +0000 Subject: [PATCH] doc/ 2003-08-14 Marcus Brinkmann * gpgme.texi (Creating a Signature): Change type of member class to unsigned int. gpgme/ 2003-08-14 Marcus Brinkmann * gpgme.h (struct _gpgme_new_signature): Rename member CLASS to _OBSOLETE_CLASS, add member CLASS with type unsigned int. * sign.c (parse_sig_created): Also set SIG->_unused_class for backward compatibility. tests/ 2003-08-14 Marcus Brinkmann * gpg/t-sign.c (check_result): Change output format for signature class to unsigned int. --- trunk/NEWS | 5 +++++ trunk/doc/ChangeLog | 5 +++++ trunk/doc/gpgme.texi | 2 +- trunk/gpgme/ChangeLog | 7 +++++++ trunk/gpgme/gpgme.h | 18 +++++++++++++++++- trunk/gpgme/sign.c | 1 + trunk/tests/ChangeLog | 5 +++++ trunk/tests/gpg/t-sign.c | 2 +- 8 files changed, 42 insertions(+), 3 deletions(-) diff --git a/trunk/NEWS b/trunk/NEWS index bfc4c8b..3e66093 100644 --- a/trunk/NEWS +++ b/trunk/NEWS @@ -10,11 +10,16 @@ Noteworthy changes in version 0.4.3 (unreleased) * gpgme_signature_t's status field is now correctly set to an error with error code GPG_ERR_NO_PUBKEY if public key is not found. + * gpgme_new_signature_t's class field is now an unsigned int, rather + than an unsigned long (the old class field is preserved for + backwards compatibility). + * Interface changes relative to the 0.4.3 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gpgme_get_key CHANGED: Fails correctly if key ID not unique. gpgme_key_t EXTENDED: New field can_authenticate. gpgme_subkey_t EXTENDED: New field can_authenticate. +gpgme_new_signature_t CHANGED: New type for class field. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/trunk/doc/ChangeLog b/trunk/doc/ChangeLog index 65c5f89..ac6f9aa 100644 --- a/trunk/doc/ChangeLog +++ b/trunk/doc/ChangeLog @@ -1,3 +1,8 @@ +2003-08-14 Marcus Brinkmann + + * gpgme.texi (Creating a Signature): Change type of member class + to unsigned int. + 2003-08-04 Marcus Brinkmann * gpgme.texi (Verify): Get error code from SIG->status in the code diff --git a/trunk/doc/gpgme.texi b/trunk/doc/gpgme.texi index 6376552..7dd261d 100644 --- a/trunk/doc/gpgme.texi +++ b/trunk/doc/gpgme.texi @@ -3937,7 +3937,7 @@ The public key algorithm used to create this signature. @item gpgme_hash_algo_t The hash algorithm used to create this signature. -@item unsigned long class +@item unsigned int class The signature class of this signature. @item long int timestamp diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index 35172dd..a69c048 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,3 +1,10 @@ +2003-08-14 Marcus Brinkmann + + * gpgme.h (struct _gpgme_new_signature): Rename member CLASS to + _OBSOLETE_CLASS, add member CLASS with type unsigned int. + * sign.c (parse_sig_created): Also set SIG->_unused_class for + backward compatibility. + 2003-08-04 Marcus Brinkmann * verify.c (parse_new_sig): Fix status parsing case. diff --git a/trunk/gpgme/gpgme.h b/trunk/gpgme/gpgme.h index 2320f90..ed1d25b 100644 --- a/trunk/gpgme/gpgme.h +++ b/trunk/gpgme/gpgme.h @@ -1045,12 +1045,28 @@ gpgme_error_t gpgme_op_decrypt_verify (gpgme_ctx_t ctx, gpgme_data_t cipher, struct _gpgme_new_signature { struct _gpgme_new_signature *next; + + /* The type of the signature. */ gpgme_sig_mode_t type; + + /* The public key algorithm used to create the signature. */ gpgme_pubkey_algo_t pubkey_algo; + + /* The hash algorithm used to create the signature. */ gpgme_hash_algo_t hash_algo; - unsigned long class; + + /* Internal to GPGME, do not use. Must be set to the same value as + CLASS below. */ + unsigned long _obsolete_class; + + /* Signature creation time. */ long int timestamp; + + /* The fingerprint of the signature. */ char *fpr; + + /* Crypto backend specific signature class. */ + unsigned int class; }; typedef struct _gpgme_new_signature *gpgme_new_signature_t; diff --git a/trunk/gpgme/sign.c b/trunk/gpgme/sign.c index 0f2c4ee..089b34c 100644 --- a/trunk/gpgme/sign.c +++ b/trunk/gpgme/sign.c @@ -144,6 +144,7 @@ parse_sig_created (char *args, gpgme_new_signature_t *sigp) args = tail; sig->class = strtol (args, &tail, 0); + sig->_obsolete_class = sig->class; if (errno || args == tail || *tail != ' ') { /* The crypto backend does not behave. */ diff --git a/trunk/tests/ChangeLog b/trunk/tests/ChangeLog index 99a0a45..2be0e0a 100644 --- a/trunk/tests/ChangeLog +++ b/trunk/tests/ChangeLog @@ -1,3 +1,8 @@ +2003-08-14 Marcus Brinkmann + + * gpg/t-sign.c (check_result): Change output format for signature + class to unsigned int. + 2003-07-31 Marcus Brinkmann * gpg/t-verify.c (check_result): Change type of SUMMARY to diff --git a/trunk/tests/gpg/t-sign.c b/trunk/tests/gpg/t-sign.c index 85b94a7..78e590b 100644 --- a/trunk/tests/gpg/t-sign.c +++ b/trunk/tests/gpg/t-sign.c @@ -61,7 +61,7 @@ check_result (gpgme_sign_result_t result, gpgme_sig_mode_t type) } if (result->signatures->class != 1) { - fprintf (stderr, "Wrong signature class reported: %lu\n", + fprintf (stderr, "Wrong signature class reported: %u\n", result->signatures->class); exit (1); } -- 2.26.2