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

ENGINE-814
Volker Birk 2 years ago
parent 07bef414c4
commit 13bcfcdaf5

@ -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