* lib/crypto: disable pkcs7 for now

This commit is contained in:
djcb 2012-08-10 09:39:24 +03:00
parent 5fd9d79075
commit 1c058a1b9d
2 changed files with 19 additions and 19 deletions

View File

@ -125,23 +125,23 @@ get_gpg_crypto_context (MuMsgOptions opts, GError **err)
return cctx;
}
static GMimeCryptoContext*
get_pkcs7_crypto_context (MuMsgOptions opts, GError **err)
{
GMimeCryptoContext *cctx;
/* static GMimeCryptoContext* */
/* get_pkcs7_crypto_context (MuMsgOptions opts, GError **err) */
/* { */
/* GMimeCryptoContext *cctx; */
cctx = g_mime_pkcs7_context_new (password_requester);
if (!cctx) {
mu_util_g_set_error (err, MU_ERROR,
"failed to get PKCS7 crypto context");
return NULL;
}
/* cctx = g_mime_pkcs7_context_new (password_requester); */
/* if (!cctx) { */
/* mu_util_g_set_error (err, MU_ERROR, */
/* "failed to get PKCS7 crypto context"); */
/* return NULL; */
/* } */
g_mime_pkcs7_context_set_always_trust
(GMIME_PKCS7_CONTEXT(cctx), FALSE);
/* g_mime_pkcs7_context_set_always_trust */
/* (GMIME_PKCS7_CONTEXT(cctx), FALSE); */
return cctx;
}
/* return cctx; */
/* } */
@ -152,10 +152,10 @@ get_crypto_context (MuMsgOptions opts, MuMsgPartPasswordFunc password_func,
CallbackData *cbdata;
GMimeCryptoContext *cctx;
if (opts & MU_MSG_OPTION_USE_PKCS7)
cctx = get_pkcs7_crypto_context (opts, err);
else
cctx = get_gpg_crypto_context (opts, err);
/* if (opts & MU_MSG_OPTION_USE_PKCS7) */
/* cctx = get_pkcs7_crypto_context (opts, err); */
/* else */
cctx = get_gpg_crypto_context (opts, err);
/* use gobject to pass data to the callback func */
cbdata = g_new0 (CallbackData, 1);

View File

@ -46,7 +46,7 @@ enum _MuMsgOptions {
MU_MSG_OPTION_VERIFY = 1 << 4,
MU_MSG_OPTION_AUTO_RETRIEVE = 1 << 5,
MU_MSG_OPTION_USE_AGENT = 1 << 6,
MU_MSG_OPTION_USE_PKCS7 = 1 << 7, /* gpg is the default */
/* MU_MSG_OPTION_USE_PKCS7 = 1 << 7, /\* gpg is the default *\/ */
MU_MSG_OPTION_DECRYPT = 1 << 8,