mirror of https://github.com/djcb/mu.git
* lib/crypto: disable pkcs7 for now
This commit is contained in:
parent
5fd9d79075
commit
1c058a1b9d
|
@ -125,23 +125,23 @@ get_gpg_crypto_context (MuMsgOptions opts, GError **err)
|
||||||
return cctx;
|
return cctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GMimeCryptoContext*
|
/* static GMimeCryptoContext* */
|
||||||
get_pkcs7_crypto_context (MuMsgOptions opts, GError **err)
|
/* get_pkcs7_crypto_context (MuMsgOptions opts, GError **err) */
|
||||||
{
|
/* { */
|
||||||
GMimeCryptoContext *cctx;
|
/* GMimeCryptoContext *cctx; */
|
||||||
|
|
||||||
cctx = g_mime_pkcs7_context_new (password_requester);
|
/* cctx = g_mime_pkcs7_context_new (password_requester); */
|
||||||
if (!cctx) {
|
/* if (!cctx) { */
|
||||||
mu_util_g_set_error (err, MU_ERROR,
|
/* mu_util_g_set_error (err, MU_ERROR, */
|
||||||
"failed to get PKCS7 crypto context");
|
/* "failed to get PKCS7 crypto context"); */
|
||||||
return NULL;
|
/* return NULL; */
|
||||||
}
|
/* } */
|
||||||
|
|
||||||
g_mime_pkcs7_context_set_always_trust
|
/* g_mime_pkcs7_context_set_always_trust */
|
||||||
(GMIME_PKCS7_CONTEXT(cctx), FALSE);
|
/* (GMIME_PKCS7_CONTEXT(cctx), FALSE); */
|
||||||
|
|
||||||
return cctx;
|
/* return cctx; */
|
||||||
}
|
/* } */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -152,10 +152,10 @@ get_crypto_context (MuMsgOptions opts, MuMsgPartPasswordFunc password_func,
|
||||||
CallbackData *cbdata;
|
CallbackData *cbdata;
|
||||||
GMimeCryptoContext *cctx;
|
GMimeCryptoContext *cctx;
|
||||||
|
|
||||||
if (opts & MU_MSG_OPTION_USE_PKCS7)
|
/* if (opts & MU_MSG_OPTION_USE_PKCS7) */
|
||||||
cctx = get_pkcs7_crypto_context (opts, err);
|
/* cctx = get_pkcs7_crypto_context (opts, err); */
|
||||||
else
|
/* else */
|
||||||
cctx = get_gpg_crypto_context (opts, err);
|
cctx = get_gpg_crypto_context (opts, err);
|
||||||
|
|
||||||
/* use gobject to pass data to the callback func */
|
/* use gobject to pass data to the callback func */
|
||||||
cbdata = g_new0 (CallbackData, 1);
|
cbdata = g_new0 (CallbackData, 1);
|
||||||
|
|
|
@ -46,7 +46,7 @@ enum _MuMsgOptions {
|
||||||
MU_MSG_OPTION_VERIFY = 1 << 4,
|
MU_MSG_OPTION_VERIFY = 1 << 4,
|
||||||
MU_MSG_OPTION_AUTO_RETRIEVE = 1 << 5,
|
MU_MSG_OPTION_AUTO_RETRIEVE = 1 << 5,
|
||||||
MU_MSG_OPTION_USE_AGENT = 1 << 6,
|
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,
|
MU_MSG_OPTION_DECRYPT = 1 << 8,
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue