diff options
| author | Fuwn <[email protected]> | 2022-04-04 09:27:31 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-04-04 09:27:31 +0000 |
| commit | cdd70a90aa08713a24ff5489f9e0f23fb38d2762 (patch) | |
| tree | 9bc1e70a3a163223e2181c388dd5ebeafb8a1af0 /bin | |
| download | maple-0.1.0.tar.xz maple-0.1.0.zip | |
feat: maple 0.1.0 :star:0.1.0
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/genkey | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/genkey b/bin/genkey new file mode 100644 index 0000000..e081711 --- /dev/null +++ b/bin/genkey @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +read \ + -rp \ + "Which common name (hostname) would you like to use for the generated key? " \ + common_name + +openssl req \ + -new \ + -subj "/CN=$common_name" \ + -x509 \ + -newkey ec \ + -pkeyopt ec_paramgen_curve:prime256v1 \ + -days 365 \ + -nodes \ + -out .maple/public.pem \ + -keyout .maple/private.pem \ + -inform pem |