Link to home
Start Free TrialLog in
Avatar of Anthony Lucia
Anthony Lucia

asked on

keytool command

I am confused about the keytool and certs in general

What part of this command (which parameter) actually performs a 'self-sign'.

What part of the command (which parm) makes it a private key.  Why is this a private key

keytool -genkey -alias First_Java_Cert -keyalg RSA -keystore /home/ssl/keystore.jks -storepass passw0rd
-dname "CN=first, O=IBM, C=GB" -keypass passw0rd
ASKER CERTIFIED SOLUTION
Avatar of Dave Howe
Dave Howe
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Anthony Lucia
Anthony Lucia

ASKER

You said the genkey created

- self signed

- Key pair

I assume by keypair you mean that it created a public and private key

So does that mean that both a public and private key are contained within the cert that was created ?
No. The private key never leaves the jar file, the public key is contained in the cert.

This is exactly the same system as you use for https certificates, just the java way to create and store them.