专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > 信息/网络安全

小弟我用如下命令生成证书请求

发布时间:2011-07-03 07:04:30 文章来源:www.iduyao.cn 采编人员:星星草
我用如下命令生成证书请求
我定制了一份openssl.cnf,加入若干x509.v3扩展项:

....
[ req ]
....
req_extensions = v3_req
....
[ v3_req ]
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
extendedKeyUsage = serverAuth,codeSigning
....

我用如下命令生成证书请求:
openssl req -new -key /tmp/server.key -out /tmp/cert.req -config /tmp/openssl.cnf

查看证书请求,确认其中已经包括扩展项:
openssl req -text -in /tmp/cert.req

Certificate Request:
    Data:
        Version: 0 (0x0)
        Subject: C=c1, ST=bj, L=bj, O=test, OU=test, CN=test
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
            RSA Public Key: (1024 bit)
                Modulus (1024 bit):
                    00:bb:f4:fc:0c:08:0b:78:69:6e:32:c0:27:14:29:
                    14:2a:03:8e:f3:89:5c:8f:10:f9:90:e3:7d:55:e4:
                    01:d7:54:73:0d:c6:8f:d0:33:24:a3:bd:88:5b:91:
                    42:f7:b2:bb:41:53:ab:ed:bf:f7:d1:66:56:10:4b:
                    c4:f9:fa:24:17:5d:90:54:39:4c:75:a2:47:5b:56:
                    9d:86:e3:d6:87:d6:65:54:f9:83:72:ac:15:e1:e3:
                    80:33:0d:2d:2d:b9:ca:5b:cd:7c:43:b8:6c:18:2b:
                    a9:d9:90:0a:c6:08:8b:8e:d0:38:b4:6a:e4:17:53:
                    5a:3d:8d:63:67:5f:ae:9b:4d
                Exponent: 65537 (0x10001)
        Attributes:
        Requested Extensions:
            X509v3 Basic Constraints: 
                CA:FALSE
            X509v3 Key Usage: 
                Digital Signature, Non Repudiation, Key Encipherment
            X509v3 Extended Key Usage: 
                TLS Web Server Authentication, Code Signing
    Signature Algorithm: md5WithRSAEncryption
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: