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
301
votes
6 answers

Trust Store vs Key Store - creating with keytool

I understand that the keystore would usually hold private/public keys and the trust store only public keys (and represents the list of trusted parties you intend to communicate with). Well, that's my first assumption, so if that's not correct, I…
Toby
  • 9,523
  • 8
  • 36
  • 59
289
votes
17 answers

Unable to find valid certification path to requested target - error even after cert imported

I have a Java client trying to access a server with a self-signed certificate. When I try to Post to the server, I get the following error: unable to find valid certification path to requested target Having done some research on the issue, I then…
TheCoder
  • 8,413
  • 15
  • 42
  • 54
273
votes
3 answers

How to view the contents of a .pem certificate?

I am using Java keytool. I have exported a self-signed .pem certificate from my keystore. Is there a command to view the certificate details directly from the .pem file (not of the certificate in the keystore)?
Ashwin
  • 12,691
  • 31
  • 118
  • 190
272
votes
10 answers

I can’t find the Android keytool

I am trying to follow the Android mapping tutorial and got to this part where I had to get an API key. I have found my debug.keystore but there does not appear to be a keytool application in the directory: C:\Documents and…
Tim
  • 2,965
  • 3
  • 18
  • 12
262
votes
18 answers

Accept server's self-signed ssl certificate in Java client

It looks like a standard question, but I couldn't find clear directions anywhere. I have java code trying to connect to a server with probably self-signed (or expired) certificate. The code reports the following error : [HttpMethodDirector] I/O…
Nikita Rybak
  • 67,365
  • 22
  • 157
  • 181
256
votes
24 answers

How can I find and run the keytool

I am reading an development guide of Facebook Developers at here It says that I must use keytool to export the signature for my app such as: keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary |…
Nguyen Minh Binh
  • 23,891
  • 30
  • 115
  • 165
219
votes
23 answers

Openssl is not recognized as an internal or external command

I wish to generate an application signature for my app which will later be integrated with Facebook. In one of Facebook's tutorials, I found this command: keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1…
Khurram W. Malik
  • 2,660
  • 2
  • 20
  • 27
213
votes
33 answers

ERROR:'keytool' is not recognized as an internal or external command, operable program or batch file

When I use the command: C:\>keytool -list -alias androiddebugkey -keystore .android\debug.keystore -storepass android -keypass android I get this error: 'keytool' is not recognized as an internal or external command,…
Shalini
  • 2,195
  • 2
  • 14
  • 13
190
votes
13 answers

How to properly import a selfsigned certificate into Java keystore that is available to all Java applications by default?

I do want to import a self signed certificate into Java so any Java application that will try to establish a SSL connection will trust this certificate. So far, I managed to import it in keytool -import -trustcacerts -noprompt -storepass changeit…
sorin
  • 161,544
  • 178
  • 535
  • 806
180
votes
14 answers

Java Keytool error after importing certificate , "keytool error: java.io.FileNotFoundException & Access Denied"

I'm trying to connect a Java Web API via HTTPS; however, an exception is thrown: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException I followed these steps which I learned from online keytool & SSL cert tutorials: I…
cyber101
  • 2,822
  • 14
  • 50
  • 93
167
votes
10 answers

Where is the Keytool application?

I need to use mapview control in android and I can't seem to understand how to run keytool. Is it installed with eclipse? I can't seem to find a download link. Thanks
Amit Raz
  • 5,370
  • 8
  • 36
  • 63
158
votes
10 answers

How do I find out what keystore my JVM is using?

I need to import a certificate into my JVM keystore. I am using the following: keytool -import -alias daldap -file somecert.cer so I would need to probably change my call into something like: keytool -import -alias daldap -file somecert.cer…
Strong Like Bull
  • 11,155
  • 36
  • 98
  • 169
146
votes
6 answers

I have never set any passwords to my keystore and alias, so how are they created?

As I was going through some posts on the Internet learning more about signing your Android app, I got post like how to sign the app, and something about what if you have lost your keystore file or password. The question I am here to ask is that, I…
Anas Azeem
  • 2,820
  • 3
  • 24
  • 37
142
votes
7 answers

How to convert .pfx file to keystore with private key?

I need to sign Android application (.apk). I have .pfx file. I converted it to .cer file via Internet Explorer and then converted .cer to .keystore using keytool. Then I've tried to sign .apk with jarsigner but it says that .keystore doesn't content…
Ola
  • 1,517
  • 2
  • 12
  • 12
133
votes
5 answers

How do I get into a non-password protected Java keystore or change the password?

I'm trying to import a trusted certificated into the Java cacerts keystore, but I have a problem. I tried to list existing trusted certificates and it seems that the keystore isn't password protected. $ keytool -list -keystore cacerts Enter…
Eslam
  • 1,623
  • 2
  • 12
  • 18
1
2 3
88 89