keytool

Can't change the keystore format

ε祈祈猫儿з 提交于 2019-12-04 08:42:27
问题 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 it shows me this warning: Warning: The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using "keytool -importkeystore -srckeystore server.private -destkeystore server.private

How to import a jks certificate in java trust store

孤者浪人 提交于 2019-12-04 08:17:26
How do I import a .jks file into the java security's truststore? All the tutorial I'm seeing is using a ".crt" file. However, I only have the ".jks" file which is also the keystore I generated using the keytool command. Currently, I'm following this tutorial . I was able to generate a Java keystore and key pair and generate a certificate signing request (CSR) for an existing Java keystore, which is based on the tutorial. But I cannot import a root or intermediate CA certificate to an existing Java keystore, and import a signed primary certificate to an existing Java keystore, because it is

Trying to refresh 'expired' keystore

孤街醉人 提交于 2019-12-04 06:20:55
I am trying to re-sign some jars using the ant task 'signjar' however it's telling me "The signer certificate has expired." So I tried to re-generate the keystore hoping this would 'un-expire' it... keytool -genkey -keystore mykeystore -alias myalias but after entering the keystore password i get: "keytool error: java.lang.Exception: Key pair not generated, alias already exists" what am i doing wrong? do i need to delete the keystore to re-generate it or is there a simple way to refresh it so it's not expired? thanks. maaartinus You're mixing up the terms. A keystore contains keys, a key is

MD5 missing from `keytool` command when fired for APK

痴心易碎 提交于 2019-12-04 06:16:09
问题 Usually I fetch Android Package (APK) Certificate information using the below command : keytool -printcert -jarfile <APK> but recently I have noticed that MD5 column is missing from the output. I just get SHA1 and SHA256 as seen in output below : Getting Certification Info. --------------------- Owner: CN=XYZ Issuer: CN=XYZ Serial number: 4e98b743 Valid from: Wed Mar 13 16:46:46 IST 2019 until: Sun Mar 06 16:46:46 IST 2044 Certificate fingerprints: **SHA1**: A5:32:37:D5:5B:31:6B:B2:09:48:BA

Renew certificate with Java Keytool - reuse old CSR?

丶灬走出姿态 提交于 2019-12-04 06:08:43
I have an SSL certificate in a Java keystore. It's going to expire in a week or so and I need to renew it. Can I reuse the previous CSR (which the CA still have) and then import the certificate using the import command or do I need to generate a new CSR? You can (if your CA doesn't check for public key reuse), but it's a bad security practice. The primary purpose of the validity period is to limit the time in which a certificate and associated private key is exposed to the possibility of being compromised. 来源: https://stackoverflow.com/questions/2787653/renew-certificate-with-java-keytool

Using Client SSL in a Ruby on Rails App

强颜欢笑 提交于 2019-12-04 06:01:55
I'm working on an app for a client that requires an SSL connection with an API. I've been provided with three files; a trust root certificate (.cer) file, an intermediate certificate (.cer) file and a signed response file. The instructions I've been given to install this relate to either IIS or the Java keytool program; I'm building the app in Ruby on Rails so neither is an option (as far as I am aware). The certificates are self-signed by the organisation who runs the API service and it appears I get given client certificates to mutually authenticate an https connection. I'm unsure how to use

Permission error when importing certificate to cacerts

孤街浪徒 提交于 2019-12-04 05:50:56
I need to import a certificate for some maven repositories into the global keystore. The certificate file is named maven.crt so the command I am running is keytool -import -keystore $JAVA_HOME/jre/lib/security/cacerts -trustcacerts -alias maven -file maven.crt It asks me for password and then if I trust the certificate to which I answer yes This is the final output Certificate was added to keystore keytool error: java.io.FileNotFoundException: /usr/java/jdk1.7.0_40/bin/java/jre/lib/security/cacerts (Not a directory) I ran this command as root so I don't know why I am receiving permissions

由java派生出来的证书错误

…衆ロ難τιáo~ 提交于 2019-12-04 04:57:40
未安装请求对应接口证书时的异常:> javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 软件组的同事在进行软件升级时出现如上错误,查看其错误,初步判断其未安装java的jdk包和公司证书导致而成 解决方法: 安装jdk软件 1、下载linux的jdk版本 #mkdir /application && cd /application # wget https://download.oracle.com/otn/java/jdk/11.0.5+10/e51269e04165492b90fa15af5b4eb1a5/jdk-11.0.5_linux-x64_bin.tar.gz?AuthParam=1571751391_d13df5b618e17c92b768f1f09a9ead41 2、安装jdk 这里下载的是tar.gz二进制版本,只需要解压就可以使用了 #mkdir -p /usr

SSL Exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown

[亡魂溺海] 提交于 2019-12-04 03:24:12
问题 I have created a SSLClient and SSLServer and also created the keystore as "server.jks" for SSLServer and "client.jks" for SSLClient. firstly i executed SSLServer.java file and after that when i am executing SSLClient.java file. It's throwing an exception " javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown " . i do not know why i am getting this exception. i followed http://ruchirawageesha.blogspot.in/2010/07/how-to-create-clientserver-keystores.html to create

How to use keytool in Oracle JDK 7 in ubuntu?

对着背影说爱祢 提交于 2019-12-03 21:39:29
I need a MD5 certificate to use in MapView in android. I have JDK 7 from Oracle installed. But running keytool -v -list -alias alias_name -keystore my-release-key.keystore is not giving me the result, instead it says to install openjdk. How to use the keytool in oracle jdk 7. And i am on ubuntu 12.04 64 bit. You can use keytool by doing this: cd /usr/lib/jvm/jdk1.7.0/bin ./keytool -v -list -alias alias_name -keystore my-release-key.keystore Keytool is not in your path by default, but it does not have to be in your path to be usable. Looks like your jdk installation has problems. Check to see