From e65396c735f0b032b90cdea9e14c5157bcaaa019 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 3 Mar 2004 15:15:41 +0000 Subject: [PATCH] * engine-gpgsm.c (gpgsm_export_ext): Properly insert a space beween patterns. * gpgsm/t-export.c (main): Also check exporting 2 certificates. --- gpgme/ChangeLog | 9 +++++++++ gpgme/engine-gpgsm.c | 3 ++- gpgme/gpgme-config.in | 6 ++++++ tests/ChangeLog | 4 ++++ tests/gpgsm/t-export.c | 25 ++++++++++++++++++++++--- 5 files changed, 43 insertions(+), 4 deletions(-) diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index e3eb8da..f027885 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,3 +1,12 @@ +2004-03-03 Werner Koch + + * engine-gpgsm.c (gpgsm_export_ext): Properly insert a space + beween patterns. + +2004-02-18 Werner Koch + + * gpgme-config.in: Ignore setting of --prefix. + 2004-02-25 Marcus Brinkmann * rungpg.c (gpg_cancel): New function. diff --git a/gpgme/engine-gpgsm.c b/gpgme/engine-gpgsm.c index f2e5151..1101131 100644 --- a/gpgme/engine-gpgsm.c +++ b/gpgme/engine-gpgsm.c @@ -1106,7 +1106,6 @@ gpgsm_export_ext (void *engine, const char *pattern[], unsigned int reserved, patlet++; } pat++; - /* This will allocate one byte more than necessary. */ length++; } } @@ -1149,6 +1148,8 @@ gpgsm_export_ext (void *engine, const char *pattern[], unsigned int reserved, patlet++; } pattern++; + if (*pattern) + *linep++ = ' '; } } *linep = '\0'; diff --git a/gpgme/gpgme-config.in b/gpgme/gpgme-config.in index b21013e..270f965 100644 --- a/gpgme/gpgme-config.in +++ b/gpgme/gpgme-config.in @@ -61,9 +61,15 @@ while test $# -gt 0; do esac case $1 in + --prefix=*) + # For compatibility reasons with old M4 macros, we ignore + # setting of prefix. + ;; --prefix) output="$output $prefix" ;; + --exec-prefix=*) + ;; --exec-prefix) output="$output $exec_prefix" ;; diff --git a/tests/ChangeLog b/tests/ChangeLog index e80cf7b..ff9a9c7 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2004-03-03 Werner Koch + + * gpgsm/t-export.c (main): Also check exporting 2 certificates. + 2004-02-17 Werner Koch * gpgsm/t-import.c (check_result): gpgsm does now return info in diff --git a/tests/gpgsm/t-export.c b/tests/gpgsm/t-export.c index f876de7..9139f8c 100644 --- a/tests/gpgsm/t-export.c +++ b/tests/gpgsm/t-export.c @@ -39,7 +39,10 @@ main (int argc, char *argv[]) gpgme_ctx_t ctx; gpgme_error_t err; gpgme_data_t out; - const char *pattern[] = { "DFN Top Level Certification Authority", NULL }; + const char *pattern1[] = { "DFN Top Level Certification Authority", NULL }; + const char *pattern2[] = { "3CF405464F66ED4A7DF45BBDD1E4282E33BDB76E", + "DFN Server Certification Authority", + NULL }; init_gpgme (GPGME_PROTOCOL_CMS); @@ -47,11 +50,25 @@ main (int argc, char *argv[]) fail_if_err (err); gpgme_set_protocol (ctx, GPGME_PROTOCOL_CMS); + gpgme_set_armor (ctx, 1); + + /* Check exporting of one certificate. */ err = gpgme_data_new (&out); fail_if_err (err); + err = gpgme_op_export_ext (ctx, pattern1, 0, out); + fail_if_err (err); - gpgme_set_armor (ctx, 1); - err = gpgme_op_export_ext (ctx, pattern, 0, out); + fflush (NULL); + fputs ("Begin Result:\n", stdout); + print_data (out); + fputs ("End Result.\n", stdout); + + gpgme_data_release (out); + + /* Check exporting of 2 certificates. */ + err = gpgme_data_new (&out); + fail_if_err (err); + err = gpgme_op_export_ext (ctx, pattern2, 0, out); fail_if_err (err); fflush (NULL); @@ -60,6 +77,8 @@ main (int argc, char *argv[]) fputs ("End Result.\n", stdout); gpgme_data_release (out); + + gpgme_release (ctx); return 0; -- 2.26.2