* engine-gpgsm.c (gpgsm_export_ext): Properly insert a space

beween patterns.

* gpgsm/t-export.c (main): Also check exporting 2 certificates.
This commit is contained in:
Werner Koch 2004-03-03 15:15:41 +00:00
parent d988a1820c
commit e65396c735
5 changed files with 44 additions and 5 deletions

View File

@ -1,3 +1,12 @@
2004-03-03 Werner Koch <wk@gnupg.org>
* engine-gpgsm.c (gpgsm_export_ext): Properly insert a space
beween patterns.
2004-02-18 Werner Koch <wk@gnupg.org>
* gpgme-config.in: Ignore setting of --prefix.
2004-02-25 Marcus Brinkmann <marcus@g10code.de>
* rungpg.c (gpg_cancel): New function.

View File

@ -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';

View File

@ -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"
;;

View File

@ -1,3 +1,7 @@
2004-03-03 Werner Koch <wk@gnupg.org>
* gpgsm/t-export.c (main): Also check exporting 2 certificates.
2004-02-17 Werner Koch <wk@gnupg.org>
* gpgsm/t-import.c (check_result): gpgsm does now return info in

View File

@ -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,12 @@ 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);
gpgme_set_armor (ctx, 1);
err = gpgme_op_export_ext (ctx, pattern, 0, out);
err = gpgme_op_export_ext (ctx, pattern1, 0, out);
fail_if_err (err);
fflush (NULL);
@ -60,6 +64,21 @@ main (int argc, char *argv[])
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);
fputs ("Begin Result:\n", stdout);
print_data (out);
fputs ("End Result.\n", stdout);
gpgme_data_release (out);
gpgme_release (ctx);
return 0;