blob: 77f5c555a5765b7515dd66e28076ca169d6f489f [file] [log] [blame]
Aleksandra Maciaga7a5e3f62020-03-03 12:35:16 +01001#!/bin/bash
2
Aleksandra Maciaga7a5e3f62020-03-03 12:35:16 +01003configureEjbca() {
4 ejbca.sh config cmp addalias --alias cmpRA
5 ejbca.sh config cmp updatealias --alias cmpRA --key operationmode --value ra
6 ejbca.sh ca editca --caname ManagementCA --field cmpRaAuthSecret --value mypassword
Aleksandra Maciagaf6300682020-03-04 17:11:30 +01007 ejbca.sh config cmp updatealias --alias cmpRA --key responseprotection --value pbe
Aleksandra Maciaga7a5e3f62020-03-03 12:35:16 +01008 ejbca.sh config cmp dumpalias --alias cmpRA
9 ejbca.sh config cmp addalias --alias cmp
10 ejbca.sh config cmp updatealias --alias cmp --key allowautomatickeyupdate --value true
Aleksandra Maciagaf6300682020-03-04 17:11:30 +010011 ejbca.sh config cmp updatealias --alias cmp --key responseprotection --value pbe
Aleksandra Maciaga7a5e3f62020-03-03 12:35:16 +010012 ejbca.sh ra addendentity --username Node123 --dn "CN=Node123" --caname ManagementCA --password mypassword --type 1 --token USERGENERATED
13 ejbca.sh ra setclearpwd --username Node123 --password mypassword
14 ejbca.sh config cmp updatealias --alias cmp --key extractusernamecomponent --value CN
15 ejbca.sh config cmp dumpalias --alias cmp
16 ejbca.sh ca getcacert --caname ManagementCA -f /dev/stdout > cacert.pem
17}
18
Aleksandra Maciaga7a5e3f62020-03-03 12:35:16 +010019configureEjbca