- if (try_decrypt &&
- ((!(strcasecmp(try_decrypt, "true"))) ||
- (!(strcasecmp(try_decrypt, "yes"))) ||
- (!(strcasecmp(try_decrypt, "1")))))
- notmuch_indexopts_set_try_decrypt (ret, true);
+ if (decrypt_policy) {
+ if ((! (strcasecmp (decrypt_policy, "true"))) ||
+ (! (strcasecmp (decrypt_policy, "yes"))) ||
+ (! (strcasecmp (decrypt_policy, "1"))))
+ notmuch_indexopts_set_decrypt_policy (ret, NOTMUCH_DECRYPT_TRUE);
+ else if ((! (strcasecmp (decrypt_policy, "false"))) ||
+ (! (strcasecmp (decrypt_policy, "no"))) ||
+ (! (strcasecmp (decrypt_policy, "0"))))
+ notmuch_indexopts_set_decrypt_policy (ret, NOTMUCH_DECRYPT_FALSE);
+ else if (! strcasecmp (decrypt_policy, "nostash"))
+ notmuch_indexopts_set_decrypt_policy (ret, NOTMUCH_DECRYPT_NOSTASH);
+ }