keytool

使用keytool生成3DES密钥

廉价感情. 提交于 2019-12-20 20:32:49
keytool 简介 keytool生成3DES密钥 C:\Program Files\Java\jre1.8.0_161\bin>keytool -genseckey -alias test-TDES -keyalg DESede -keysize 168 -storetype jceks -keystore key-TDES.store 输入密钥库口令: 再次输入新口令: 输入 <test-TDES> 的密钥口令 (如果和密钥库口令相同, 按回车): Warning: JCEKS 密钥库使用专用格式。建议使用 "keytool -importkeystore -srckeystore key-TDES.store -destkeystore key-TDES.store -deststoretype pkcs12" 迁移到行业标准格式 PKCS12。 查看密钥库: C:\Program Files\Java\jre1.8.0_161\bin>keytool -list -v -storetype jceks -keystore key-TDES.store 输入密钥库口令: 密钥库类型: JCEKS 密钥库提供方: SunJCE 您的密钥库包含 1 个条目 别名: test-tdes 创建日期: 2018-5-22 条目类型: SecretKeyEntry **********

Invalid Key hash with Facebook Android SDK

[亡魂溺海] 提交于 2019-12-20 15:25:55
问题 I'm trying to use Facebook Android SDK to develop a simple app with the Facebook Login Button. But i'm having trouble with Key Hashes. I've created both a debug key and a release key: Debug key: keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64 Release key: keytool -exportcert -alias <RELEASE_KEY_ALIAS> -keystore <RELEASE_KEY_PATH> | openssl sha1 -binary | openssl base64 And then i copied this key hashes in the Facebook

Convert CA-signed JKS keystore to PEM

僤鯓⒐⒋嵵緔 提交于 2019-12-20 10:34:40
问题 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 like: keytool -exportcert -keystore mykestore.jks -file mycert.crt -alias myalias openssl x509 -out mycert.crt.pem -outform pem -in mycert.crt -inform der It only includes the lowest level certificate. The verification fails: $ openssl s_client -connect

keytool error bash: keytool: command not found

北城以北 提交于 2019-12-20 10:18:39
问题 I have tried to execute keytool from Java bin directory but I get an error with warning bash: keytool: command not found. root@xxxxxx]# keytool -genkey -alias mypassword -keyalg RSA bash: keytools: command not found 回答1: These are the steps which solved my problem: search the path where my java was installed find / -name jre move to java directory (where jre was installed on my server) cd /path/to/jre/location create ssl certificate with keytool command ./keytool -genkey -alias [mypassword]

How to create CSR with SANs using keytool

孤街醉人 提交于 2019-12-20 10:06:24
问题 I'd like to ask whether it is possible to create CSR that contains SAN records. I created keystore as keytool -genkeypair -keyalg RSA -keysize 2048 -alias testAlias -ext SAN=dns:test.example.com -keystore test.jks -storetype JKS -dname "CN=test" I can check using keytool, that SAN is in keystore keytool -list -v -keystore test.jks and relevnt part of the output is #1: ObjectId: 2.5.29.17 Criticality=false SubjectAlternativeName [ DNSName: test.example.com ] Then I created CSR using keytool:

How to create a certificate into a PKCS12 keystore with keytool?

怎甘沉沦 提交于 2019-12-20 09:39:17
问题 I wanted to create a certificate into a PKCS12 keystore format with keytool program. The keystore has extension .pfx . How do I achieve this? 回答1: If the keystore is PKCS12 type ( .pfx ) you have to specify it with -storetype PKCS12 (line breaks added for readability): keytool -genkey -alias <desired certificate alias> -keystore <path to keystore.pfx> -storetype PKCS12 -keyalg RSA -storepass <password> -validity 730 -keysize 2048 回答2: Additional answer to the key of the question . With JDK 8

link between private key and signed certificate in keystore

荒凉一梦 提交于 2019-12-20 04:21:08
问题 I am doing the jetty SSL configuration . I have created CSR using keytool which has added a private key to the keystore, Received the certificate based on the CSR, converted the certificate to DER format and imported the certificate into the keystore as trustcacerts The signed certificate has the root/intermediate certificates in the certificate path I also installed the root and intermediate certificate in the IE under the trusted root certificate after converting it into DER format. while

keytool can't find alias

不想你离开。 提交于 2019-12-19 06:06:17
问题 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 this: ... 0c5fc7cef279ca390acd2d6bac9ffcf8_ba0cbbb3-323d-4394-8e76-47838adb2a9c, 08/03/2013, PrivateKeyEntry, ... But whenever I try to use keytool to do anything with that alias (i.e., export, rename), it gives me an error: keytool error: java.lang.Exception: Alias

keytool can't find alias

拟墨画扇 提交于 2019-12-19 06:06:13
问题 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 this: ... 0c5fc7cef279ca390acd2d6bac9ffcf8_ba0cbbb3-323d-4394-8e76-47838adb2a9c, 08/03/2013, PrivateKeyEntry, ... But whenever I try to use keytool to do anything with that alias (i.e., export, rename), it gives me an error: keytool error: java.lang.Exception: Alias

Why keytool is generating different facebook androiddebugkey hash?

萝らか妹 提交于 2019-12-19 04:59:25
问题 I am creating Android application which use Facebook login SDK. I'd like to generate debug key hash. On Facebook website I found this command: keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%.android\debug.keystore | openssl sha1 -binary | openssl base64 I modified this command to work on my computer: keytool -exportcert -alias androiddebugkey -keystore C:\Users\redio\.android\debug.keystore | "C:\OpenSSL\bin\openssl" sha1 -binary |"C:\OpenSSL\bin\openssl" base64 Next I entered