Don't check private key if detecting header

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
This commit is contained in:
David Goulet 2016-12-10 11:37:41 -05:00
parent 7ae2ab49ba
commit 95302087ee

View File

@ -83,14 +83,6 @@ scrambler_istream_read_detect_magic(struct scrambler_istream *sstream,
{
ssize_t ret;
if (sstream->private_key == NULL) {
i_error("[scrambler] Trying to decrypt without private key.");
sstream->istream.istream.stream_errno = EACCES;
sstream->istream.istream.eof = TRUE;
ret = -1;
goto end;
}
/* Check for the scrambler header and if so we have an encrypted email that
* we'll try to decrypt. */
if (!memcmp(scrambler_header, source, sizeof(scrambler_header))) {