-
- if (params.decrypt) {
-#ifdef GMIME_ATLEAST_26
- /* TODO: GMimePasswordRequestFunc */
- params.cryptoctx = g_mime_gpg_context_new (NULL, "gpg");
-#else
- GMimeSession* session = g_object_new (g_mime_session_get_type(), NULL);
- params.cryptoctx = g_mime_gpg_context_new (session, "gpg");
-#endif
- if (params.cryptoctx) {
- g_mime_gpg_context_set_always_trust ((GMimeGpgContext*) params.cryptoctx, FALSE);
- } else {
- params.decrypt = FALSE;
- fprintf (stderr, "Failed to construct gpg context.\n");
- }
-#ifndef GMIME_ATLEAST_26
- g_object_unref (session);
-#endif