blob: 3eb146dbda1f6f8c81e24c26217a351985dad593 [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
Piotr Marcinkiewicz3bbc1c72020-11-19 14:13:45 +01008 ejbca.sh ca importprofiles -d /opt/primekey/custom_profiles
9 #Profile name taken from certprofile filename (certprofile_<profile-name>-<id>.xml)
10 ejbca.sh config cmp updatealias --alias cmpRA --key ra.certificateprofile --value CUSTOM_ENDUSER
11 #ID taken from entityprofile filename (entityprofile_<profile-name>-<id>.xml)
12 ejbca.sh config cmp updatealias --alias cmpRA --key ra.endentityprofileid --value 1356531849
Aleksandra Maciaga7a5e3f62020-03-03 12:35:16 +010013 ejbca.sh config cmp dumpalias --alias cmpRA
14 ejbca.sh config cmp addalias --alias cmp
15 ejbca.sh config cmp updatealias --alias cmp --key allowautomatickeyupdate --value true
Aleksandra Maciagaf6300682020-03-04 17:11:30 +010016 ejbca.sh config cmp updatealias --alias cmp --key responseprotection --value pbe
Aleksandra Maciaga7a5e3f62020-03-03 12:35:16 +010017 ejbca.sh ra addendentity --username Node123 --dn "CN=Node123" --caname ManagementCA --password mypassword --type 1 --token USERGENERATED
18 ejbca.sh ra setclearpwd --username Node123 --password mypassword
19 ejbca.sh config cmp updatealias --alias cmp --key extractusernamecomponent --value CN
20 ejbca.sh config cmp dumpalias --alias cmp
21 ejbca.sh ca getcacert --caname ManagementCA -f /dev/stdout > cacert.pem
22}
23
Aleksandra Maciaga7a5e3f62020-03-03 12:35:16 +010024configureEjbca