* crypto: update for crypto api changes

This commit is contained in:
djcb
2012-07-27 18:04:49 +03:00
parent 8432156765
commit f1a2e94b1a
4 changed files with 42 additions and 99 deletions

View File

@ -1215,8 +1215,12 @@ cmd_ping (ServerContext *ctx, GSList *args, GError **err)
return print_and_clear_g_error (err);
print_expr ("(:pong \"" PACKAGE_NAME "\" "
":version \"" VERSION "\" "
":doccount %u)", doccount);
" :props ("
#ifdef BUILD_CRYPTO
" :crypto t "
#endif /*BUILD_CRYPTO*/
" :version \"" VERSION "\" "
" :doccount %u))",doccount);
return MU_OK;
}
@ -1342,6 +1346,7 @@ cmd_view (ServerContext *ctx, GSList *args, GError **err)
unsigned docid;
char *sexp;
MuMsgOptions opts;
gboolean decrypt;
opts = MU_MSG_OPTION_CHECK_SIGNATURES;
if (get_bool_from_args (args, "extract-images", FALSE, err))
@ -1351,6 +1356,8 @@ cmd_view (ServerContext *ctx, GSList *args, GError **err)
if (get_bool_from_args (args, "auto-retrieve-key", FALSE, NULL))
opts |= MU_MSG_OPTION_AUTO_RETRIEVE_KEY;
decrypt = get_bool_from_args (args, "extract-encrypted", FALSE, err);
docid = determine_docid (ctx->query, args, err);
if (docid == MU_STORE_INVALID_DOCID) {
print_and_clear_g_error (err);
@ -1363,6 +1370,7 @@ cmd_view (ServerContext *ctx, GSList *args, GError **err)
return MU_OK;
}
mu_msg_set_auto_decrypt (msg, decrypt);
sexp = mu_msg_to_sexp (msg, docid, NULL, opts);
mu_msg_unref (msg);