Aleksandra Maciaga | 7a5e3f6 | 2020-03-03 12:35:16 +0100 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Aleksandra Maciaga | 7a5e3f6 | 2020-03-03 12:35:16 +0100 | [diff] [blame] | 3 | configureEjbca() { |
| 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 Maciaga | f630068 | 2020-03-04 17:11:30 +0100 | [diff] [blame] | 7 | ejbca.sh config cmp updatealias --alias cmpRA --key responseprotection --value pbe |
Piotr Marcinkiewicz | 3bbc1c7 | 2020-11-19 14:13:45 +0100 | [diff] [blame] | 8 | 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 Maciaga | 7a5e3f6 | 2020-03-03 12:35:16 +0100 | [diff] [blame] | 13 | 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 Maciaga | f630068 | 2020-03-04 17:11:30 +0100 | [diff] [blame] | 16 | ejbca.sh config cmp updatealias --alias cmp --key responseprotection --value pbe |
Aleksandra Maciaga | 7a5e3f6 | 2020-03-03 12:35:16 +0100 | [diff] [blame] | 17 | 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 Maciaga | 7a5e3f6 | 2020-03-03 12:35:16 +0100 | [diff] [blame] | 24 | configureEjbca |