- Create a key for the device or user with the command:
- genrsa -out device.key 2048
- Create a certificate request for the device or user with the command:
- req -key device.key -new -subj /CN=DEVICE -out device.req
Note: Apart from this instruction further changes are necessary in the file "openssl.cnf" for the definition of a Extension. - Create a certificate from the certificate request with the command:
- x509 -extfile openssl.cnf -req -in device.req -CAkey ca.key -CA ca.crt -CAcreateserial -days 90 -out device.crt
- Export the certificate for the device or user with the command:
- pkcs12 -export -inkey device.key -in device.crt -certfile ca.crt -out device.p12