2002-07-25 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-encrypt-sym.c (main): Change type of I to size_t and rename to LEN. * gpg/t-verify.c (main): Likewise. Submitted by St�phane Corth�sy.
This commit is contained in:
parent
b295bab058
commit
8270052e0f
@ -1,3 +1,10 @@
|
|||||||
|
2002-07-25 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
|
* gpg/t-encrypt-sym.c (main): Change type of I to size_t and
|
||||||
|
rename to LEN.
|
||||||
|
* gpg/t-verify.c (main): Likewise. Submitted by Stéphane
|
||||||
|
Corthésy.
|
||||||
|
|
||||||
2002-07-03 Marcus Brinkmann <marcus@g10code.de>
|
2002-07-03 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
* gpg/t-eventloop.c: New file.
|
* gpg/t-eventloop.c: New file.
|
||||||
|
@ -77,7 +77,7 @@ main (int argc, char **argv)
|
|||||||
const char *text = "Hallo Leute\n";
|
const char *text = "Hallo Leute\n";
|
||||||
char *text2;
|
char *text2;
|
||||||
char *p;
|
char *p;
|
||||||
int i;
|
size_t len;
|
||||||
|
|
||||||
err = gpgme_check_engine ();
|
err = gpgme_check_engine ();
|
||||||
fail_if_err (err);
|
fail_if_err (err);
|
||||||
@ -120,8 +120,8 @@ main (int argc, char **argv)
|
|||||||
print_data (plain);
|
print_data (plain);
|
||||||
fputs ("End Result.\n", stdout);
|
fputs ("End Result.\n", stdout);
|
||||||
|
|
||||||
text2 = gpgme_data_release_and_get_mem (plain, &i);
|
text2 = gpgme_data_release_and_get_mem (plain, &len);
|
||||||
if (strncmp (text, text2, i))
|
if (strncmp (text, text2, len))
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s:%d: Wrong plaintext\n", __FILE__, __LINE__);
|
fprintf (stderr, "%s:%d: Wrong plaintext\n", __FILE__, __LINE__);
|
||||||
exit (1);
|
exit (1);
|
||||||
|
@ -169,7 +169,8 @@ main (int argc, char **argv )
|
|||||||
GpgmeSigStat status;
|
GpgmeSigStat status;
|
||||||
char *nota;
|
char *nota;
|
||||||
int n = 0;
|
int n = 0;
|
||||||
int i, j;
|
size_t len;
|
||||||
|
int j;
|
||||||
|
|
||||||
err = gpgme_new (&ctx);
|
err = gpgme_new (&ctx);
|
||||||
fail_if_err (err);
|
fail_if_err (err);
|
||||||
@ -227,8 +228,8 @@ main (int argc, char **argv )
|
|||||||
err = gpgme_op_verify (ctx, sig, text, &status);
|
err = gpgme_op_verify (ctx, sig, text, &status);
|
||||||
fail_if_err (err);
|
fail_if_err (err);
|
||||||
|
|
||||||
nota = gpgme_data_release_and_get_mem (text, &i);
|
nota = gpgme_data_release_and_get_mem (text, &len);
|
||||||
for (j = 0; j < i; j++)
|
for (j = 0; j < len; j++)
|
||||||
putchar (nota[j]);
|
putchar (nota[j]);
|
||||||
if (strncmp (nota, test_text1, strlen (test_text1)))
|
if (strncmp (nota, test_text1, strlen (test_text1)))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user