![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
openssl
sunweixiang1002
天道酬勤
展开
-
OpenSSL API
/** * @file cert_openssl.c * @brief 利用openssl api处理证书 * @author zy * @date 2014-10-11 modify */#include <stdio.h>#include <unistd.h>#include <openssl/pem.h>#include <ope...原创 2018-10-12 16:35:59 · 3968 阅读 · 0 评论 -
openssl 摘要和签名验证指令dgst使用详解
1、信息摘要和数字签名概述信息摘要:对数据进行处理,得到一段固定长度的结果,其特点输入:1,输出长度固定。即输出长度和输入长度无关。2,不可逆。即由输出数据理论上不能推导出输入数据如图4所示,对输入数据敏感。当输入数据变化极小时,输出数据也会发生明显的变化5,防碰撞。即不同的数据数据得到相同输出数据的可能性极低。由于信息摘要有上述特点,一般保证数据的完整性,对一个大文件进行...原创 2018-07-30 16:10:33 · 1439 阅读 · 0 评论 -
openssl sign
Step1:用openssl生成一对公钥/私钥rsa2048openssl genrsa -des3 -out root.pem 2048Step2:签名openssl dgst -sign root.pem -sha256 -out sign.txt file.txtStep3:手动将公钥,私钥取出1)提取公钥openssl rsa -in root.pem -out pub.p...原创 2018-07-19 15:34:04 · 5622 阅读 · 0 评论 -
openssl rsautl
用途:本指令能够使用RSA算法签名,验证身份,加密/解密数据。用法:openssl rsautl [-in file] [-out file] [-inkey file] [-passin arg] [-keyform PEM|DER|NET] [-pubin] [-certin][-asn1parse] [-hexdump] [-raw] [-oaep] [-ssl] [-pkc...原创 2018-11-08 17:22:02 · 4154 阅读 · 0 评论