-#!/usr/bin/perl
+#!{- $config{perl} -}
#
# Wrapper around the ca to make it easier to use
-# Edit CA.pl.in not CA.pl!
-
+#
+# {- join("\n# ", @autowarntext) -}
use strict;
use warnings;
close OUT;
# ask user for existing CA certificate
print "CA certificate filename (or enter to create)\n";
- $FILE = <STDIN>;
- chop $FILE if $FILE;
- if ($FILE) {
+ $FILE = "" unless defined($FILE = <STDIN>);
+ $FILE =~ s{\R$}{};
+ if ($FILE ne "") {
copy_pemfile($FILE,"${CATOP}/private/$CAKEY", "PRIVATE");
copy_pemfile($FILE,"${CATOP}/$CACERT", "CERTIFICATE");
} else {