Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

executable file 21 lines (15 sloc) 0.422 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#!/bin/sh

# Generate some random data
rm -f rand.dat
dd if=/dev/random of=rand.dat bs=1024 count=1

# cakey.key
openssl genrsa -out cakey.key -rand rand.dat 2048

# cakey.csr
openssl req -new -key cakey.key -out cakey.csr

# cakey.pem
openssl x509 -req -days 1780 -set_serial 1 -in cakey.csr -signkey cakey.key -out cakey.pem

# server.pem
cat cakey.key cakey.pem > server.pem

# Clean up
rm -f rand.dat
ls -l server.pem
Something went wrong with that request. Please try again.