keytool

Facebook授权登录

匿名 (未验证) 提交于 2019-12-02 21:53:52
1.注册开发者账号 登陆facebook开发者平台 ( https://developers.facebook.com/ ), 注册facebook开发者账号。 2、Facebook登录Key Hash配置 http://slproweb.com/products/Win32OpenSSL.html    将下载的软件安装到默认路径中,默认路径为C盘,运行cmd,在命令行中进入 openssl.exe的路径,    一般为 C:\OpenSSL-Win32\bin 。安装过程中的每一步,都可以选择默认选项。     2.2、生成Key Hash值               注:AS默认的debug签名没有密钥口令,输入一个空格后点击回车就行了。       使用命令:       Keytool -exportcert -alias musicshells -keystore D:\qibangong\yybk_android\app\musicshells.jks | openssl sha1 -binary | openssl base64        注意: 应该为 游戏线上apk签名文件的alias,应该为签名文件keystore的所在路径。 执行后 提示“输入密钥库口令”,则输入口令(上图2)并回车。点击回车出现的28位字符串,即为需要的key Hash值。

java-使用keytool信任自签证书,需要重启

匿名 (未验证) 提交于 2019-12-02 21:45:52
目前我司的技术栈是Java和Python,且都调用第三方的服务,因此需要mock第三方的服务以便开发测试使用。之前已整理过[Python requests信任自签证书的问题]。( https://blog.csdn.net/windy135/article/details/79861209 )因此这次需要再Java中mock第三方服务。 java官方文档: 1、使用keytool工具生成证书,然后将cer文件给mock 服务器:(即本文的反向解决办法) https://docs.oracle.com/cd/E19798-01/821-1841/gjrgy/ 2、关于keytool的官方说明: https://docs.oracle.com/javase/6/docs/technotes/tools/solaris/keytool.html If keytool fails to establish a trust path from the certificate to be imported up to a self-signed certificate (either from the keystore or the "cacerts" file), the certificate information is printed out, and the user is

使用keytool工具产生带根CA和二级CA的用户证书

匿名 (未验证) 提交于 2019-12-02 21:35:18
keystore 则会使用默认在用户Home目录下的 .keystore 秘钥库(如果没有则会创建),输入秘钥库的密码,填写根证书的信息,最后填写根证书秘钥对的密码。 keytool -genkeypair -alias rootca -keyalg RSA rootca : keytool 的导出功能,从秘钥库中导出根证书,输入秘钥库的密码,导出的证书文件为 rootca.cer 命令如下: keytool -exportcert -alias rootca -file rootca.cer keytool 生成二级CA的证书,但是此时的证书还是张自签证书,我们需要从中生成一个二级CA的证书请求(包含了公钥),然后通过将证书请求到 rootca 签发我们的二级证书,然后我们在将 rootca 签发的二级CA证书导入到导出证书请求的秘钥库中,完成二级CA的生成。下面是生成二级CA证书命令,此时是张自签证书: keytool -genkeypair -alias subca -keyalg RSA subca ,如下图所示: keypair 中导出证书请求,下面是导出证书请求(带公钥)的命令, subca 是我们上面生成的二级CA的秘钥对名字,最终导出证书请求文件为 subca.csr : keytool -certreq -alias subca -file subca.csr

How do I Import a Certificate from GoDaddy for Java Code Signing? [closed]

岁酱吖の 提交于 2019-12-02 21:19:53
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. I need to be able to sign jar files with a certificate from a CA. I following the instructions from GoDaddy's documentation on how to do this: http://support.godaddy.com/help/article/4780/signing-java-code However, step 3 requires importing a cert file obtained from GoDaddy's web site. Per the documentation, the command is: keytool -import -trustcacerts -keystore codesignstore -storepass <yourstorepwd> -alias

keytool -genkey error: Keystore file does not exist

落花浮王杯 提交于 2019-12-02 20:55:39
I try to create a new self certified keystore file The command I use is: keytool -genkey -selfcert -dname "cn=My Name, ou=Orga unit" -alias selfcertified -keypass somepass -keystore keystore.jks -storepass anotherpass -validity 365 but I always get this annoying error: keytool error: java.lang.Exception: Keystore file does not exist: keystore.jks I do not understand why I'm getting this error. The command above should create a new keystore, so why is it complaining about a non existing store? Generating a key pair (and a new keystore) has to be done as a separate operation to creating a self

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

馋奶兔 提交于 2019-12-02 20:41:41
I wanted to create a certificate into a PKCS12 keystore format with keytool program. The keystore has extension .pfx . How do I achieve this? David García González 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 Additional answer to the key of the question . With JDK 8 ( 1.8.0_121-b13 ) you don't get an exception if you remove -storetype pkcs12 but the

Keytool generates 32 character long key hash instead of 28

久未见 提交于 2019-12-02 17:34:17
I am using the following command to generate key hash for Facebook app console for Android .\keytool.exe -exportcert -alias app_android -keystore release.keystore | openssl sha1 -binary | openssl base64 As told at Facebook developers SDK help As per the help page and also the developers console, the key hash should be 28 characters long, however the keytool is generating 32 characters long key. Java version : jdk1.8.0_31 OS : Windows 7 Generating for android. EDIT As per suggestion from @Shreyash-mashru, I used the following code to get the keyhash try { PackageInfo info = getPackageManager()

Change keystore password from no password to a non blank password

牧云@^-^@ 提交于 2019-12-02 15:28:44
I have a jks keystore with no password. When I run the command keytool -list -keystore mykeystore.jks And it prompts me for the keystore password, I simply hit 'enter'. Please note that the keystore password IS NOT the default java password of 'changeit'. It is blank When I try to run keytool -storepasswd -keystore mykeystore.jks to change the password to a non blank string. It firsts prompts me for the current password. Simply hitting enter since it is blank says keytool -storepasswd -keystore mykeystore.jks Enter keystore password: Keystore password is too short - must be at least 6

keytool生成证书与Tomcat SSL配置

房东的猫 提交于 2019-12-02 15:15:23
一、Keytool介绍 Keytool是一个Java数据证书的管理工具。Keytool将密钥(key)和证书(certificates)存在一个称为keystore的文件中在keystore里,包含两种数据: 1. 密钥实体(Key entity)——密钥(secret key)又或者是私钥和配对公钥(采用非对称加密) 2. 可信任的证书实体(trusted certificate entries)——只包含公钥 Alias(别名):每个keystore都关联这一个独一无二的alias,这个alias通常不区分大小写 keystore的存储位置 在没有制定生成位置的情况下,keystore会存在与用户的系统默认目录, 如:对于window xp系统,会生成在系统的C:/Documents and Settings/UserName/ 文件名为“.keystore” keystore的生成:keytool -genkey -alias tomcat -keyalg RSA -keystore d:/mykeystore -dname "CN=localhost, OU=localhost, O=localhost, L=SH, ST=SH, C=CN" -keypass changeit -storepass -validity 36500 参数说明:

Tomcat keytool简介

可紊 提交于 2019-12-02 15:15:09
keytool 是安全钥匙和证书的管理工具。他管理一个存储了私有钥匙和验证相应公共钥匙的和他们相关联的x.509 证书链的keystore(相当一个数据库)。 keytool 是个有效的安全钥匙和证书的管理工具。 他能够使用户使用数字签名来管理他们自己的私有/公共钥匙对,管理用来作自我鉴定的相关的证书,管理数据完整性和鉴定服务。他还能使用户在通信时缓存他们的公共钥匙。 一个证书是某一实体(个人,公司等)的数字签名,指出其他实体的公共钥匙(或其他信息)的周详的值。当数据被签名后,这个签名信息被用来检验数据的完整性和真实性。完整性指数据没有被修改和篡改,真实性指数据从所有产生和签名的一方真正的传输到达。 keytool 把钥匙和证书储存到一个keystore。默任的实现keystore的是个文件。他用一个密码保护钥匙。 而另外的一个工具jarsigner用keystore中的信息产生或检验java archive(jar文件)中的数字签名。 keystore有两个不同的入口: 1.钥匙入口:保存了非常敏感的加密的钥匙信息,并且是用一个保护的格式存储以防止未被授权的访问。以这种形式存储的钥匙是秘密钥匙,或是个对应证书链中公有钥匙的私有钥匙。 2.信任证书入口:包含一个属于其他部分的单一公共钥匙证书。他之所以被称为"信任证书"