Openssl rsa命令
2015-07-22 21:15
295 查看
一、简介
Rsa命令用于处理RSA密钥、格式转换和打印信息
二、语法
选项
三、实例
1、pem转换为der
![](http://images0.cnblogs.com/blog/593399/201507/222114394437282.png)
2、从私钥提取公钥
![](http://images0.cnblogs.com/blog/593399/201507/222114406462581.png)
3、查看公钥信息
![](http://images0.cnblogs.com/blog/593399/201507/222114422097538.png)
4、查看私钥信息
![](http://images0.cnblogs.com/blog/593399/201507/222114444438421.png)
5、从证书中提取私钥
![](http://images0.cnblogs.com/blog/593399/201507/242339334135286.png)
Rsa命令用于处理RSA密钥、格式转换和打印信息
二、语法
openssl rsa [-inform PEM|NET|DER] [-outform PEM|NET|DER] [-in filename] [-passin arg] [-out filename] [-passout arg] [-sgckey] [-text] [-noout] [-modulus] [-check] [-pubin] [-pubout] [-engine id] [-des] [-des3] [-idea]
选项
-inform arg input format - one of DER NET PEM -outform arg output format - one of DER NET PEM -in arg input file -sgckey Use IIS SGC key format -passin arg input file pass phrase source -out arg output file -passout arg output file pass phrase source -des encrypt PEM output with cbc des -des3 encrypt PEM output with ede cbc des using 168 bit key -idea encrypt PEM output with cbc idea -seed encrypt PEM output with cbc seed -aes128, -aes192, -aes256 encrypt PEM output with cbc aes -camellia128, -camellia192, -camellia256 encrypt PEM output with cbc camellia -text print the key in text -noout don't print key out -modulus print the RSA key modulus -check verify key consistency -pubin expect a public key in input file -pubout output a public key -engine e use engine e, possibly a hardware device.
-RSAPublicKey_out
三、实例
1、pem转换为der
openssl rsa -in prikey.pem -outform der -out prikey.der
![](http://images0.cnblogs.com/blog/593399/201507/222114394437282.png)
2、从私钥提取公钥
openssl rsa -in prikey.pem -out pubkey.pem -pubout
![](http://images0.cnblogs.com/blog/593399/201507/222114406462581.png)
3、查看公钥信息
openssl rsa -pubin -in pubkey.pem -text
![](http://images0.cnblogs.com/blog/593399/201507/222114422097538.png)
4、查看私钥信息
openssl rsa -in prikey.pem -passin pass:"123456" -text
![](http://images0.cnblogs.com/blog/593399/201507/222114444438421.png)
5、从证书中提取私钥
openssl rsa -in server.pem -out serverprikey.pem
![](http://images0.cnblogs.com/blog/593399/201507/242339334135286.png)
参考:http://blog.csdn.net/as3luyuan123/article/details/16811945
相关文章推荐
- 直接插入排序、折半插入排序、Shell排序、冒泡排序,选择排序
- RHEL一(管理文件、通配符、特殊符号)
- Linux目录结构及文件基本操作
- linux patch 命令小结
- 中兴openday活动
- Apache 更改80端口
- linux 日志服务器的构建
- linux文件压缩与解压
- linux中软件包管理
- linux中软件包管理
- Android系统代码本地更新linux shell脚本1
- 【工作】Proxy Server的优化 - 检测目标网站URL变化
- 下载adt-bundle-linux-x86_64-20140702.zip 和 android sdk
- Android系统代码本地更新Linux shell脚本2
- linux下vi命令大全
- 架构师成长历程
- Linux设备模型(总线、设备、驱动程序和类)
- /dev/null和/dev/tty
- 如何更改linux文件的拥有者及用户组(chown和chgrp)
- LINUX一切皆文件