Questions tagged [keystore]

In Java, a keystore is a repository of security certificates, either authorization certificates or public key certificates

The keystore file is a key database file that contains both public keys and private keys. Public keys are stored as signer certificates while private keys are stored in the personal certificates. The keys are used for a variety of purposes, including authentication and data integrity.

2762 questions
716
votes
12 answers

How can I create a keystore?

What are the steps to create a keystore for android? I need to use google maps in my app and I don't know what steps I missed. Please provide me with the specific detailed steps (I didn't understand it from the guides).
user482762
  • 7,183
  • 4
  • 16
  • 6
607
votes
12 answers

How to check certificate name and alias in keystore files?

I have a bunch of .keystore files and need to find one with specific CN and alias. Is there a way to do it with keytool, jarsigner or some other tool? I found a way to check if specific keystore was used to sign a specific apk, but I also need to…
Malthan
  • 7,005
  • 3
  • 20
  • 22
321
votes
3 answers

Difference between .keystore file and .jks file

I have tried to find the difference between .keystore files and .jks files, yet I could not find it. I know jks is for "Java keystore" and both are a way to store key/value pairs. Is there any difference or a preference to use one over another?
juveria
  • 3,221
  • 2
  • 14
  • 5
318
votes
7 answers

Truststore and Keystore Definitions

What's the difference between a keystore and a truststore?
Rob Wright
  • 3,374
  • 2
  • 18
  • 12
311
votes
8 answers

Keystore change passwords

I currently have a keystore, with a particular password that only I should know. I now need to give access to that keystore to someone else, so I would like to either: 1) Change the password, so I can share it with others and let them sign 2) Create…
user313724
  • 3,425
  • 4
  • 19
  • 15
304
votes
10 answers

How to import a .cer certificate into a java keystore?

During the development of a Java webservice client I ran into a problem. Authentication for the webservice is using a client certificate, a username and a password. The client certificate I received from the company behind the webservice is in .cer…
Jan-Pieter
  • 3,305
  • 3
  • 15
  • 7
278
votes
24 answers

keytool error Keystore was tampered with, or password was incorrect

I am getting following error while generating certificates on my local machine. C:\Users\abc>keytool -genkey -alias tomcat -keyalg RSA Enter keystore password: keytool error: java.io.IOException: Keystore was tampered with, or password was…
C4CodeE4Exe
  • 3,840
  • 8
  • 39
  • 46
214
votes
21 answers

Where is debug.keystore in Android Studio

I need to enable google+ api, so I need the debug.keystore. I switched to Android Studio and do not know where it is. I can find it in eclipse at path ~/.android/debug.keystore.
complez
  • 7,882
  • 11
  • 48
  • 56
193
votes
6 answers

SSL and cert keystore

How does my Java program know where my keystore containing the certificate is? Or alternatively: How do I tell my Java program where to look for the keystore? After specifying the keystore in some way, how to specify the certificate to use for…
deborah
  • 1,945
  • 2
  • 12
  • 6
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
189
votes
13 answers

Import PEM into Java Key Store

I am trying to connect to an SSL server which requires me to authenticate myself. In order to use SSL over Apache MINA I need a suitable JKS file. However, I have only been given a .PEM file. How would I go about creating a JKS file from a PEM…
jwoolard
  • 6,024
  • 9
  • 37
  • 37
174
votes
5 answers

How can I use different certificates on specific connections?

A module I'm adding to our large Java application has to converse with another company's SSL-secured website. The problem is that the site uses a self-signed certificate. I have a copy of the certificate to verify that I'm not encountering a…
skiphoppy
  • 97,646
  • 72
  • 174
  • 218
148
votes
5 answers

What is difference between cacerts and keystore?

What's the difference between the two, cacerts and keystore? If I use the definition found in these links, cacerts and keystore, it seems that they're a collection of certificates, but in context of a (Java) distributed system. Which one is used to…
dimas
  • 2,487
  • 6
  • 40
  • 66
142
votes
4 answers

What is Android keystore file, and what is it used for?

This is a general question, but particularly I am interested in it's use for Android. What is a keystore file, and what is it used for? Can multiple Android applications use the same keystore to sign their application (what exactly does it mean to…
Christopher Perry
  • 38,891
  • 43
  • 145
  • 187
137
votes
4 answers

Does Java support Let's Encrypt certificates?

I am developing a Java application that queries a REST API on a remote server over HTTP. For security reasons this communication should be switched to HTTPS. Now that Let's Encrypt started their public beta, I'd like to know if Java currently works…
Hexaholic
  • 3,299
  • 7
  • 30
  • 39
1
2 3
99 100