Skip to content

Commit

Permalink
Merge pull request #566 from ikedas/issue-565
Browse files Browse the repository at this point in the history
Crash with broken S/MIME user certificate (cf. #565)
  • Loading branch information
ikedas authored Mar 7, 2019
2 parents de6f3d1 + ee72f3b commit bac9b6f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/Sympa/Message.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
$smime->setPublicKey($cert);
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
Expand Down

0 comments on commit bac9b6f

Please sign in to comment.