diff options
author | Nicolas Cavallari <nicolas.cavallari@green-communications.fr> | 2021-02-05 19:00:54 +0100 |
---|---|---|
committer | Seth Forshee <seth.forshee@canonical.com> | 2021-03-17 09:13:39 -0500 |
commit | 5ff8f19270c2b6e3fc3688d12f94d16e17c166f9 (patch) | |
tree | 2fbfd7a2d00e315f5a4e8056b5553f145c292995 | |
parent | 90e83fc9933c28c2b231d0efb9d98665ec1d844a (diff) | |
download | wireless-regdb-5ff8f19270c2b6e3fc3688d12f94d16e17c166f9.tar.gz |
wireless-regdb: Do not hardcode 'sforshee' in the certificate commonName
gen-pubcert.sh hardcodes the 'sforshee' common name when generating the
certificate. Make it depend on REGDB_AUTHOR instead, which defaults to
$(whoami).
Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | gen-pubcert.sh | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -80,7 +80,7 @@ $(REGDB_PUBKEY): $(REGDB_PRIVKEY) $(REGDB_PUBCERT): $(REGDB_PRIVKEY) @echo "Generating certificate for $(REGDB_AUTHOR)..." - ./gen-pubcert.sh $(REGDB_PRIVKEY) $(REGDB_PUBCERT) + ./gen-pubcert.sh $(REGDB_PRIVKEY) $(REGDB_PUBCERT) $(REGDB_AUTHOR) @echo $(REGDB_PUBKEY) > .custom diff --git a/gen-pubcert.sh b/gen-pubcert.sh index 1a4d579..a7e8538 100755 --- a/gen-pubcert.sh +++ b/gen-pubcert.sh @@ -1,7 +1,7 @@ #!/bin/bash -if [[ $# -ne 2 ]]; then - echo "Usage: $0 priv-key out-file" +if [[ $# -ne 3 ]]; then + echo "Usage: $0 priv-key out-file common-name" exit 1 fi @@ -13,6 +13,6 @@ openssl req -new -key "$1" -days 36500 -utf8 -nodes -batch \ string_mask = utf8only prompt = no [ req_distinguished_name ] - commonName = sforshee + commonName = $3 EOF ) |