You can pass the --also-generate-pkcs8-key
flag to cockroach cert
to generate a key in PKCS#8 format, which is the standard key encoding format in Java. For example, if you have the user max
:
{% include copy-clipboard.html %}
$ cockroach cert create-client max --certs-dir=certs --ca-key=my-safe-directory/ca.key --also-generate-pkcs8-key
The generated PKCS8 key will be named client.max.key.pk8
.