Este contenido no está disponible en el idioma seleccionado.
E.5. Java Keystores
This appendix demonstrates how to import the X.509 certificate exported from the Red Hat Gluster Storage Console into a new Java keystore file.
This procedure helps a user import the rhsc.cer certificate into a Java keystore. This procedure requires the
keytool management utility from the Java Development Kit (JDK) available for Linux and Windows systems.
Procedure E.5. Import a Certificate into a New Java Keystore
- Access your client machine and locate the
rhsc.cercertificate. - Import the
rhsc.cercertificate using the Javakeytoolmanagement utility.keytool -importcert -v -trustcacerts -keystore restapi.jks -noprompt -alias rhsc -file rhsc.cer
keytool -importcert -v -trustcacerts -keystore restapi.jks -noprompt -alias rhsc -file rhsc.cerCopy to Clipboard Copied! Toggle word wrap Toggle overflow Thekeytoolutility creates a new keystore file namedrestapi.jks. keytoolasks for thekeystorepassword. Enter a password andkeytoolasks to verify it.keytooladds therhsc.cercertificate to the restapi.jks keystore. Usekeytool -listcommand to view the certificate's entry in the keystore:keytool -list -keystore restapi.jks -storepass [password]
keytool -list -keystore restapi.jks -storepass [password]Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Important
Some versions of
keytool parse the certificate incorrectly. If keytool does not recognize the certificate, convert it to a different X.509 format with the openssl tool:
openssl x509 -in rhsc.cer -out rhsc.new -outform [pem|der]
openssl x509 -in rhsc.cer -out rhsc.new -outform [pem|der]