From b3304042aafdfa2adf4b332a6629182b12a089e1 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Sat, 1 Oct 2005 02:33:35 +0000 Subject: doc/ 2005-10-01 Marcus Brinkmann * gpgme.texi (Signature Notation Data): New section. (Verify): Added more about the notation data structure. gpgme/ 2005-10-01 Marcus Brinkmann * gpgme.def: Add gpgme_data_set_file_name, gpgme_data_get_file_name, gpgme_sig_notation_clear, gpgme_sig_notation_add and gpgme_sig_notation_get. * libgpgme.vers: Add gpgme_sig_notation_clear, gpgme_sig_notation_add and gpgme_sig_notation_get. * Makefile.am (libgpgme_real_la_SOURCES): Add sig-notation.c. * context.h (struct gpgme_context): New field sig_notations. * gpgme.h (struct _gpgme_sig_notation): New member value_len and critical. (GPGME_SIG_NOTATION_CRITICAL): New symbol. (gpgme_sig_notation_flags_t): New type. (gpgme_sig_notation_add, gpgme_sig_notation_clear, gpgme_sig_notation_get): New prototypes. * ops.h (_gpgme_sig_notation_create, _gpgme_sig_notation_free): New prototypes. * sig-notation.c (_gpgme_sig_notation_free): New file. * verify.c (parse_notation): Use support functions. (release_op_data): Likewise. * rungpg.c (append_args_from_sig_notations): New function. (gpg_encrypt_sign, gpg_sign): Call it. tests/ 2005-10-01 Marcus Brinkmann * gpg/Makefile.am (TESTS): Add t-sig-notation. * gpg/t-sig-notation.c (check_result): New file. * gpg/t-verify.c (check_result): Also check the length of the notation data. * gpg/gpg.conf: New file. --- tests/gpg/t-verify.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests/gpg/t-verify.c') diff --git a/tests/gpg/t-verify.c b/tests/gpg/t-verify.c index 1b63829c..22f04773 100644 --- a/tests/gpg/t-verify.c +++ b/tests/gpg/t-verify.c @@ -136,10 +136,14 @@ check_result (gpgme_verify_result_t result, unsigned int summary, char *fpr, for (i=0; i < DIM(expected_notations); i++) { if ( ((r->name && expected_notations[i].name - && !strcmp (r->name, expected_notations[i].name)) - || (!r->name && !expected_notations[i].name)) + && !strcmp (r->name, expected_notations[i].name) + && r->name_len + == strlen (expected_notations[i].name)) + || (!r->name && !expected_notations[i].name + && r->name_len == 0)) && r->value - && !strcmp (r->value, expected_notations[i].value)) + && !strcmp (r->value, expected_notations[i].value) + && r->value_len == strlen (expected_notations[i].value)) { expected_notations[i].seen++; any++; -- cgit v1.2.3