Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:/Documents and Settings/Administrator>F:
F:/>cd openssl-0.9.8g/apps/demoCA
F:/openssl-0.9.8g/apps/demoCA>openssl ca -in req1.pem -out sslclientcert.pem
'openssl' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
F:/openssl-0.9.8g/apps/demoCA>set path=%path%;f:/openssl-0.9.8g/out32dll
F:/openssl-0.9.8g/apps/demoCA>openssl ca -in req1.pem -out sslclientcert.pem
Using configuration from F:/openssl-0.9.8g/apps/openssl.cnf;F:/openssl-0.9.8g/ap
ps/
error loading the config file 'F:/openssl-0.9.8g/apps/openssl.cnf;F:/openssl-0.9
.8g/apps/'
1768:error:0200107B:system library:fopen:Unknown error:./crypto/bio/bss_file.c:1
22:fopen('F:/openssl-0.9.8g/apps/openssl.cnf;F:/openssl-0.9.8g/apps/','rb')
1768:error:2006D002:BIO routines:BIO_new_file:system lib:./crypto/bio/bss_file.c
:127:
1768:error:0E078002:configuration file routines:DEF_LOAD:system lib:./crypto/con
f/conf_def.c:199:
F:/openssl-0.9.8g/apps/demoCA>openssl ca -in req1.pem -out sslclientcert.pem -config f:/openssl-0.9.8g/apps/openssl.cnf
Using configuration from f:/openssl-0.9.8g/apps/openssl.cnf
Loading 'screen' into random state - done
Error opening CA private key ./demoCA/private/cakey.pem
1712:error:02001003:system library:fopen:No such process:./crypto/bio/bss_file.c
:352:fopen('./demoCA/private/cakey.pem','rb')
1712:error:20074002:BIO routines:FILE_CTRL:system lib:./crypto/bio/bss_file.c:35
4:
unable to load CA private key
F:/openssl-0.9.8g/apps/demoCA>openssl ca -in req1.pem -out sslclientcert.pem -keyfile F:/openssl-0.9.8g/apps/demoCA/private/cakey.pem -config F:/openssl-0.9.8g/apps/openssl.cnf
Using configuration from F:/openssl-0.9.8g/apps/openssl.cnf
Loading 'screen' into random state - done
Error opening CA certificate ./demoCA/cacert.pem
720:error:02001003:system library:fopen:No such process:./crypto/bio/bss_file.c:
352:fopen('./demoCA/cacert.pem','rb')
720:error:20074002:BIO routines:FILE_CTRL:system lib:./crypto/bio/bss_file.c:354
:
unable to load certificate
F:/openssl-0.9.8g/apps/demoCA>openssl ca -in req1.pem -out sslclientcert.pem -keyfile cakey.pem -config F:/openssl-0.9.8g/apps/openssl.cnf
Using configuration from F:/openssl-0.9.8g/apps/openssl.cnf
Loading 'screen' into random state - done
Error opening CA private key cakey.pem
288:error:02001002:system library:fopen:No such file or directory:./crypto/bio/b
ss_file.c:352:fopen('cakey.pem','rb')
288:error:20074002:BIO routines:FILE_CTRL:system lib:./crypto/bio/bss_file.c:354
:
unable to load CA private key
F:/openssl-0.9.8g/apps/demoCA>openssl ca -in req1.pem -out sslclientcert.pem -keyfile cakey.pem -cert cacert.pem -config F:/openssl-0.9.8g/apps/openssl.cnf
Using configuration from F:/openssl-0.9.8g/apps/openssl.cnf
Loading 'screen' into random state - done
I am unable to access the ./demoCA/newcerts directory
./demoCA/newcerts: No such file or directory
可以看到,在windows下使用OpensslCA,会有很多的不便之处的,最大的一个区别就是Openssl天生是为UNIX类的操作系统开发的,硬要在windows下安装,会有很多的烦恼,即:文件路径的区别。UINX是“/”,而WINDOWS下面是“/”,所以很多的openssl.cnf的默认的配置是丝毫不起作用的。
最后建议,还是在UINX类的操作系统开发Openssl。WINDOWS,还是避而远之。。。。。切记!
希望,我的经验教训,留给后来人一些启发。。。