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

Jacek Kowalski
2015-09-05 9da16f4812a443331d93348b2b0e7a88924b6724
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