简单keystore操作(更新中)
来源:互联网 发布:惠州网络推广招聘 编辑:程序博客网 时间:2024/05/21 10:07
命令操作
keytool -genkey -alias he -keystore f:\test\test.keystore -keyalg RSA --生成证书keytool -list -v -keystore f:\test\key.keystore -storepass 123456 ---查看证书信息,123456是证书的密码keytool -export -alias lcd -keystore f:\test\hehe.keystore -rfc -file f:\test\hehe.crt -storepass 123123 --把证书导出证书文件keytool -printcert -file f:\test\hehe.crt --查看证书文件内容keytool -delete -alias lcd -keystore f:\test\hehe.keystore -storepass 123123 --删除证书
Java操作
File file=new File("f:/test/hehe.keystore");FileInputStream fis=new FileInputStream(file);String str="123123";char[] pass=str.toCharArray();KeyStore ks=KeyStore.getInstance(KeyStore.getDefaultType());ks.load(fis, pass);System.out.println("/** 显示所有证书的别名**/");Enumeration<String> e=ks.aliases();while(e.hasMoreElements())System.out.println(e.nextElement());System.out.println("/***显示别名为aaa的证书**/");Certificate c=ks.getCertificate("aaa"); System.out.println(c.toString());
0 0
- 简单keystore操作(更新中)
- 简单js 操作文件(更新中)
- 简单的keystore操作命令
- liunx 简单操作(持续更新)
- LINQ 中数据操作的一些简单方法(删除,更新)
- keystore的简单介绍
- android自定义keystore操作
- linux简单命令(继续更新中)
- fstream文件操作(更新中)
- MM 操作学习笔记(更新中......)
- Hbase mapreduce基础操作(更新中)
- linux常用操作(更新中)
- Ubuntu常用操作(更新中)
- Vim常用操作(更新中)
- android中生成keystore
- 关于keystore的简单介绍
- 关于keystore的简单介绍
- 签名文件keystore常见操作
- 可移动的CollectionViewCell
- Cocos2dx内存管理、优化减少内存和多线程方面的问题
- JSP中的各种中文乱码问题解决方案
- JAVA设计模式之单例模式
- CentOS 搭建Git Gitosis 服务器
- 简单keystore操作(更新中)
- socket C 客户端发送数据到服务端,操作mysql数据库
- 23种设计模式(5):原型模式
- ubantu14.0.1安装jdk1.7.1
- SRM 682 Div2 1000 SubtreesCounting
- HashMap实现原理分析
- FZU2088 最长队名
- 使用零碎时间提升自己
- Mybatis MapperScannerConfigurer 自动扫描 将Mapper接口生成代理注入到Spring