EJBCA¶
Brīdinājums
Because of some integration problems with the Sun PKCS11 provider, keys generated from EJBCA will have a random name instead of the name given in the interface. Therefor this documentation is only a Proof-of-Concept. Support for EJBCA will be introduced by NetHSM software 3.0.
EJBCA ir PKI sertifikātu iestādes programmatūra, kas pieejama kā atvērtā koda programmatūra.
Lai varētu izmantot NetHSM ar EJBCA, vispirms ir nepieciešams iestatīt NetHSM PKCS#11 moduli.
Pēc tam konfigurējiet EJBCA, lai izmantotu NetHSM PKCS#11 moduli, pievienojot ierakstu /etc/ejbca/conf/web.properties
failā:
cryptotoken.p11.lib.418.name=NetHSM
cryptotoken.p11.lib.418.file=/usr/lib/nitrokey/libnethsm_pkcs11.so
Piezīme
418
nosaukumā ir indekss, kam jābūt unikālam katram PKCS#11 modulim konfigurācijas failā.
Lai varētu ģenerēt atslēgas no interfeisa, `` p11nethsm.conf` failā iestatiet opciju enable_set_attribute_value
uz true.
Pēc EJBCA restartēšanas varat pievienot jaunu kriptožetonu EJBCA administratora GUI https://mycahostname/ejbca/adminweb/cryptotoken/cryptotokens.xhtml
. Kriptožetona tips ir PKCS#11 Crypto Token
un kriptožetona nosaukums ir NetHSM
.
Piemēra izpilde¶
Ja vēlaties eksperimentēt ar doto piemēru, varat izmantot git, lai klonētu nethsm-pkcs11 repozitoriju un palaist šādas komandas:
Configure a NetHSM, either a real one or a container. Refer to chapter Getting Started to learn more.
Mainiet libnethsm_pkcs11 konfigurāciju, lai tā atbilstu jūsu NetHSM vietnē
container/ejbca/p11nethsm.conf
.Izveidojiet konteineru.
docker build -f container/ejbca/Dockerfile . -t pkcs-ejbca
Palaist konteineru.
docker run --rm -it -p 9443:8443 -p 9080:8080 -h mycahostname -e TLS_SETUP_ENABLED="simple" pkcs-ejbca
Konteiners būs pieejams vietnē https://localhost:9443/.