任务详情
- 参考附件中图书p223 中13.2的实验指导,完成DER编码
- 序列号=1174(0x0496),证书签发者 DN="CN=Virtual CA,C=CN",证书持有者DN="CN=你的名字拼音, OU=Person,C=CN",证书有效期=20200222000000-20220222000000。
- 用echo -n -e "编码" > 你的学号.der中,用OpenSSL asn1parse 分析编码的正确性
- 提交编码过程文档(推荐markdown格式)
数字证书编码ASN.1
1、版本=v2,序列号=1174(0x0496),签名算法=sha1WithRSAEncryption
shell echo -n -e "\xA0\x03\x02\x01\x02\x02\x02\x04\x96\x30\x0D\x06\x09\x2A\x86\x48\x86\xF7\x0D\x01\x01\x05\x05\x00" >> 20191325.der
![](https://img2022.cnblogs.com/blog/1812348/202204/1812348-20220410210554879-1947438641.png)
2、证书签发者 "CN=Virtual CA,C=US"
echo -n -e "\x30\x22\x31\x0B\x30\x09\x06\x03\x55\x04\x06\x13\x02\x55\x53\x31\x13\x30\x11\x06\x03\x55\x04\x03\x13\x0A\x56\x69\x72\x74\x75\x61\x6C\x20\x43\x41" >> 20191325.der
![](https://img2022.cnblogs.com/blog/1812348/202204/1812348-20220410210545607-1557936254.png)
3、证书有效期=20200222000000-20220222000000
echo -n -e "\x30\x1E\x17\x0D\x32\x30\x32\x30\x30\x32\x32\x32\x30\x30\x30\x30\x5A\x17\x0D\x32\x30\x32\x32\x30\x32\x32\x32\x30\x30\x30\x30\x5A" >> wangCERT.der
![](https://img2022.cnblogs.com/blog/1812348/202204/1812348-20220410210535015-405222013.png)
4、证书持有者DN="CN=WangYuHan, OU=Person,C=CN"
echo -n -e "\x30\x32\x31\x0b\x30\x09\x06\x03\x55\x04\x06\x13\x02\x43\x4E\x31\x0F\x30\x0D\x06\x03\x55\x04\x0B\x13\x06\x50\x65\x72\x73\x6F\x6E\x31\x12\x30\x10\x06\x03\x55\x04\x03\x13\x09\x57\x41\x4E\x47\x59\x75\x48\x61\x6E" >> wangCERT.der
![](https://img2022.cnblogs.com/blog/1812348/202204/1812348-20220410210527470-1391034491.png)