summaryrefslogtreecommitdiff
path: root/.makecert.exp
diff options
context:
space:
mode:
Diffstat (limited to '.makecert.exp')
-rwxr-xr-x.makecert.exp22
1 files changed, 22 insertions, 0 deletions
diff --git a/.makecert.exp b/.makecert.exp
new file mode 100755
index 0000000..36bdee1
--- /dev/null
+++ b/.makecert.exp
@@ -0,0 +1,22 @@
+#!/usr/bin/expect
+set keyfile [lindex $argv 1]
+set certfile [lindex $argv 2]
+set timeout 2
+spawn openssl req -x509 -nodes -days 1095 -newkey rsa:2048 -keyout "${keyfile}" -out "${certfile}"
+expect "Country Name (2 letter code) \[XX\]:"
+set timeout 1
+send "US\r"
+expect "State or Province Name (full name) \[\]:"
+send "Some State\r"
+expect "Locality Name (eg, city) \[Default City\]:"
+send "Default City\r"
+expect "Organization Name (eg, company) \[Default Company Ltd\]:"
+send "Default Company Ltd\r"
+expect "Organizational Unit Name (eg, section) \[\]:" &&
+send "Information Technologies\r"
+expect "Common Name (eg, your name or your server's hostname) \[\]:"
+send [lindex $argv 0]
+send "\r"
+expect "Email Address \[\]:"
+send "linuxadmin@example.com\r"
+interact
bgstack15