...
View file | ||
---|---|---|
|
View file | ||
---|---|---|
|
Create the following directory tree and empty, two index.txt and serial files containing integer values.
Place files in their corresponding directories and modify them to match your organisation’s information.
Your keystores and truststores will be output to a directory named keystores
one level above your working directory.
Code Block |
---|
mkdir -p certs crl intermediate intermediate/certs intermediate/csr intermediate/newcerts intermediate/private private newcerts ../keystores; touch index.txt intermediate/index.txt; echo 1001 | tee serial intermediate/serial; |
Note |
---|
In each openssl.cnf modify |
Root CA
First we want to create a private key and root CA
...
Code Block |
---|
cat intermediate/certs/intermediate.cert.pem \ certs/ca.cert.pem > intermediate/certs/ca-chain.cert.pem; chmod 444 intermediate/certs/ca-chain.cert.pem; |
...
Server Certificate
Next we will be creating a certificate and key for our server, sign it and generate the keystore to be used by HiveMQ. In the following examples, you will need to replace broker.hivemq.local
with the FQDN of the individual nodes you are creating these for.
...
If you want to create a certificate chain to be used in PEM format directly the order of the certificates needs to be changed:cat intermediate/certs/client1.cert.pem intermediate/certs/intermediate.cert.pem
certs/ca.cert.pem> ../keystores/new-client1.chain.pem;
Importing pem files to jks
Code Block |
---|
openssl pkcs12 -export -in user.pem -inkey user.key -certfile user.pem -out testkeystore.p12
keytool -importkeystore -srckeystore testkeystore.p12 -srcstoretype pkcs12 -destkeystore wso2carbon.jks -deststoretype JKS |
Import the certificate chain and the private key in to a PKCS12 container
...