From: Werner Koch Date: Wed, 3 Mar 2004 15:15:41 +0000 (+0000) Subject: * engine-gpgsm.c (gpgsm_export_ext): Properly insert a space X-Git-Tag: gpgme-1.2.0@1385~477 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=71b4406323227a81e2cdf62b26ffcae4f7c80452;p=gpgme.git * engine-gpgsm.c (gpgsm_export_ext): Properly insert a space beween patterns. * gpgsm/t-export.c (main): Also check exporting 2 certificates. --- diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index e3eb8da..f027885 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/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/trunk/gpgme/engine-gpgsm.c b/trunk/gpgme/engine-gpgsm.c index f2e5151..1101131 100644 --- a/trunk/gpgme/engine-gpgsm.c +++ b/trunk/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/trunk/gpgme/gpgme-config.in b/trunk/gpgme/gpgme-config.in index b21013e..270f965 100644 --- a/trunk/gpgme/gpgme-config.in +++ b/trunk/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/trunk/tests/ChangeLog b/trunk/tests/ChangeLog index e80cf7b..ff9a9c7 100644 --- a/trunk/tests/ChangeLog +++ b/trunk/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/trunk/tests/gpgsm/t-export.c b/trunk/tests/gpgsm/t-export.c index f876de7..9139f8c 100644 --- a/trunk/tests/gpgsm/t-export.c +++ b/trunk/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;