See forgotten and then updated proposal by
TWiki:Main.TimotheLitt
at
TWiki:Codev.SmimeNotificationSupport
.
--
TWiki:Main/PeterThoeny
- 2011-06-14
This is now in SVN trunk. Thanks Timothe!
--
TWiki:Main/PeterThoeny
- 2011-06-14
Re-opening, default needs to be empty, e.g. no signed e-mail.
--
TWiki:Main.PeterThoeny
- 2011-06-20
Additional fixes:
Make default configure fields empty, e.g. no signed e-mail by default:
--- TWiki.spec (revision 21511)
+++ TWiki.spec (working copy)
@@ -1043,7 +1043,7 @@
# must be in PEM format. You must also use a mail program (not Net::SMTP)
# in the following settings. <em>If you do not want signed e-mail,
# leave this field blank. </em>
-$TWiki::cfg{SmimeCertificateFile} = '$TWiki::cfg{DataDir}/cert.pem';
+$TWiki::cfg{SmimeCertificateFile} = '';
# **PATH**
# Secure email certificate. If you want e-mail sent by TWiki to be signed,
@@ -1053,7 +1053,7 @@
# You must also use a mail program (not Net::SMTP)
# in the following settings. <em>If you do not want signed e-mail,
# leave this field blank. </em>
-$TWiki::cfg{SmimeKeyFile} = '$TWiki::cfg{DataDir}/key.pem';
+$TWiki::cfg{SmimeKeyFile} = '';
# **COMMAND**
# Mail program. If Net::SMTP is installed, it will be used in preference.
Better explanation using example path/filename:
--- TWiki.spec (revision 21538)
+++ TWiki.spec (working copy)
@@ -1039,18 +1039,18 @@
# **PATH**
# Secure email certificate. If you want e-mail sent by TWiki to be signed,
-# specify the filename of the administrator's X.509 certificate here. It
-# must be in PEM format. You must also use a mail program (not Net::SMTP)
-# in the following settings. <em>If you do not want signed e-mail,
-# leave this field blank. </em>
+# specify the filename of the administrator's X.509 certificate here, such
+# as /etc/pki/tls/certs/cert.pem. It must be in PEM format. You must also
+# use a mail program (not Net::SMTP) in the following settings. <em>If you
+# do not want signed e-mail, leave this field blank. </em>
$TWiki::cfg{SmimeCertificateFile} = '';
# **PATH**
# Secure email certificate. If you want e-mail sent by TWiki to be signed,
-# specify the filename of the administrator's X.509 private key here. It
-# must be in PEM format. <em>Be sure that this file is only readable by the
-# TWiki software; it must NOT be readable by users!</em>
-# You must also use a mail program (not Net::SMTP)
+# specify the filename of the administrator's X.509 private key here, such
+# as /etc/pki/tls/private/key.pem. It must be in PEM format. <em>Be sure
+# that this file is only readable by the TWiki software; it must NOT be
+# readable by users!</em> You must also use a mail program (not Net::SMTP)
# in the following settings. <em>If you do not want signed e-mail,
# leave this field blank. </em>
$TWiki::cfg{SmimeKeyFile} = '';
SMIME fields are optional, configure should not complain if values are empty:
Index: TWiki/Configure/Checkers/SmimeCertificateFile.pm
===================================================================
--- TWiki/Configure/Checkers/SmimeCertificateFile.pm (revision 21512)
+++ TWiki/Configure/Checkers/SmimeCertificateFile.pm (working copy)
@@ -28,7 +28,8 @@
my $certFile = $TWiki::cfg{SmimeCertificateFile} || "";
$certFile =~ s/%DATE%/DATE/;
TWiki::Configure::Load::expandValue($certFile);
- my $e = !-r ( $certFile ) && "Can\'t read $certFile";
+ return undef unless( $certFile );
+ my $e = !-r ( $certFile ) && "Can\'t read cert file $certFile";
$e = $this->ERROR($e) if $e;
return $e;
}
Index: TWiki/Configure/Checkers/SmimeKeyFile.pm
===================================================================
--- TWiki/Configure/Checkers/SmimeKeyFile.pm (revision 21511)
+++ TWiki/Configure/Checkers/SmimeKeyFile.pm (working copy)
@@ -25,10 +25,11 @@
sub check {
my $this = shift;
- my $certFile = $TWiki::cfg{SmimeKeyFile} || "";
- $certFile =~ s/%DATE%/DATE/;
- TWiki::Configure::Load::expandValue($certFile);
- my $e = !-r ( $certFile ) && "Can\'t read $certFile";
+ my $keyFile = $TWiki::cfg{SmimeKeyFile} || "";
+ $keyFile =~ s/%DATE%/DATE/;
+ TWiki::Configure::Load::expandValue($keyFile);
+ return undef unless( $keyFile );
+ my $e = !-r ( $keyFile ) && "Can\'t read key file $keyFile";
$e = $this->ERROR($e) if $e;
return $e;
}
--
TWiki:Main.PeterThoeny
- 2011-06-20