如何让OpenSSL得到JKS格式的keystore中的public and private key
2013-12-31 17:50
453 查看
国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html
内部邀请码:C8E245J (不写邀请码,没有现金送)
国内私募机构九鼎控股打造,九鼎投资是在全国股份转让系统挂牌的公众公司,股票代码为430719,为“中国PE第一股”,市值超1000亿元。
------------------------------------------------------------------------------------------------------------------------------------------------------------------
从一个JKS的keystore中导出public key (certificate)
keytool -export -alias mykey -keystore keystore -file exported.crt
转换成PEM格式,这个格式使用更广
openssl x509 -out exported-pem.crt -outform pem -text -in exported.crt -inform der
导出private key(请参考): 下载文件ExportPriv.java,编译后运行
javac ExportPriv.java
java ExportPriv <keystore> <alias> <password> > exported-pkcs8.key
上述得到的private key是PKCS#8 PEM格式,使用如下命令才能转换成apache可以使用的RSA格式
openssl pkcs8 -inform PEM -nocrypt -in exported-pkcs8.key -out exported.key
现在可以把得到的public key(certificate) 和private key打包在一起,转换成windows平台常用的PKCS12格式
openssl pkcs12 -export -out exported.pfx -inkey exported.key -in exported-pem.crt
内部邀请码:C8E245J (不写邀请码,没有现金送)
国内私募机构九鼎控股打造,九鼎投资是在全国股份转让系统挂牌的公众公司,股票代码为430719,为“中国PE第一股”,市值超1000亿元。
------------------------------------------------------------------------------------------------------------------------------------------------------------------
从一个JKS的keystore中导出public key (certificate)
keytool -export -alias mykey -keystore keystore -file exported.crt
转换成PEM格式,这个格式使用更广
openssl x509 -out exported-pem.crt -outform pem -text -in exported.crt -inform der
导出private key(请参考): 下载文件ExportPriv.java,编译后运行
javac ExportPriv.java
java ExportPriv <keystore> <alias> <password> > exported-pkcs8.key
上述得到的private key是PKCS#8 PEM格式,使用如下命令才能转换成apache可以使用的RSA格式
openssl pkcs8 -inform PEM -nocrypt -in exported-pkcs8.key -out exported.key
现在可以把得到的public key(certificate) 和private key打包在一起,转换成windows平台常用的PKCS12格式
openssl pkcs12 -export -out exported.pfx -inkey exported.key -in exported-pem.crt
相关文章推荐
- 如何让OpenSSL得到JKS格式的keystore中的public and private key
- Summary: difference between public, default, protected, and private key words
- Create an SSH public and private key pair for Linux VMs (转载)
- C# SharpSsh Private-public a pair key to Upload and Download File
- private key and public key
- The public key and the private key
- 转:如何转换Android打包用jks格式keystore证书为Air用pkcs12格式p12证书
- Public Key and Private Keys
- Method and system for public-key-based secure authentication to distributed legacy applications
- 【DAY.1】PHP如何得到数组最后元素的key?
- JavaScript:如何获得 Private、Privileged、Public 和 Static 成员(属性和方法)【翻译+整理】
- Javascript Module pattern template. Shows a class with a constructor and public/private methods/properties. Also shows compatibility with CommonJS(eg Node.JS) and AMD (eg requireJS) as well as in a br
- jks与pkcs12格式的keystore互转
- SSH Man-in-the-Middle Attack and Public-Key Authentication Method
- No valid signing identities (i.e. certificate and private key pair) matching
- 转换java keytools的keystore证书到OPENSSL的PEM格式文件
- 如何得到Selenium2/Webdriver: FirefoxProfile设置属性的key-value
- Public, Private, and Protected Inheritance
- [VB.NET]如何得到Collection里项的Key
- Converting RSA public key Modulus and Exponent into PEM file