keytool

how to add subject alernative name to ssl certs?

穿精又带淫゛_ 提交于 2019-11-27 00:26:21
I'm using openssl to create self-signed certs. I'm getting this error with the certs I generated: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present Does anyone know how to specify "Subject alternative name" while creating a cert? This is how I'm generating a keystore: sudo $JAVA_HOME/bin/keytool -genkey -dname "CN=192.168.x.xxx, OU=I, O=I, L=T, ST=On, C=CA" -alias tomcat -validity 3650 -keyalg RSA -keystore /root/.keystore -keypass abcd -storepass abcd To generate a key: openssl s_client -connect 192.168.x.xxx:8443 2>/dev/null

I have never set any passwords to my keystore and alias, so how are they created?

谁都会走 提交于 2019-11-26 23:47:10
问题 As I was going through some posts on the Internet learning more about signing your Android app , I got post like how to sign the app , and something about what if you have lost your keystore file or password. The question I am here to ask is that, I have never created a keystore, or its alias, or its password, so how on this earth can I forget it? I know that for Android we use the password android , so, if the password is by default android how can one forget it? (I'm sure there must be some

How can i create keystore from an existing certificate (abc.crt) and abc.key files?

时间秒杀一切 提交于 2019-11-26 23:43:05
I am trying to import a certificate and a key file into the keystore but I'm unable to do that. How can I create a keystore by importing both an existing certificate (abc.crt) and abc.key files? The easiest is probably to create a PKCS#12 file using OpenSSL: openssl pkcs12 -export -in abc.crt -inkey abc.key -out abc.p12 You should be able to use the resulting file directly using the PKCS12 keystore type. If you really need to, you can convert it to JKS using keytool -importkeystore (available in keytool from Java 6): keytool -importkeystore -srckeystore abc.p12 \ -srcstoretype PKCS12 \

How to create a certificate with keytool?

流过昼夜 提交于 2019-11-26 22:00:58
问题 I've looked in 4 (yes, four) tutorials already and still don't get how to get this working. After setting a second HTTP listener configured for HTTPS in my Glassfish 4.1.1 server, I'm trying to create a certificate, so I don't get security errors in my browser. The problem is, that I just don't get keytool working proper; it just messes up and throws strange errors whatever I do. Per example, it doesn't find some of the commands that many guides recommend. I can guess that the tool changed in

Key hash for Facebook Android SDK

扶醉桌前 提交于 2019-11-26 21:31:37
I can't figure out how to get the Key Hash required to use the Facebook Android SDK. I figured out that I can use keytool with these commands: keytool -exportcert -alias [alias] -keystore [keystore] | openssl sha1 -binary | openssl enc -a -e The only problem is that I have no idea where to insert this, I tried through command windows (win7) and I tried opening the file keytool.exe. Pradyumna Swain Download and install OpenSSL from http://slproweb.com/products/Win32OpenSSL.html based on windows 32 or 64 bit.(Note: Download and install first visual C++ 208 redisributable from that site also )

Tomcat Server/Client Self-Signed SSL Certificate

倖福魔咒の 提交于 2019-11-26 21:18:49
I have an Apache Tomcat 6.x server running with a self-signed SSL certificate. I want the client to present their own certificate to the server so I can authenticate them based on a database of users. I have it all working based on an example I found online, but the example came with canned certificates and a pre-build JKS datastore. I want to create my own datastore with my own certs but am having no luck. How do I create a datastore for Tomcat? How do I create a self-signed certificate for Tomcat? How do I create a self-signed certificate for the client? How do I force Tomcat to trust the

How do I find out what keystore my JVM is using?

牧云@^-^@ 提交于 2019-11-26 19:40:23
I need to import a certificate into my JVM keystore. I am using the following: keytool -import -alias daldap -file somecert.cer so I would need to probably change my call into something like: keytool -import -alias daldap -file somecert.cer -keystore cacerts –storepass changeit Your keystore will be in your JAVA_HOME---> JRE -->lib---> security--> cacerts . You need to check where your JAVA_HOME is configured, possibly one of these places, Computer--->Advanced --> Environment variables---> JAVA_HOME Your server startup batch files. In your import command -keystore cacerts (give full path to

How to add certificate chain to keystore?

北战南征 提交于 2019-11-26 19:19:24
问题 I have file with chain of certificates - certificate.cer: subject=/C... issuer=/C=US/O=VeriSign, Inc... -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- subject=/C=US/O=VeriSign, Inc... issuer=/C=US/O=VeriSign, Inc... -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- subject=/C=US/O=VeriSign, Inc... issuer=/C=US/O=VeriSign, Inc... -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- I need to add this chain of certificates to keystore. What I do: openssl x509 -outform

How to convert .pfx file to keystore with private key?

怎甘沉沦 提交于 2019-11-26 19:15:48
I need to sign Android application ( .apk ). I have .pfx file. I converted it to .cer file via Internet Explorer and then converted .cer to .keystore using keytool. Then I've tried to sign .apk with jarsigner but it says that .keystore doesn't content a private key. What I'm doing wrong? Using JDK 1.6 or later It has been pointed out by Justin in the comments below that keytool alone is capable of doing this using the following command (although only in JDK 1.6 and later): keytool -importkeystore -srckeystore mypfxfile.pfx -srcstoretype pkcs12 -destkeystore clientcert.jks -deststoretype JKS

Java Keytool error after importing certificate , “keytool error: java.io.FileNotFoundException & Access Denied”

对着背影说爱祢 提交于 2019-11-26 18:54:42
问题 I'm trying to connect a Java Web API via HTTPS; however, an exception is thrown: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException I followed these steps which I learned from online keytool & SSL cert tutorials: I copied the HTTPS URL into the browser, downloaded the SSL certificates & Installed them in the browser using Internet Explorer. Exported the certificates to a path on my computer, the certificates were saved as .cer Used the keytool's import option. The