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
24
votes
7 answers

Enable HTTPS with self-signed certificate in Spring Boot 2.0

I'm following this tutorial to enable HTTPS in Spring Boot 2.0 using a self-signed certificate, just for testing purpose. In summary, that tutorial includes these steps: 1.Generate the keystore using keytool. keytool -genkey -alias tomcat …
Triet Doan
  • 11,455
  • 8
  • 36
  • 69
24
votes
1 answer

Merge 2 .jks truststore files

I am using a Tomcat that is SSL enabled, using truststores for client authentication. I have two .jks trustore files. The first, I use it for the PROD environment and the other for the TEST environment client certificates. I deploy the web…
nikkatsa
  • 1,751
  • 4
  • 26
  • 43
24
votes
3 answers

how to delete 2 alias entries from keystore?

I have imported multiple certificates(with alias name) into pc.keystore. I want to delete 2 aliases (mydomain and ourdomain) entries from the keystore. I know we can delete one entry from keystore using alias like: keytool -delete -alias mydomain…
Mohan
  • 351
  • 1
  • 2
  • 4
23
votes
7 answers

Find the key hash for a signed app

I have signed my app and exported it to a folder on my desktop called app in this folder is my app itself and the keystore. How do i find the key hash that i can copy into the facebook developers page. i have openssl installed but cant seem to…
James
  • 486
  • 1
  • 9
  • 24
23
votes
4 answers

Imported certificate to Java keystore, JVM ignores the new cert

I'm trying to get an application running on top of Tomcat 6 to connect to an LDAP server over SSL. I imported certificate of the server to keystore using: C:\Program Files\Java\jdk1.6.0_32\jre\lib\security>keytool -importcert -trustcacerts -file…
tputkonen
  • 5,579
  • 16
  • 60
  • 88
22
votes
7 answers

java.lang.Exception: Public keys in reply and keystore don't match

I have to access a webservice hosted at port 443.Service provider has shared three certificate with us. ABCD.cer CA_Certificate.cer CCA_Certificate.cer I have to add them to keystore by creating a form chain for the SSL communication.I have…
dReAmEr
  • 6,986
  • 7
  • 36
  • 63
22
votes
1 answer

openssl fails to produce a pfx with a valid alias

I am trying to generate a pfx file to use as a signing mechanism for some JAR files as per these instructions. To create the pfx file I am using the following command openssl pkcs12 -export -in my-cert.crt -inkey my-priv-key.key -certfile…
user3198232
  • 223
  • 1
  • 2
  • 4
22
votes
2 answers

keytool : Certificate import gives error message - Keystore was tampered with, or password was incorrect

My goal is to generate a certificate, export it in a file and import in JDK keystore. In first step I have generated a self signed certificate using following command, providing password as 'password' for keystore and key: keytool -genkeypair …
Kalher
  • 3,613
  • 2
  • 24
  • 34
21
votes
3 answers

Keytool alias does not exist

I am trying to get my debug.keystore md5 key so I can get the API key for Google Maps. I run the command: keytool –genkeypair -alias armand -keypass pass And then running the command: keytool -list -alias armand -keystore debug.keystore I then…
Armand
  • 9,847
  • 9
  • 42
  • 75
21
votes
2 answers

How to convert .p12 to .crt file?

Can anyone tell me the correct way/command to extract/convert the certificate .crt file from a .p12 file? After I searched. I found the way how to convert .pem to .crt. but not found .p12 to .crt.
user3130007
  • 663
  • 3
  • 8
  • 17
21
votes
1 answer

Self-signed certificate: DNSName components must begin with a letter

Is there a way for java's keytool to generate self-signed certificate with a wildcard in SAN (Subject Alternative Name)? I'm using this command to generate keystore: keytool -genkey -alias tomcat -storetype JKS -keyalg RSA -keysize 2048 -ext…
zkristic
  • 629
  • 1
  • 9
  • 24
21
votes
5 answers

PKIX Path does not chain with any of the trust anchors error in Windows Environment

I am a bit of an idiot to how SSL and Webservices work at the fine-grained level. I am developing a system that calls several web services, some with secured URLs and others that are not with little problem. Currently, however, I am doing an…
IcedDante
  • 6,145
  • 12
  • 57
  • 100
21
votes
1 answer

How do I generate a "Keystore" for Google Play?

I am trying to figure out the Byzantine process for uploading an app to Google Play. I'm using Phonegap's Applaud system for generating my app, and in order for me to create a "release build", I need to have generated a "Keystore". However, when I…
Questioner
  • 7,133
  • 16
  • 61
  • 94
20
votes
3 answers

KeyTool error : java.lang.Exception : Alias does not exist

I have sucessfully imported the certificate by below command: keytool -import -alias "alias-name" -file "C:\somepath\Certificate\portal.cer -keystore C:\Program Files\Java\jdk1.7.0_79\jre\lib\cacerts" Now I am trying to delete the imported…
Subodh Joshi
  • 12,717
  • 29
  • 108
  • 202
20
votes
3 answers

Adding certificate to keystore using java code

I'm trying to establish a https connection using the server's .cer certificate file. I am able to manually get the certificate file using a browser and put it into the keystore using keytool. I can then access the keystore using java code, obtain…
Rohit
  • 523
  • 2
  • 6
  • 25