summaryrefslogtreecommitdiff
path: root/make/opensslcert.pm
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-16 17:14:45 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-16 17:14:45 +0000
commitbab14f0dd2345c9d7dcbc47c918563709e1ac094 (patch)
tree753a23cfc9fc08c6697e80b3e686f074aa911d85 /make/opensslcert.pm
parent3abff3a37550cc1d88dd4d1fd7ed526e89309a53 (diff)
'svn propset -R svn:eol-style CR *' Set to UNIX-style always. Binaries are auto skipped by svn.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7454 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'make/opensslcert.pm')
-rw-r--r--make/opensslcert.pm37
1 files changed, 1 insertions, 36 deletions
diff --git a/make/opensslcert.pm b/make/opensslcert.pm
index a4954e0be..cb94869f9 100644
--- a/make/opensslcert.pm
+++ b/make/opensslcert.pm
@@ -1,36 +1 @@
-package make::opensslcert;
-
-use Exporter 'import';
-use make::configure;
-@EXPORT = qw(make_openssl_cert);
-
-
-sub make_openssl_cert()
-{
- open (FH, ">openssl.template");
- my $org = promptstring_s("Please enter the organization name", "My IRC Network");
- my $unit = promptstring_s("Please enter the unit Name", "Server Admins");
- my $country = promptstring_s("Please enter your country (two letter code)", "US");
- my $state = promptstring_s("Please enter your state or locality name", "Alaska");
- my $city = promptstring_s("Please enter your city", "Factory Town");
- my $email = promptstring_s("Please enter a contact email address", "oompa\@loompa.com");
- my $commonname = promptstring_s("Please enter the common name (domain name) of the irc server", "example.inspircd.org");
- print FH <<__END__;
-$country
-$state
-$city
-$org
-$unit
-$commonname
-$email
-__END__
-close(FH);
-
-my $time = promptstring_s("Please enter the number of days that this certificate is valid for","365");
-
-system("cat openssl.template | openssl req -x509 -nodes -newkey rsa:1024 -keyout key.pem -out cert.pem -days $time 2>/dev/null");
-system("openssl dhparam -out dhparams.pem 1024");
-unlink("openssl.template");
-}
-
-1;
+package make::opensslcert; use Exporter 'import'; use make::configure; @EXPORT = qw(make_openssl_cert); sub make_openssl_cert() { open (FH, ">openssl.template"); my $org = promptstring_s("Please enter the organization name", "My IRC Network"); my $unit = promptstring_s("Please enter the unit Name", "Server Admins"); my $country = promptstring_s("Please enter your country (two letter code)", "US"); my $state = promptstring_s("Please enter your state or locality name", "Alaska"); my $city = promptstring_s("Please enter your city", "Factory Town"); my $email = promptstring_s("Please enter a contact email address", "oompa\@loompa.com"); my $commonname = promptstring_s("Please enter the common name (domain name) of the irc server", "example.inspircd.org"); print FH <<__END__; $country $state $city $org $unit $commonname $email __END__ close(FH); my $time = promptstring_s("Please enter the number of days that this certificate is valid for","365"); system("cat openssl.template | openssl req -x509 -nodes -newkey rsa:1024 -keyout key.pem -out cert.pem -days $time 2>/dev/null"); system("openssl dhparam -out dhparams.pem 1024"); unlink("openssl.template"); } 1; \ No newline at end of file