aboutsummaryrefslogtreecommitdiffstats
path: root/development/ssl/README.md
blob: c2819d2495d9f0249c398ae12180990439318bfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Generating SSL certificates

## Java keytool way (recommended)

To generate:

```shell
./gen-certs.sh
```

To clean (remove generated files):

```shell
./gen-certs.sh clean
```

## OpenSSL way (currently might not work)

> Add `-f Makefile-openssl` to each command

Typical usage:

```shell
make FILE=client
make FILE=server
```

or (to generate PKCS12 key and trust stores):

```shell
make create-key-store FILE=client
make create-key-store FILE=server
make create-trust-store
```

Will generate CA certificate and signed client and server certificates.

More "low-level" usage:

```shell
make generate-ca-certificate
make generate-private-key FILE=client 
make sign FILE=client
```

# Connecting to a server

First generate *client* and *server* certificates. Then start a server with it's cert and make ca.crt a trusted certification authority.

After that you can:

```shell
./connect.sh client localhost:8600 < file_with_a_data_to_be_sent.dat
```