File: generate.sh

package info (click to toggle)
mitmproxy 0.18.2-6%2Bdeb9u2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 37,444 kB
  • sloc: python: 33,213; makefile: 167; ansic: 68; sh: 48
file content (17 lines) | stat: -rw-r--r-- 343 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

if [ ! -f ./private.key ]
then
    openssl genrsa -out private.key 3072
fi
openssl req \
    -batch \
    -new -x509 \
    -key private.key \
    -sha256 \
    -out cert.pem \
    -days 9999 \
    -config ./openssl.cnf
openssl x509 -in cert.pem -text -noout
cat ./private.key ./cert.pem > testcert.pem
rm ./private.key ./cert.pem