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
12
votes
5 answers

PFX to JKS keytool conversion: Alias <*> does not exist

I'm trying to convert x.PFX file to x.JKS file using keytool but I am getting following error: keytool error: java.lang.Exception: Alias <2> does not exist Actions that preceded this error are: Listing x.PFX file content (just to read alias name):…
mrle
  • 311
  • 1
  • 5
  • 13
12
votes
1 answer

keytool cannot import certifiate - failed to establish chain from reply

I would really appreciate if someone could shed some light on the following issue. I have read the keytool documentation but could not find any hint regarding what could be the problem here. I created a keystore keytool -genkey -alias…
Nikola Kolev
  • 1,239
  • 3
  • 17
  • 25
11
votes
1 answer

Keystore password is too short - must be at least 6 characters for import

I wanted to use https://stackoverflow.com/a/7094044/384674 for importing pem into p12, but keystore password is 5 characters and keytool is complaining it needs to be 6 :-/ keytool -import -alias alias -keystore ./trust.p12 -storetype PKCS12 -file…
Betlista
  • 10,327
  • 13
  • 69
  • 110
11
votes
5 answers

Problem running my signed, release keystore in Eclipse

I am unable to run my signed, release keystore in Eclipse: I get the error: Keystore was tampered with, or password was incorrect How can I resolve this? Here is the error: Here is me successfully signing the keystore:
Sheehan Alam
  • 60,111
  • 124
  • 355
  • 556
11
votes
2 answers

How to create keystore and truststore using self-signed certificate?

We have JAVA server and client communicate over network using SSL. The server and client mutually authenticate each other using certificates. The keystore type used by server and client is JKS. The keystore and truststore file names for the server…
vic99
  • 131
  • 1
  • 1
  • 4
11
votes
1 answer

Can I create a Java trust store without a password using keytool?

I want to connect to a TLS server with a self-signed certificate, so I need a custom trust store. keytool seems to absolutely require a password in order to import the certificate, but I really don't need to password-protect the trust store. Using…
Christopher Schultz
  • 20,221
  • 9
  • 60
  • 77
11
votes
2 answers

How to see a certificate keysize using keytool?

When the certificate is created it is possible to configure -keysize option for command genkeypair. Is it possible to see a certificate keysize using keytool? I have tried these options without success: keytool -list –rfc keytool -list –v Was…
Michael
  • 10,063
  • 18
  • 65
  • 104
11
votes
2 answers

Keytool change key password using 'keypasswd' throws 'Alias has no key' error

I am trying to change the password of the private key in my keystore. Doing the following: keytool -keypasswd -alias -keystore I get: Enter keystore password: Which returns: keytool error:…
arockburn
  • 161
  • 1
  • 6
11
votes
1 answer

Keytool error : Keystore was tampered with... Special characters

I know there are already a few posts about this error, but I couldn't find an answer fitting my problem : I created an AES key with the following command : keytool -genseckey -alias TEST -keyalg AES -keysize 128 -storepass "a#b$c" -storetype…
realUser404
  • 2,111
  • 3
  • 20
  • 38
11
votes
2 answers

Can I modify a private key validity?

I'm a newbie in computer security and I have a basic question whose answer I've not been able to find out. I have a private key whose validity period has expired. Using that key I'd previously generated a .csr and sent it to a CA and they'd given me…
user1031431
  • 1,475
  • 6
  • 17
  • 24
11
votes
1 answer

Newbie keytool command -- how to update cert already added to keystore?

I have a self-signed cert for my linux email server exim. To enable my Java functions to access this email server via GlassFish, I originally issued: # keytool -importcert -v -noprompt -alias mail.mycompany.com -file /path/to/mail.mycompany.com.der…
ggkmath
  • 4,188
  • 23
  • 72
  • 129
11
votes
9 answers

Google maps not showing on android in release mode

I am trying to release my app, but having a problem with google maps. The app contains an activity (MapActivity) that displays a map. When running in debug mode, the map works fine. I signed my app in release mode, and got SHA1. I created a new…
10
votes
2 answers

Android KeytoolException: Failed to read key AndroidDebugKey lengthTag=109, too big

I've been trying to generate an .apk (debug or release) and I've been getting this error: com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "/home/note-300/.android/debug.keystore":…
yasin
  • 1,297
  • 3
  • 17
  • 36
10
votes
1 answer

Can't import existing keystore to Visual Studio 2017

I am having trouble importing an existing keystore to Visual Studio 2017 (15.7.2) in order to sign my Xamarin.Android application. I switched machines, so I had to do a fresh VS installation. I have successfully created an archive, but I can't get…
Deeq
  • 103
  • 1
  • 5
10
votes
2 answers

Cannot update release APK using Google Play app signing upload certificate (with original keystore)

I was trying to update a release on Google Play. Upon uploading my signed APK, I received this error message in the Google Play Console: You uploaded an APK that is not signed with the upload certificate. You must use the same certificate. The…