Unverified Commit bac9b6f9 authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #566 from ikedas/issue-565

Crash with broken S/MIME user certificate (cf. #565)
parents de6f3d13 ee72f3b3
......@@ -1117,7 +1117,12 @@ sub smime_encrypt {
# encrypt the incoming message parse it.
my $smime = Crypt::SMIME->new();
#FIXME: Add intermediate CA certificates if any.
eval { $smime->setPublicKey($cert); };
if ($EVAL_ERROR) {
$log->syslog('err', 'Unable to encrypt message to %s: %s',
$email, $EVAL_ERROR);
return undef;
# don't; cf RFC2633 3.1. netscape 4.7 at least can't parse encrypted
# stuff that contains a whole header again... since MIME::Tools has
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment