File: gen-certificate.sh

package info (click to toggle)
ngtcp2 0.12.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,240 kB
  • sloc: ansic: 48,169; cpp: 16,101; python: 2,262; makefile: 633; sh: 119
file content (8 lines) | stat: -rwxr-xr-x 240 bytes parent folder | download
1
2
3
4
5
6
7
8
#!/bin/sh -e
# Generate a self-signed certificate for testing purposes.

mkdir -p cert
keyfile=cert/server.key
certfile=cert/server.crt

openssl req -newkey rsa:2048 -x509 -nodes -keyout "$keyfile" -new -out "$certfile" -subj /CN=localhost