summaryrefslogtreecommitdiffstats
path: root/meta-ibm/recipes-httpd/nginx/files/gen-cert.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ibm/recipes-httpd/nginx/files/gen-cert.sh')
-rw-r--r--meta-ibm/recipes-httpd/nginx/files/gen-cert.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta-ibm/recipes-httpd/nginx/files/gen-cert.sh b/meta-ibm/recipes-httpd/nginx/files/gen-cert.sh
new file mode 100644
index 000000000..480266f3b
--- /dev/null
+++ b/meta-ibm/recipes-httpd/nginx/files/gen-cert.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+PEM="/etc/ssl/certs/nginx/cert.pem"
+
+if [ ! -f $PEM ]; then
+ openssl req -x509 -sha256 -newkey rsa:2048 -keyout $PEM -out $PEM \
+ -days 3650 -subj "/O=openbmc-project.xyz/CN=localhost" \
+ -nodes
+fi
OpenPOWER on IntegriCloud