将BIN格式的证书转换为X509格式 [英] Convert certificate in BIN format to X509 format
问题描述
我已经阅读了这篇关于在https中运行tomcat并实现它的好文章。
I have read this good article on running tomcat in https and implemented it.
http://techtracer.com/2007/09/12/setting-up-ssl-on-tomcat -in-3-easy-steps /
工作正常,我的tomcat以https模式运行。
It is working fine and my tomcat is running in https mode.
但问题是我获得了 BIN格式的证书。我需要它以 X509格式,以便我可以将它用作我的Android项目的原始资源
But the problem is i got the certificate in BIN format. I need it in X509 format so that i can use it as an raw resource for my Android project
我使用了java keytool来创建它。我可以使用OpenSSL将其转换为X509格式或java keytool就足够了吗?
I have used java keytool to create it.Can i use OpenSSL to convert it into X509 Format or java keytool is sufficient?
我是这个证券的新手。
请指出正确的方向并明确我的疑虑。
Please point me in the right direction and clear my doubts.
推荐答案
我认为keytool已经在X509中处理证书格式化。您应该已生成.keystore文件。您可以使用以下命令从中导出证书:
I think keytool already handles certificates in X509 format only. You should have generated .keystore file. You can export certificate from it using command:
keytool -export -alias mycert -keystore mykeystore.bin -file certificatefile.cer
keytool -export -alias mycert -keystore mykeystore.bin -file certificatefile.cer
这篇关于将BIN格式的证书转换为X509格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!