Questions tagged [keytool]

Key and Certificate Management Tool: manages a keystore (database) of cryptographic keys, X.509 certificate chains, and trusted certificates.

Keytool is a key and certificate management utility. It allows users to administer their own public/private key pairs and associated certificates for use in self-authentication (where the user authenticates himself/herself to other users/services) or data integrity and authentication services, using digital signatures. It also allows users to cache the public keys (in the form of certificates) of their communicating peers.

1325 questions
13
votes
3 answers

Generate private and public key file using keytool

I want to know if there is a way to create .key file for (public and private key) using keytool , I understand that we can generate a keystore using below command keytool -genkeypair -keysize 2048 -keyalg RSA -alias appalias -keystore D:\..\.. which…
user3185729
  • 216
  • 1
  • 3
  • 10
13
votes
1 answer

SSL Exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown

I have created a SSLClient and SSLServer and also created the keystore as "server.jks" for SSLServer and "client.jks" for SSLClient. firstly i executed SSLServer.java file and after that when i am executing SSLClient.java file. It's throwing an…
Krishna
  • 795
  • 2
  • 7
  • 24
13
votes
3 answers

What is the significance of "key password" in keystore using keytool

I used following command to generate the jks for my web app. keytool -genkey -keyalg RSA -alias my-app -validity 10800 -keysize 2048 -sigalg SHA1withRSA -keystore myapp.jks This command prompted some questions as below: Enter keystore…
G.S
  • 10,413
  • 7
  • 36
  • 52
13
votes
3 answers

Should we point KeyStore and TrustStore to the same .jks file?

I am using SSL handshaking to connect to a URL. To do that, i generated a .csr file and got it signed. After signing i created a my.jks file with 3 entries in it Signed Client Cert Private Key CA I use jetty as server and i have exclusively set…
coderslay
  • 13,960
  • 31
  • 73
  • 121
13
votes
4 answers

intelliJ idea java certificate

I installed SSL certificate for Jira to Java via keytool. Actually i am using playframework 2 for development and if I use play terminal to compile and run project, everything is fine. The problem appears when I want to use debugger from IntelliJ…
Szalai Ladislav
  • 161
  • 1
  • 1
  • 7
13
votes
1 answer

IP address as hostname (CN) when creating a certificate? (HTTPS hostname wrong: should be )

Possible Duplicate: How are SSL certificate server names resolved/Can I add alternative names using keytool? I created a certificate and set the CN to the IP address of my server which is in xxx.xxx.xxx.xxx format. But when I try to run my code…
Arci
  • 6,647
  • 20
  • 70
  • 98
12
votes
3 answers

".android" folder and "debug.keystore" file missing

am using Linux opensuse, eclipse helios package i have to import google maps in my application for which i need an API key, so in order to get the api key i need to get the MD5 sum value which has to be got by running the debug.keystore file using…
D3vil_Mind
  • 339
  • 2
  • 3
  • 13
12
votes
1 answer

how to sign APK with google upload key der file?

after importing the der file to the key store as follow keytool -keystore my-release-key.keystore -importcert -file ~/Downloads/upload_cert.der -alias uploadcert I get an error when trying to assemble release APK trusted certificate…
Nabil Sham
  • 2,305
  • 4
  • 26
  • 38
12
votes
2 answers

How to generate, sign and import SSL certificate from Java

Possible Duplicate: Generate certificates, public and private keys with Java I need to generate a self signed certificates at run time, sign them and import to the Java keystore. I can do this using "keytool" and "openssl" from command line in…
Demiurg
  • 1,597
  • 8
  • 26
  • 40
12
votes
2 answers

Verify certificate against Java certificate store via CLI

How can I verify an X509 (or DER-formatted) certificate against the Java certificate store via the command line? I've looked into using the keytool utility, but it looks like it only handles import/export/display functionality (no…
Brian
  • 3,457
  • 4
  • 31
  • 41
12
votes
1 answer

How do I import a PKCS12 certificate into a java keystore?

I have a certificate in PKCS12 format. How do I import it into a java keystore file?
Darren
  • 2,888
  • 1
  • 23
  • 34
12
votes
3 answers

Why is fingerprint different in my newly signed apk?

I'm having an issue getting the same fingerprint after I changed the type of keystore from PKCS12 to JKS. In order to make the change I created a new JKS keystore, deleted the key that was in it, and imported the key I need from the .p12 file. When…
Jimbo145
  • 133
  • 8
12
votes
1 answer

keytool -list shows different aliases for p12 keystore, depending on whether you provide the password

Really weird behaviour on a particular p12 file. If I run keytool -list -storetype pkcs12 -keystore my_debug_keystore.p12 -storepass debug keytool -v -list -storetype pkcs12 -keystore my_debug_keystore.p12 -storepass debug I get, Alias name:…
seaders
  • 3,878
  • 3
  • 40
  • 64
12
votes
3 answers

Error while Importing public certificate to a keystore

I have a public certificate from a CA. I want to create a Java SSL connection using this certificate. I referred How can I use different certificates on specific connections? and Java SSL connection with self-signed certificate without copying…
DanMatlin
  • 1,212
  • 7
  • 19
  • 37
12
votes
3 answers

Generate an "expired" SSL certificate with keytool

I am creating my keystore with following command: keytool -genkey -keystore myStore.keystore -keyalg RSA -keysize 1024 -alias myAlias How could I generate one with a past expiry date (the use of this? I want to test the behavior of my app with an…
ptpdlc
  • 2,373
  • 6
  • 22
  • 33