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
15
votes
3 answers

Answer password to keytool in batch files

i need use keytool and jarsigner to sign a lot o files here in many folders. Each time i start sign theses files i need delete the .cert and keystore file to recreate it. Im on development enviroment and using fake passwd to sign it, after…
ZenfStor
  • 151
  • 1
  • 1
  • 4
15
votes
3 answers

keytool error: java.io.IOException: parseAlgParameters failed: ObjectIdentifier() -- data isn't an object ID (tag = 48)

I am trying to generate keystore using keytool and getting below error - D:\Java\bin>keytool -importkeystore -srckeystore cert1.p12 -srcstoretype pkcs12 -destkeystore cert1.keystore -deststoretype JKS Enter destination keystore password: Re-enter…
user9082786
15
votes
1 answer

IOException in Java 8 when reading PKCS12 keystore created with keytool from OpenJDK16

TL;DR keytool from OpenJDK16 creates PKCS12 keystore files that cannot be read from Java 8, 9, 10 and 11. Is this a bug? How to create a PKCS12 keystore that works with Java 8? Context I build a Maven project which produces an executable JAR file…
Bertrand Martin
  • 533
  • 1
  • 3
  • 16
15
votes
3 answers

keytool with Android Facebook SDK

I just want some confirmation. I'm developing on windows I'm attempting to integrate facebook into an app and the SDK documentation says I need to 'export a signature' From here: http://developers.facebook.com/docs/guides/mobile/#android So it says…
Blundell
  • 75,855
  • 30
  • 208
  • 233
15
votes
2 answers

Can't change the keystore format

I'm trying to make some keystores using keytool from the latest JRE (version 1.8.0_151). When I create the keystore using this command keytool -genkey -alias serverprivate -keystore server.private -keyalg rsa -storepass apassword -keypass apassword…
Conner Dassen
  • 729
  • 4
  • 11
  • 28
15
votes
1 answer

keytool import certificate java.util.IllegalFormatConversionException in linux

I am tring to create a keystore to be used in tomcat but I get the error "java.util.IllegalFormatConversionException: d != java.lang.String" using keytool. This happens only in linux (centos7) but not in windows. I created the keystore with keytool…
user2959635
  • 220
  • 1
  • 2
  • 9
15
votes
5 answers

Keytool Signing Problem: Keystore was tampered with, or password was incorrect

I am trying to sign the release version of my Android app (debug was signed fine) for the Google Maps API: keytool -list -alias cancertrials -keystore /Users/syalam/Documents/workspace/Cancer_Trials/keys/release -storepass android -keypass…
Sheehan Alam
  • 60,111
  • 124
  • 355
  • 556
14
votes
3 answers

Convert CA-signed JKS keystore to PEM

I have a JKS keystore with certicate signed by CA. I need to export it in PEM format in order to use it with nginx. I need to do it in such a way that it includes the whole chain, so that my client can verify the signature. If I do something…
Konrad Garus
  • 53,145
  • 43
  • 157
  • 230
14
votes
2 answers

AndroidDebugKey Keystore was tampered with, or password was incorrect

Whenever I enter in the terminal: keytool -list -alias androiddebugkey -keystore ~/.android/debug.keystore -storepass android -keypass android It asks me for a password. I've never set a password before. I've read somewhere else to put in "android"…
basheps
  • 10,034
  • 11
  • 36
  • 45
14
votes
3 answers

Generating hash string for google sms retriever api - 'xxd' is not recognized as an internal or external command

After the google's new policy regarding SMS and Call log permissions, I am trying to implement SMS retriever API for my android application. The tutorial seems easy but I found a problem while creating/generating hash for the same. When I…
Khan Sharukh
  • 1,151
  • 12
  • 21
13
votes
3 answers

java keytool with opensc pkcs#11 provider only works with debug option enabled

I have the latest opensc 0.12.2 running on ubuntu 11.10 with OpenJDK ( java version "1.6.0_22") I can read my smartcard (a Feitian ePass PKI) with pkcs15-tool --dump Now i try to use my smartcard with keytool: keytool -providerClass…
Janning Vygen
  • 8,877
  • 9
  • 71
  • 102
13
votes
3 answers

How to export public key from .jks file using Keytool?

Right now I'm just trying to change my hostname in WSO2 by following this guide: https://docs.wso2.com/display/IS550/Changing+the+hostname I've come to Step 4 after generating a .jks file called newkeystore.jks and in this step it should export the…
SaltySea
  • 700
  • 1
  • 7
  • 21
13
votes
3 answers

Is there a way to make keytool not prompt for password for the key?

I am trying to generate a keystore. I have set a password for the keystore but I am trying to not set a password for the key. keytool -storepass "$password" -keystore ${PFX_broker}server.keystore.jks -alias $brokerCertAlias -validity $validity…
Dikshant Adhikari
  • 664
  • 1
  • 10
  • 24
13
votes
2 answers

What is the purpose of a .jks keystore?

I've been asked to create a jks keystore based on a certificate we had created. I've read a bit on the topic, but I'm still confused on a few items: Is the private key of a certificate supposed to be stored in a .jks keystone? If yes - where does…
user6448130
13
votes
3 answers

Android App transfer to other developer

There's a developer interested in purchasing one of my apps (the only one that actually have users), meaning I would need to send him the original source code, the keystore and request Google for a transfer following this link:…
Budius
  • 39,391
  • 16
  • 102
  • 144