[gmime] Simplify gpgme -> gmime hash_algo conversion logic



commit d05ec2c37414cbf20bc425bbcf0571f8d8f01b82
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Fri Mar 10 09:19:02 2017 -0500

    Simplify gpgme -> gmime hash_algo conversion logic

 gmime/gmime-gpg-context.c   |    2 +-
 gmime/gmime-pkcs7-context.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gmime/gmime-gpg-context.c b/gmime/gmime-gpg-context.c
index 7a91053..60a0794 100644
--- a/gmime/gmime-gpg-context.c
+++ b/gmime/gmime-gpg-context.c
@@ -354,7 +354,7 @@ gpg_sign (GMimeCryptoContext *context, gboolean detach, const char *userid, GMim
        /* return the digest algorithm used for signing */
        result = gpgme_op_sign_result (gpg->ctx);
        
-       return gpg_digest_id (context, gpgme_hash_algo_name (result->signatures->hash_algo));
+       return (GMimeDigestAlgo) result->signatures->hash_algo;
 #else
        g_set_error (err, GMIME_ERROR, GMIME_ERROR_NOT_SUPPORTED, _("PGP support is not enabled in this 
build"));
        
diff --git a/gmime/gmime-pkcs7-context.c b/gmime/gmime-pkcs7-context.c
index 67f2cf5..6350dda 100644
--- a/gmime/gmime-pkcs7-context.c
+++ b/gmime/gmime-pkcs7-context.c
@@ -436,7 +436,7 @@ pkcs7_sign (GMimeCryptoContext *context, gboolean detach, const char *userid, GM
        /* return the digest algorithm used for signing */
        result = gpgme_op_sign_result (pkcs7->ctx);
        
-       return pkcs7_digest_id (context, gpgme_hash_algo_name (result->signatures->hash_algo));
+       return (GMimeDigestAlgo) result->signatures->hash_algo;
 #else
        g_set_error (err, GMIME_ERROR, GMIME_ERROR_NOT_SUPPORTED, _("S/MIME support is not enabled in this 
build"));
        


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]