diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 03:24:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 03:24:08 +0000 |
commit | 95bfafa9ff6abf9a19f7a85b429d502036be60cf (patch) | |
tree | f49bad15e2d2d770e1200eae1318c29b3de9ef9f /gen-pubcert.sh | |
parent | Initial commit. (diff) | |
download | wireless-regdb-95bfafa9ff6abf9a19f7a85b429d502036be60cf.tar.xz wireless-regdb-95bfafa9ff6abf9a19f7a85b429d502036be60cf.zip |
Adding upstream version 2022.06.06.upstream/2022.06.06
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gen-pubcert.sh')
-rwxr-xr-x | gen-pubcert.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gen-pubcert.sh b/gen-pubcert.sh new file mode 100755 index 0000000..a7e8538 --- /dev/null +++ b/gen-pubcert.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [[ $# -ne 3 ]]; then + echo "Usage: $0 priv-key out-file common-name" + exit 1 +fi + +openssl req -new -key "$1" -days 36500 -utf8 -nodes -batch \ + -x509 -outform PEM -out "$2" \ + -config <(cat <<-EOF + [ req ] + distinguished_name = req_distinguished_name + string_mask = utf8only + prompt = no + [ req_distinguished_name ] + commonName = $3 + EOF + ) |