[记录]openssl给自己签证cmd过程全记录

OS:win7 openssl来自: lifetragedy的资源 参考: 通向架构师的道路(第二天) 操作过程全部copy,但是其中遇到一个错误
I am unable to access the C:/openssl/demoCA/newcerts directory
C:/openssl/demoCA/newcerts: No such file or directory
解决思路:
1、找路径是应该是配置文件的事情,可能是没有找到我的openssl.cnf,所以有了第一次修改,结果还是错误
2、路径应该是找到了的,那么有可能是openssl.cnf本身出错了吧?因为我的openssl在d盘,而lifetragedy的在c盘
打开openssl.cnf,里面果然有一个CA_default下面有个路径,修改之,
成功


C:\Users\jincheng>cd d:\openssl

C:\Users\jincheng>d:

d:\openssl>openssl genrsa -des3 -out ca.key 1024
Loading 'screen' into random state - done
Generating RSA private key, 1024 bit long modulus
..++++++
.........++++++
e is 65537 (0x10001)
Enter pass phrase for ca.key:
Verifying - Enter pass phrase for ca.key:

d:\openssl>openssl rsa -in ca.key -out ca.key
Enter pass phrase for ca.key:
writing RSA key

d:\openssl>openssl req -new -x509 -key ca.key -out ca.crt -config d:\openssl\bin
\openssl.cnf
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:CN
State or Province Name (full name) [Some-State]:ZJ
Locality Name (eg, city) []:HZ
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Jincheng
Organizational Unit Name (eg, section) []:jcs
Common Name (eg, YOUR name) []:jcs
Email Address []:jincheng_jcs@163.com

d:\openssl>

d:\openssl>openssl genrsa -des3 -out server.key 1024
Loading 'screen' into random state - done
Generating RSA private key, 1024 bit long modulus
....++++++
.++++++
e is 65537 (0x10001)
Enter pass phrase for server.key:
Verifying - Enter pass phrase for server.key:

d:\openssl>openssl rsa -in server.key -out server.key
Enter pass phrase for server.key:
writing RSA key

d:\openssl>openssl req -new -key server.key -out server.csr
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:CN
State or Province Name (full name) [Some-State]:ZJ
Locality Name (eg, city) []:HZ
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Jincheng
Organizational Unit Name (eg, section) []:jcs-DART
Common Name (eg, YOUR name) []:jcs
Email Address []:

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:aaaaaa
An optional company name []:aaaaaa

d:\openssl>openssl ca -in server.csr -out server.crt -cert ca.crt -keyfile ca.ke
y
Using configuration from D:\openssl\bin\openssl.cnf
Loading 'screen' into random state - done
I am unable to access the C:/openssl/demoCA/newcerts directory
C:/openssl/demoCA/newcerts: No such file or directory

d:\openssl>openssl ca -in server.csr -out server.crt -cert ca.crt -keyfile ca.ke
y -config d:\openssl\bin\openssl.cnf
Using configuration from d:\openssl\bin\openssl.cnf
Loading 'screen' into random state - done
I am unable to access the C:/openssl/demoCA/newcerts directory
C:/openssl/demoCA/newcerts: No such file or directory

d:\openssl>

d:\openssl>openssl ca -in server.csr -out server.crt -cert ca.crt -keyfile ca.ke
y -config d:\openssl\bin\openssl.cnf
Using configuration from d:\openssl\bin\openssl.cnf
Loading 'screen' into random state - done
Check that the request matches the signature
Signature ok
Certificate Details:
        Serial Number: 3 (0x3)
        Validity
            Not Before: Nov 23 07:33:41 2012 GMT
            Not After : Nov 23 07:33:41 2013 GMT
        Subject:
            countryName               = CN
            stateOrProvinceName       = ZJ
            organizationName          = Jincheng
            organizationalUnitName    = jcs-DART
            commonName                = jcs
            emailAddress              = 
        X509v3 extensions:
            X509v3 Basic Constraints:
                CA:FALSE
            Netscape Comment:
                OpenSSL Generated Certificate
            X509v3 Subject Key Identifier:
                64:8F:32:5E:9C:42:19:15:B5:97:47:E1:11:57:F8:58:FA:F2:CE:E5
            X509v3 Authority Key Identifier:
                keyid:E5:FC:6D:2F:F7:32:BC:E8:D1:2A:68:88:E3:ED:39:37:1A:61:97:9
0

Certificate is to be certified until Nov 23 07:33:41 2013 GMT (365 days)
Sign the certificate? [y/n]:y


1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated

d:\openssl>

d:\openssl>

d:\openssl>


  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值