linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wireless-regdb: Do not hardcode 'sforshee' in the certificate commonName
@ 2021-02-05 18:00 Nicolas Cavallari
  2021-03-17 15:18 ` Seth Forshee
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Cavallari @ 2021-02-05 18:00 UTC (permalink / raw)
  To: seth.forshee; +Cc: wireless-regdb, linux-wireless

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>
---
 Makefile       | 2 +-
 gen-pubcert.sh | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 2f1ed93..02176ec 100644
--- a/Makefile
+++ b/Makefile
@@ -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
 	)
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] wireless-regdb: Do not hardcode 'sforshee' in the certificate commonName
  2021-02-05 18:00 [PATCH] wireless-regdb: Do not hardcode 'sforshee' in the certificate commonName Nicolas Cavallari
@ 2021-03-17 15:18 ` Seth Forshee
  0 siblings, 0 replies; 2+ messages in thread
From: Seth Forshee @ 2021-03-17 15:18 UTC (permalink / raw)
  To: Nicolas Cavallari; +Cc: wireless-regdb, linux-wireless

On Fri, Feb 05, 2021 at 07:00:54PM +0100, Nicolas Cavallari wrote:
> 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>

Applied, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-17 16:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05 18:00 [PATCH] wireless-regdb: Do not hardcode 'sforshee' in the certificate commonName Nicolas Cavallari
2021-03-17 15:18 ` Seth Forshee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).