mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw.git
synced 2025-10-29 09:52:27 +00:00
create-certificates: Use 'hostname' intead of hard-coded ucentral
This lets the keys work on my machine, who's hostname was not ucentral Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
hn=$(hostname)
|
||||
howmany=10
|
||||
cert_life=365
|
||||
subject="/C=CA/ST=British Columbia/L=Vancouver/O=Arilia Wireless/OU=Engineering/CN=ucentral/emailAddress=support@example.com"
|
||||
subject="/C=CA/ST=British Columbia/L=Vancouver/O=Arilia Wireless/OU=Engineering/CN=$hn/emailAddress=support@example.com"
|
||||
|
||||
openssl genrsa -out server-key.pem 2048
|
||||
openssl req -new -key server-key.pem -subj "$subject" -out server.csr
|
||||
@@ -11,4 +12,4 @@ openssl x509 -req -days $cert_life -in server.csr -signkey server-key.pem -out s
|
||||
for i in `eval echo {1..$howmany}`
|
||||
do
|
||||
openssl x509 -signkey server-key.pem -in server.csr -req -days $cert_life -out dev-$i-cert.pem
|
||||
done
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user