summaryrefslogtreecommitdiff
path: root/rt/lib/RT/Crypt/SMIME.pm
diff options
context:
space:
mode:
Diffstat (limited to 'rt/lib/RT/Crypt/SMIME.pm')
-rw-r--r--rt/lib/RT/Crypt/SMIME.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/rt/lib/RT/Crypt/SMIME.pm b/rt/lib/RT/Crypt/SMIME.pm
index 743ab2b..fbd8108 100644
--- a/rt/lib/RT/Crypt/SMIME.pm
+++ b/rt/lib/RT/Crypt/SMIME.pm
@@ -2,7 +2,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -184,6 +184,14 @@ sub Probe {
\$buf, \$err
) };
+ if ($err && $err =~ /Invalid command/) {
+ ($buf, $err) = ('', '');
+ safe_run_child { run3( [$bin, "list", "-commands"],
+ \undef,
+ \$buf, \$err
+ ) };
+ }
+
if ($? or $err) {
$RT::Logger->warning(
"RT's SMIME libraries couldn't successfully execute openssl.".