[转帖] ./demoCA/newcerts: No such file or directory openssl 生成证书时问题的解决.
接上面一篇blog 发现openssl 生成server.crt 时有问题. 找了一个网站处理了一下:
http://blog.sina.com.cn/s/blog_49f8dc400100tznt.html
OpenSSL具体安装及使用此文中不再累赘,请参考网上相关文档。
- 首先生成X509格式的CA自签名证书
$openssl req -new -x509 -keyout myca.key -out myca.crt –days 90 - 生成SSL客户端的私钥(key文件)及csr文件
$openssl genrsa -des3 -out SSL.key 1024 –days 90
$openssl req -new -key SSL.key -out SSL.csr –days 90 - 用生成的CA的证书为刚才生成的SSL.csr文件签名
$openssl ca -in SSL.csr -out SSL.crt -cert myca.crt -keyfile myca.key –days 90 - 生成p12格式证书
$openssl pkcs12 -export -inkey SSL.key -in SSL.crt -out SSL.pfx
完成以上操作后在当前目录下会有六个文件,分别是myca.crt,myca.key,SSL.crt,SSL.csr,SSL.key,SSL.pfx。其中CA的公钥myca.crt 和用户的私钥 SSL.pfx是我们需要的文件。
如果在这步出现错误信息:
[weigw@TEST bin]$ openssl ca -in client.csr -out client.crt -cert ca.crt -keyfile ca.key
Using configuration from /usr/share/ssl/openssl.cnf I am unable to access the ./demoCA/newcerts directory ./demoCA/newcerts: No such file or directory
[weigw@TEST bin]$
自己手动创建一个CA目录结构:
[weigw@TEST bin]$ mkdir ./demoCA
[weigw@TEST bin]$ mkdir demoCA/newcerts
创建个空文件:
[weigw@TEST bin]$ vi demoCA/index.txt
创建文件:
[weigw@TEST bin]$ vi demoCA/serial
向文件中写入01
并且第二行空一行
[转帖] ./demoCA/newcerts: No such file or directory openssl 生成证书时问题的解决.的更多相关文章
- oracle 库文件解决的方法 bad ELF interpreter: No such file or directory
今天是2014-05-27,今天遇到一个lib问题,再次记录一下.这是一个案例,更是一种解决该问题的方法过程. 当我们在使用sqlplus 登陆unix数据库的时候,有可能出现类似:xxxxxx ba ...
- /usr/bin/env: node: no such file or directory
今天在安装gulp的之后,运行gulp命令出现了如下报错: /usr/bin/env: node: no such file or directory 网上找了好久,终于解决了,所以记录一下,便于下次 ...
- plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory
装一台新服务器环境的时候,装uwsgi报错: plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or di ...
- mininet *** Error: RTNETLINK answers: No such file or directory 问题及解决方法
一.问题 按照mininet官网中从源码安装步骤进行安装后,运行命令sudo mn --link tc,bw=10,提示说*** Error: RTNETLINK answers: No such f ...
- No such file or directory 8356:error:02001003:system library:fopen:No such process:crypto\bio\bss_file.c:7 4:fopen
使用OpenSSL生成证书,构建根证书前,需要构建随机数文件(.rand),命令如下: openssl rand - 报错如下: OpenSSL> rand - Can't open priva ...
- Git异常:fatal: could not create work tree dir 'XXX': No such file or directory
GitHub实战系列汇总:http://www.cnblogs.com/dunitian/p/5038719.html ———————————————————————————————————————— ...
- Warning: mysql_connect(): No such file or directory 解决方案总结(操作系统: Mac)
说明: 本文主要内容参考: Mac下PHP连接MySQL报错"No such file or directory"的解决办法, 并进行个人补充 1. 运行环境: Mac OS X 10.11.4 (M ...
- python3: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
安装python3遇到报错: wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz ./configure --prefix=/u ...
- Mac 配置 php-fpm 时出现'/private/etc/php-fpm.conf': No such file or directory (2)
https://github.com/musicode/test/issues/5 Mac 自带 php-fpm,在终端执行 php-fpm,会报如下错误: ERROR: failed to open ...
随机推荐
- Enable file editing in Visual Studio's debug mode
Visual Studio 使用及调试必知必会 http://www.cnblogs.com/luminji/p/3287728.html How do I enable file editing i ...
- INLINE HOOK过简单驱动保护的理论知识和大概思路
这里的简单驱动保护就是简单的HOOK掉内核API的现象 找到被HOOK的函数的当前地址在此地址处先修改页面保护属性然后写入5个字节.5个字节就是一个简单的JMP指令.这里说一下JMP指令,如下: 00 ...
- IntelliJ IDEA 创建 Git 分支并且 Push 到远程
在 IntelliJ 的右下角,你可以看到当前的 Git 分支,然后你可以单击这个分支后,在弹出的界面的最上方有一个新建分支的选项. 然后再弹出的界面中,输入你要创建的分支名称后回车输入. 然后从项目 ...
- AGC029C - Lexicographic constraints
记录我心路历程吧,这道小水题暴露出我很多问题. 给定 \(n\) 个字符串长度 \(a_i\) ,求字符集最小多大,才能构造出按字典序比较 \(s_1 < s_2 < \dots < ...
- MongoDB系列二:MongoDB安装过程
一.MongoDB安装,以Linux系统安装为例:(下载:www.mongodb.org 注意使用stable版本) 1.下载最新版本的MongoDB安装包,wget http://fastdl.mo ...
- GDB之调试器用法
GDB 完成的作用: 启动程序,可以按照工程师自定义的要求随心所欲的运行程序 让被调试的程序在工程师指定的断点处停住,断点可以是条件表达式 当程序被停住时,可以检查此时程序中所发生的事,并追索上文 动 ...
- linux基础技巧
命令行颜色显示: \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\0 ...
- HearthBuddy 日志模块
// Triton.Common.LogUtilities.CustomLogger // Token: 0x04000BD8 RID: 3032 private Level level_0 = Le ...
- rc-form 在 typescript 中的报错处理
1.创建 声明模块 index.d.ts import { Component, ClassicComponentClass, ClassType, ComponentClass, Component ...
- dubbo学习笔记(一)超时与重试
dubbo提供在provider和consumer端,都提供了超时(timeout)和重试(retries)的参数配置. 配置方式 provider端在<dubbo:service>中配置 ...