Browse Source

do not replace subject if message format 1.x and unencrypted subject is enabled

master
Volker Birk 8 months ago
parent
commit
13bcfcdaf5
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      src/message_api.c

+ 7
- 3
src/message_api.c View File

@ -2754,9 +2754,13 @@ DYNAMIC_API PEP_STATUS encrypt_message(
else {
// hide subject
if (enc_format != PEP_enc_inline && enc_format != PEP_enc_inline_EA) {
status = replace_subject(_src);
if (status == PEP_OUT_OF_MEMORY)
goto enomem;
// do not replace subject if message format 1.x and unencrypted
// subject is enabled
if (!(wrap_type == PEP_message_unwrapped && session->unencrypted_subject)) {
status = replace_subject(_src);
if (status == PEP_OUT_OF_MEMORY)
goto enomem;
}
}
if (!(flags & PEP_encrypt_flag_force_no_attached_key))
added_key_to_real_src = true;


Loading…
Cancel
Save