Skip to content

Commit 679b1d8

Browse files
committed
Add ria-test client configuration
1 parent e46513a commit 679b1d8

File tree

7 files changed

+97
-1
lines changed

7 files changed

+97
-1
lines changed

cdoc2-cli/config/ria-dev/ria-dev_pkcs12_rsa.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# server.id is written to cdoc header. Must have configuration on recipient side
1+
# This configuration is untested, after 03.07.24 certificate change and load balancer activation
22
cdoc2.client.server.id=ria-dev
33
cdoc2.client.server.base-url.post=https://cdoc2-keyserver-01.dev.riaint.ee:8443
44
cdoc2.client.server.base-url.get=https://cdoc2-keyserver-01.dev.riaint.ee:8444
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
This directory contains cdoc2-cli config for RIA-dev servers
3+
4+
TLS (POST)
5+
https://cdoc2-keyserver.test.riaint.ee:8443
6+
7+
mTLS (GET)
8+
https://cdoc2-keyserver.test.riaint.ee:8444
9+
10+
## Id-card
11+
Run from cdoc2-cli directory
12+
13+
### Encrypt for id-card
14+
```
15+
java -jar target/cdoc2-cli-*.jar create --server=config/ria-test/ria-test.properties -f /tmp/ria.cdoc -r 37903130370 README.md
16+
```
17+
18+
### Decrypting with id-card
19+
```
20+
java -jar target/cdoc2-cli-*.jar decrypt --server=config/ria-test/ria-test.properties -f /tmp/ria.cdoc
21+
```
22+
23+
## General EC secp384 key pair
24+
25+
Client certificate must be trusted by server
26+
27+
### Encrypt
28+
```
29+
java -jar target/cdoc2-cli-*.jar create --server=config/ria-test/ria-test_p12.properties -f /tmp/ria_p12.cdoc -p keys/cdoc2client_pub.pem README.md
30+
```
31+
32+
### Decrypt
33+
34+
```
35+
java -jar target/cdoc2-cli-*.jar decrypt --server=config/ria-test/ria-test_p12.properties -p12 keys/cdoc2client.p12:passwd -f /tmp/ria_p12.cdoc -o /tmp
36+
```
1.08 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
keytool -import -trustcacerts -file tls-issuer.crt.pem -alias klass3-ria_2018_ecc_g3 -storepass passwd -keystore clienttruststore_ria-dev.jks
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# ria-dev, mutual TLS establishment with private key from id-cards (for reading key-capsule from the server)
2+
cdoc2.client.server.id=ria-test
3+
cdoc2.client.server.base-url.post=https://cdoc2-keyserver.test.riaint.ee:8443
4+
cdoc2.client.server.base-url.get=https://cdoc2-keyserver.test.riaint.ee:8444
5+
6+
# trusted certificates by client
7+
cdoc2.client.ssl.trust-store.type=JKS
8+
# path (full or relative)
9+
cdoc2.client.ssl.trust-store=config/ria-test/clienttruststore_ria-dev.jks
10+
cdoc2.client.ssl.trust-store-password=passwd
11+
12+
# mutual TLS with cert from smart-card (EST-ID certificates are trusted by the server)
13+
cdoc2.client.ssl.client-store.type=PKCS11
14+
# if ssl.client-store-password.prompt is set, then ask user interactively
15+
cdoc2.client.ssl.client-store-password.prompt=PIN1
16+
# otherwise use password value
17+
#cdoc2.client.ssl.client-store-password=3471
18+
19+
# PKCS11 library location, if not found in default location
20+
#pkcs11-library=/usr/lib/x86_64-linux-gnu/opensc-pkcs11.so
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ria-dev, mutual TLS establishment with private key from PKCS12 store (for reading key-capsule from the server)
2+
# public key part of servers trusted certs. See cdoc2-server/cdoc2-server/keys/README.md
3+
cdoc2.client.server.id=ria-test
4+
cdoc2.client.server.base-url.post=https://cdoc2-keyserver.test.riaint.ee:8443
5+
cdoc2.client.server.base-url.get=https://cdoc2-keyserver.test.riaint.ee:8444
6+
7+
cdoc2.client.server.debug=true
8+
cdoc2.client.server.connect-timeout=1000
9+
cdoc2.client.server.read-timeout=1000
10+
11+
# trusted certificates by client
12+
cdoc2.client.ssl.trust-store.type=JKS
13+
# path (full or relative)
14+
cdoc2.client.ssl.trust-store=config/ria-test/clienttruststore_ria-test.jks
15+
cdoc2.client.ssl.trust-store-password=passwd
16+
17+
# Client private key and certificate for mutual TLS. Only required for decrypt or list commands
18+
# Example configuration for pkcs12 based client configuration, update cdoc2.client.ssl.client-store to correct path
19+
cdoc2.client.ssl.client-store.type=PKCS12
20+
cdoc2.client.ssl.client-store=keys/cdoc2client.p12
21+
cdoc2.client.ssl.client-store-password=passwd
22+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIICvTCCAmOgAwIBAgIIEwktMxn8tjIwCgYIKoZIzj0EAwQwcTELMAkGA1UEBhMC
3+
RUUxJTAjBgNVBAoMHEluZm9ybWF0aW9uIFN5c3RlbSBBdXRob3JpdHkxIDAeBgNV
4+
BAMMF1JJQSBST09UIENBIDIwMTggRUNDIEcyMRkwFwYJKoZIhvcNAQkBFgpwa2lA
5+
cmlhLmVlMB4XDTIwMDgxODEwMDU1M1oXDTM4MDkyMDIwNDIxOFowdjELMAkGA1UE
6+
BhMCRUUxJTAjBgNVBAoMHEluZm9ybWF0aW9uIFN5c3RlbSBBdXRob3JpdHkxHzAd
7+
BgNVBAsMFkNlcnRpZmljYXRpb24gU2VydmljZXMxHzAdBgNVBAMMFktMQVNTMy1S
8+
SUEgMjAxOCBFQ0MgRzMwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAT3VfEDD3qs
9+
NO5cTGmJHeUdgWKMVOKwFunKmUf5fx82waWthh/XgcZXBxg6wMpc05x/wsVjhEtz
10+
q4Ll6UeFwiJDo4HfMIHcMBIGA1UdEwEB/wQIMAYBAf8CAQAwHwYDVR0jBBgwFoAU
11+
UCFh01APe/+6Mb/XVsMuezIYCEIwdgYIKwYBBQUHAQEEajBoMEMGCCsGAQUFBzAC
12+
hjdodHRwOi8vd3d3LnJpYS5lZS9jZXJ0cy9SSUFfUk9PVF9DQV8yMDE4X0VDQ19H
13+
Mi5kZXIuY3J0MCEGCCsGAQUFBzABhhVodHRwOi8vb2NzcC5yaWEuZWUvQ0EwHQYD
14+
VR0OBBYEFFcaZmPOL66vUw4v7g888ZdZ3c7EMA4GA1UdDwEB/wQEAwIBxjAKBggq
15+
hkjOPQQDBANIADBFAiEAipQ0yy53GLNbYFuMyxSHBKmEchGxZojuxsV62rS7C/gC
16+
IF7PshKqti26zdo/0JuwYXIohUdiSpbIPTcZgU1Su9Wo
17+
-----END CERTIFICATE-----

0 commit comments

Comments
 (0)