2003-08-14  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Creating a Signature): Change type of member class
	to unsigned int.

gpgme/
2003-08-14  Marcus Brinkmann  <marcus@g10code.de>

	* 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  <marcus@g10code.de>

	* gpg/t-sign.c (check_result): Change output format for signature
	class to unsigned int.
This commit is contained in:
Marcus Brinkmann 2003-08-14 17:32:18 +00:00
parent 52ee4708a0
commit 694e2a8041
8 changed files with 42 additions and 3 deletions

5
NEWS
View File

@ -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 * 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. 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: * Interface changes relative to the 0.4.3 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gpgme_get_key CHANGED: Fails correctly if key ID not unique. gpgme_get_key CHANGED: Fails correctly if key ID not unique.
gpgme_key_t EXTENDED: New field can_authenticate. gpgme_key_t EXTENDED: New field can_authenticate.
gpgme_subkey_t EXTENDED: New field can_authenticate. gpgme_subkey_t EXTENDED: New field can_authenticate.
gpgme_new_signature_t CHANGED: New type for class field.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -1,3 +1,8 @@
2003-08-14 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Creating a Signature): Change type of member class
to unsigned int.
2003-08-04 Marcus Brinkmann <marcus@g10code.de> 2003-08-04 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Verify): Get error code from SIG->status in the code * gpgme.texi (Verify): Get error code from SIG->status in the code

View File

@ -3937,7 +3937,7 @@ The public key algorithm used to create this signature.
@item gpgme_hash_algo_t @item gpgme_hash_algo_t
The hash algorithm used to create this signature. The hash algorithm used to create this signature.
@item unsigned long class @item unsigned int class
The signature class of this signature. The signature class of this signature.
@item long int timestamp @item long int timestamp

View File

@ -1,3 +1,10 @@
2003-08-14 Marcus Brinkmann <marcus@g10code.de>
* 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 <marcus@g10code.de> 2003-08-04 Marcus Brinkmann <marcus@g10code.de>
* verify.c (parse_new_sig): Fix status parsing case. * verify.c (parse_new_sig): Fix status parsing case.

View File

@ -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
{ {
struct _gpgme_new_signature *next; struct _gpgme_new_signature *next;
/* The type of the signature. */
gpgme_sig_mode_t type; gpgme_sig_mode_t type;
/* The public key algorithm used to create the signature. */
gpgme_pubkey_algo_t pubkey_algo; gpgme_pubkey_algo_t pubkey_algo;
/* The hash algorithm used to create the signature. */
gpgme_hash_algo_t hash_algo; 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; long int timestamp;
/* The fingerprint of the signature. */
char *fpr; char *fpr;
/* Crypto backend specific signature class. */
unsigned int class;
}; };
typedef struct _gpgme_new_signature *gpgme_new_signature_t; typedef struct _gpgme_new_signature *gpgme_new_signature_t;

View File

@ -144,6 +144,7 @@ parse_sig_created (char *args, gpgme_new_signature_t *sigp)
args = tail; args = tail;
sig->class = strtol (args, &tail, 0); sig->class = strtol (args, &tail, 0);
sig->_obsolete_class = sig->class;
if (errno || args == tail || *tail != ' ') if (errno || args == tail || *tail != ' ')
{ {
/* The crypto backend does not behave. */ /* The crypto backend does not behave. */

View File

@ -1,3 +1,8 @@
2003-08-14 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-sign.c (check_result): Change output format for signature
class to unsigned int.
2003-07-31 Marcus Brinkmann <marcus@g10code.de> 2003-07-31 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-verify.c (check_result): Change type of SUMMARY to * gpg/t-verify.c (check_result): Change type of SUMMARY to

View File

@ -61,7 +61,7 @@ check_result (gpgme_sign_result_t result, gpgme_sig_mode_t type)
} }
if (result->signatures->class != 1) if (result->signatures->class != 1)
{ {
fprintf (stderr, "Wrong signature class reported: %lu\n", fprintf (stderr, "Wrong signature class reported: %u\n",
result->signatures->class); result->signatures->class);
exit (1); exit (1);
} }