[gmime] code cleanup
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime] code cleanup
- Date: Sat, 11 Mar 2017 19:20:20 +0000 (UTC)
commit b4b92c79fc695581be7f039574c1cd94f17c215d
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date: Sat Mar 11 11:10:51 2017 -0500
code cleanup
tests/test-pgp.c | 2 +-
tests/test-pgpmime.c | 4 ++--
tests/test-pkcs7.c | 2 +-
tests/test-smime.c | 5 ++++-
4 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/tests/test-pgp.c b/tests/test-pgp.c
index 41b89f4..504236c 100644
--- a/tests/test-pgp.c
+++ b/tests/test-pgp.c
@@ -39,7 +39,7 @@ extern int verbose;
#define v(x) if (verbose > 3) x
static gboolean
-request_passwd (GMimeCryptoContext *ctx, const char *user_id, const char *prompt_ctx, gboolean reprompt,
GMimeStream *response, GError **err)
+request_passwd (GMimeCryptoContext *ctx, const char *user_id, const char *prompt, gboolean reprompt,
GMimeStream *response, GError **err)
{
g_mime_stream_write_string (response, "no.secret\n");
diff --git a/tests/test-pgpmime.c b/tests/test-pgpmime.c
index 5c8c329..3ee91bf 100644
--- a/tests/test-pgpmime.c
+++ b/tests/test-pgpmime.c
@@ -41,7 +41,7 @@ extern int verbose;
#define v(x) if (verbose > 3) x
static gboolean
-request_passwd (GMimeCryptoContext *ctx, const char *user_id, const char *prompt_ctx, gboolean reprompt,
GMimeStream *response, GError **err)
+request_passwd (GMimeCryptoContext *ctx, const char *user_id, const char *prompt, gboolean reprompt,
GMimeStream *response, GError **err)
{
g_mime_stream_write_string (response, "no.secret\n");
@@ -491,7 +491,7 @@ int main (int argc, char *argv[])
testsuite_check_failed ("multipart/signed failed: %s", ex->message);
} finally;
-#if GPGME_VERSION_NUMBER >= 0x010200
+#if GPGME_VERSION_NUMBER >= 0x010000
testsuite_check ("multipart/encrypted");
try {
create_encrypted_message (ctx, FALSE, &cleartext, &stream);
diff --git a/tests/test-pkcs7.c b/tests/test-pkcs7.c
index eb63cbd..0bc1d1d 100644
--- a/tests/test-pkcs7.c
+++ b/tests/test-pkcs7.c
@@ -44,7 +44,7 @@ extern int verbose;
#if 0
static gboolean
-request_passwd (GMimeCryptoContext *ctx, const char *user_id, const char *prompt_ctx, gboolean reprompt,
GMimeStream *response, GError **err)
+request_passwd (GMimeCryptoContext *ctx, const char *user_id, const char *prompt, gboolean reprompt,
GMimeStream *response, GError **err)
{
g_mime_stream_write_string (response, "no.secret\n");
diff --git a/tests/test-smime.c b/tests/test-smime.c
index 8dd191c..9b01625 100644
--- a/tests/test-smime.c
+++ b/tests/test-smime.c
@@ -44,7 +44,7 @@ extern int verbose;
#if 0
static gboolean
-request_passwd (GMimeCryptoContext *ctx, const char *user_id, const char *prompt_ctx, gboolean reprompt,
GMimeStream *response, GError **err)
+request_passwd (GMimeCryptoContext *ctx, const char *user_id, const char *prompt, gboolean reprompt,
GMimeStream *response, GError **err)
{
g_mime_stream_write_string (response, "no.secret\n");
@@ -79,6 +79,7 @@ print_verify_results (GMimeSignatureList *signatures)
status = get_sig_status (signatures);
+ fputs ("Overall status: ", stdout);
if ((status & GMIME_SIGNATURE_STATUS_RED) != 0)
fputs ("BAD\n", stdout);
else if ((status & GMIME_SIGNATURE_STATUS_GREEN) != 0)
@@ -140,6 +141,8 @@ print_verify_results (GMimeSignatureList *signatures)
fputs ("Key Expired, ", stdout);
if (sig->status & GMIME_SIGNATURE_STATUS_KEY_REVOKED)
fputs ("Key Revoked", stdout);
+ if ((sig->status & ~(GMIME_SIGNATURE_STATUS_GREEN | GMIME_SIGNATURE_STATUS_RED)) == 0)
+ fputs ("None", stdout);
fputc ('\n', stdout);
if (i + 1 < count)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]