mirror of https://github.com/jacekkow/uphpCAS-tests

Jacek Kowalski
2015-09-05 5686c9d8de959de0818bcd0a5b18a9c004d3dfc5
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
 
sudo apt-get update
sudo apt-get -y install gradle openssl stunnel
 
openssl genrsa -out /tmp/correct.key 1024
openssl req -new -key /tmp/correct.key -out /tmp/correct.crt -subj '/CN=127.0.0.1/' -x509
cat /tmp/correct.crt /tmp/correct.key > /tmp/correct.pem
 
openssl genrsa -out /tmp/wrongcn.key 1024
openssl req -new -key /tmp/wrongcn.key -out /tmp/wrongcn.crt -subj '/CN=127.0.0.2/' -x509
cat /tmp/wrongcn.crt /tmp/wrongcn.key > /tmp/wrongcn.pem