* gpgsm/t-sign.c (main): Also test a normal signature.
* gpg/Makefile (TESTS_ENVIRONMENT): Set GPG_AGENT_INFO empty. * gpg/t-signers.c, gpg/t-sign.c, gpg/t-encrypt-sym.c * gpg/t-encrypt-sign.c, gpg/t-decrypt.c * gpg/t-decrypt-verify.c (main): Changed the GPG_AGENT_INFO check to match the one in ../../gpgme/rungpg.c.
This commit is contained in:
parent
1211f36b15
commit
e6dc9fd6c4
@ -1,3 +1,13 @@
|
||||
2002-06-20 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* gpgsm/t-sign.c (main): Also test a normal signature.
|
||||
|
||||
* gpg/Makefile (TESTS_ENVIRONMENT): Set GPG_AGENT_INFO empty.
|
||||
* gpg/t-signers.c, gpg/t-sign.c, gpg/t-encrypt-sym.c
|
||||
* gpg/t-encrypt-sign.c, gpg/t-decrypt.c
|
||||
* gpg/t-decrypt-verify.c (main): Changed the GPG_AGENT_INFO check to
|
||||
match the one in ../../gpgme/rungpg.c.
|
||||
|
||||
2002-06-12 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* gpgsm/t-keylist.c (doit): Print operation info if available.
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
GPG = @GPG@
|
||||
|
||||
TESTS_ENVIRONMENT = GNUPGHOME=.
|
||||
TESTS_ENVIRONMENT = GNUPGHOME=. GPG_AGENT_INFO=
|
||||
|
||||
TESTS = t-encrypt t-encrypt-sym t-encrypt-sign t-sign t-signers \
|
||||
t-decrypt t-verify t-decrypt-verify t-keylist t-export \
|
||||
|
@ -101,12 +101,15 @@ main (int argc, char **argv)
|
||||
struct passphrase_cb_info_s info;
|
||||
const char *cipher_2_asc = mk_fname ("cipher-2.asc");
|
||||
GpgmeSigStat stat;
|
||||
char *p;
|
||||
|
||||
do
|
||||
{
|
||||
err = gpgme_new (&ctx);
|
||||
fail_if_err (err);
|
||||
if (!getenv("GPG_AGENT_INFO"))
|
||||
|
||||
p = getenv("GPG_AGENT_INFO");
|
||||
if (!(p && strchr (p, ':')))
|
||||
{
|
||||
memset (&info, 0, sizeof info);
|
||||
info.c = ctx;
|
||||
|
@ -103,15 +103,19 @@ main (int argc, char **argv )
|
||||
GpgmeData in, out, pwdata = NULL;
|
||||
struct passphrase_cb_info_s info;
|
||||
const char *cipher_1_asc = mk_fname ("cipher-1.asc");
|
||||
char *p;
|
||||
|
||||
do {
|
||||
err = gpgme_new (&ctx);
|
||||
fail_if_err (err);
|
||||
if ( !getenv("GPG_AGENT_INFO") ) {
|
||||
|
||||
p = getenv("GPG_AGENT_INFO");
|
||||
if (!(p && strchr (p, ':')))
|
||||
{
|
||||
memset ( &info, 0, sizeof info );
|
||||
info.c = ctx;
|
||||
gpgme_set_passphrase_cb ( ctx, passphrase_cb, &info );
|
||||
}
|
||||
}
|
||||
|
||||
err = gpgme_data_new_from_file ( &in, cipher_1_asc, 1 );
|
||||
fail_if_err (err);
|
||||
|
@ -90,6 +90,7 @@ main (int argc, char **argv )
|
||||
GpgmeError err;
|
||||
GpgmeData in, out;
|
||||
GpgmeRecipients rset;
|
||||
char *p;
|
||||
|
||||
err = gpgme_check_engine ();
|
||||
fail_if_err (err);
|
||||
@ -99,7 +100,9 @@ main (int argc, char **argv )
|
||||
err = gpgme_new (&ctx);
|
||||
fail_if_err (err);
|
||||
gpgme_set_armor (ctx, 1);
|
||||
if (!getenv("GPG_AGENT_INFO"))
|
||||
|
||||
p = getenv("GPG_AGENT_INFO");
|
||||
if (!(p && strchr (p, ':')))
|
||||
gpgme_set_passphrase_cb (ctx, passphrase_cb, NULL);
|
||||
|
||||
err = gpgme_data_new_from_mem ( &in, "Hallo Leute\n", 12, 0 );
|
||||
|
@ -76,6 +76,7 @@ main (int argc, char **argv)
|
||||
GpgmeData plain, cipher;
|
||||
const char *text = "Hallo Leute\n";
|
||||
char *text2;
|
||||
char *p;
|
||||
int i;
|
||||
|
||||
err = gpgme_check_engine ();
|
||||
@ -86,8 +87,10 @@ main (int argc, char **argv)
|
||||
err = gpgme_new (&ctx);
|
||||
fail_if_err (err);
|
||||
gpgme_set_armor (ctx, 1);
|
||||
if (!getenv("GPG_AGENT_INFO"))
|
||||
gpgme_set_passphrase_cb (ctx, passphrase_cb, NULL);
|
||||
|
||||
p = getenv("GPG_AGENT_INFO");
|
||||
if (!(p && strchr (p, ':')))
|
||||
gpgme_set_passphrase_cb (ctx, passphrase_cb, NULL);
|
||||
|
||||
err = gpgme_data_new_from_mem (&plain, text, strlen (text), 0);
|
||||
fail_if_err (err);
|
||||
|
@ -87,13 +87,15 @@ main (int argc, char **argv )
|
||||
GpgmeCtx ctx;
|
||||
GpgmeError err;
|
||||
GpgmeData in, out;
|
||||
char *p;
|
||||
|
||||
do {
|
||||
err = gpgme_new (&ctx);
|
||||
fail_if_err (err);
|
||||
if ( !getenv("GPG_AGENT_INFO") ) {
|
||||
gpgme_set_passphrase_cb ( ctx, passphrase_cb, NULL );
|
||||
}
|
||||
|
||||
p = getenv("GPG_AGENT_INFO");
|
||||
if (!(p && strchr (p, ':')))
|
||||
gpgme_set_passphrase_cb ( ctx, passphrase_cb, NULL );
|
||||
|
||||
gpgme_set_textmode (ctx, 1);
|
||||
gpgme_set_armor (ctx, 1);
|
||||
|
@ -86,6 +86,7 @@ main (int argc, char *argv[])
|
||||
GpgmeError err;
|
||||
GpgmeData in, out;
|
||||
GpgmeKey key[2]; /* There are two secret keys in the test area. */
|
||||
char *p;
|
||||
|
||||
err = gpgme_new (&ctx);
|
||||
fail_if_err (err);
|
||||
@ -101,7 +102,9 @@ main (int argc, char *argv[])
|
||||
{
|
||||
err = gpgme_new (&ctx);
|
||||
fail_if_err (err);
|
||||
if (!getenv ("GPG_AGENT_INFO"))
|
||||
|
||||
p = getenv("GPG_AGENT_INFO");
|
||||
if (!(p && strchr (p, ':')))
|
||||
gpgme_set_passphrase_cb (ctx, passphrase_cb, NULL);
|
||||
err = gpgme_signers_add (ctx, key[0]);
|
||||
fail_if_err (err);
|
||||
|
@ -78,7 +78,6 @@ main (int argc, char **argv )
|
||||
err = gpgme_data_new_from_mem ( &in, "Hallo Leute!\n", 13, 0 );
|
||||
fail_if_err (err);
|
||||
|
||||
#if 0
|
||||
/* first a normal signature */
|
||||
err = gpgme_data_new ( &out );
|
||||
fail_if_err (err);
|
||||
@ -91,7 +90,6 @@ main (int argc, char **argv )
|
||||
fputs ("End Result.\n", stdout );
|
||||
gpgme_data_release (out);
|
||||
gpgme_data_rewind (in);
|
||||
#endif
|
||||
|
||||
/* now a detached signature */
|
||||
err = gpgme_data_new ( &out );
|
||||
@ -107,21 +105,6 @@ main (int argc, char **argv )
|
||||
gpgme_data_rewind (in);
|
||||
|
||||
|
||||
#if 0
|
||||
/* And finally a cleartext signature */
|
||||
err = gpgme_data_new ( &out );
|
||||
fail_if_err (err);
|
||||
err = gpgme_op_sign (ctx, in, out, GPGME_SIG_MODE_CLEAR );
|
||||
fail_if_err (err);
|
||||
fflush (NULL);
|
||||
print_op_info (ctx);
|
||||
fputs ("Begin Result:\n", stdout );
|
||||
print_data (out);
|
||||
fputs ("End Result.\n", stdout );
|
||||
gpgme_data_release (out);
|
||||
gpgme_data_rewind (in);
|
||||
#endif
|
||||
|
||||
/* ready */
|
||||
gpgme_data_release (in);
|
||||
gpgme_release (ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user