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
10
votes
2 answers

How to extract certificate from .p12 (PFX) file using KEYTOOL commands

I want to extract certificate from a .p12 file. I can't use openssl as it is not allowed in my organization. Is keytool able to extract the certificate, or is there any other way by which I can get this certificate extracted? Do I require the…
Vaibhav Dwivedi
  • 115
  • 1
  • 3
  • 8
10
votes
1 answer

keytool -genkey runs in a loop to generate .keystore file

I invoked this on cmd: keytool -genpair -v - keystore myrelease.keystore -keyalg RSA - keysize 2048 -validity 1000 The tool runs, asks the questions, and then loops again to the questions. It doesn´t generate the .keystore. Please help. I can´t…
Pierre Schiller
  • 201
  • 2
  • 5
10
votes
2 answers

What should I use for "Distinguished Name" in our Keystore for the Android Market

I'm about to release an application in the Android Market. I need to generate a keystore to sign my application. The docs are a little spares on what I'm support to put into for the -dname param. Here is the line I'm using: keytool -genkey -v -alias…
christophercotton
  • 5,829
  • 2
  • 34
  • 49
10
votes
3 answers

Create java keystore from private key and CA certificate bundle

I am new to configure Jetty Server for SSL. I followed steps from digcert I created private key file, Certificate Request CSR file. I sent Certificate Request to CA and got my signed CSR back. But CA sent me a bundle with two certificates, one is…
madhu_karnati
  • 785
  • 1
  • 6
  • 22
10
votes
1 answer

Getting "No certificate matches private key"

This is the sequence of commands I tried: a. Extract an existing certificate key from the store: keytool -v -importkeystore -srckeystore keystore -srcalias one -destkeystore temppp -deststoretype PKCS12 -srcstorepass passwordd -deststorepass…
yair
  • 659
  • 2
  • 8
  • 26
10
votes
2 answers

keytool can't find alias

I've got a pfx certificate that I need to reference by alias. The problem is that keytool can't find that alias, even though it shows on the list. keytool -list -keystore temp.pfx -storetype pkcs12 gives me…
Andre
  • 3,874
  • 3
  • 35
  • 50
9
votes
1 answer

Import p7b file to Java Keystore using keytool

I'm trying to import a p7b file from a third party in to a java trust store. It looks like the p7b contains a root cert and a public key. I'm trying to import it using a command similar to keytool -importcert -file certs.p7b -keystore dave.jks…
DaveH
  • 7,187
  • 5
  • 32
  • 53
9
votes
6 answers

Keystore password for Jetty 7.0 SSL configuration

Trying to setup SSL on jetty 7.2.2 using these instructions: http://docs.codehaus.org/display/JETTY/How+to+configure+SSL stuck on 3b: keytool -importkeystore -srckeystore jetty.pkcs12 -srcstoretype PKCS12 -destkeystore $JETTY_HOME/etc/keystore jetty…
Archer
  • 5,073
  • 8
  • 50
  • 96
9
votes
1 answer

What is the difference between keytool command's import and -importcert

I was told to add a certificate (.crt format) to the keystore file using keytool command. What option need to be used here, import or -importcert. When is each one used?
Java Explorer
  • 93
  • 1
  • 5
9
votes
2 answers

Should keystore password be same as PKCS12 certificate password?

I am trying to import PKCS12 certificate using keytool in java. It works fine only when the keystore password is the same as certificate password. Is it mandatory to use the PKCS12 certificate password for keystore as well?
user5478656
  • 266
  • 1
  • 2
  • 9
9
votes
1 answer

Only RSAPrivate (Crt) KeySpec and PKCS8EncodedKeySpec supported for RSA private keys

I following the steps from the link : How to read .pem file to get private and public key. I executed the following three commands: 1. $openssl genrsa -out mykey.pem 2048 2. $openssl pkcs8 -topk8 -inform PEM -outform PEM -in mykey.pem -out…
user5707585
9
votes
3 answers

keytool error: java.lang.Exception: Input not an X.509 certificate

I am trying to import Gmails smtp certificate for use with Jira, but I get this error when importing using Javas keytool. I used openssl to get the certificate, everything between ----Begin Certificate---- and ----End Certificate---- (inclusive). I…
dbbooh01
  • 105
  • 1
  • 2
  • 5
9
votes
1 answer

Android Development: Keytool, creating a keystore?

I am trying to prepare my app for the google market, but it is proving a lot more challenging than expected. I cannot seem to grasp the whole concept of signing the app, but to be more specific my problem is that I have installed the keytool plugin…
Oliver
  • 821
  • 5
  • 12
  • 28
9
votes
2 answers

Import PKCS7 (Chained Certificate) using KeyTool command to JKS

I have a CA issued CERT in PKCS#7 format. It has certificates (chained) within it. Keytool does not recognize the PKCS7 format. I have tried OpenSSL tool to convert PKCS7 format certificate to PEM format and it fails. I receive an error message…
Rohit Sharma
  • 91
  • 1
  • 1
  • 2
9
votes
2 answers

java.lang.Exception: Input not an X.509 certificate :keytool error

I want to activate https in tomcat 6. When I import the SSL certificate then I got below stated error : keytool error: java.lang.Exception: Input not an X.509 certificate How can I solve this error??
user1865629
  • 91
  • 1
  • 1
  • 5