使用OpenSSL生成证书,构建根证书前,需要构建随机数文件(.rand),命令如下:

openssl rand -out private/.rand 

报错如下:

OpenSSL> rand -out private\.rand
Can't open private\.rand for writing, No such file or directory
:error::system library:fopen:No such process:crypto\bio\bss_file.c:
:fopen('private\.rand','wb')
:error:2006D080:BIO routines:BIO_new_file:no such file:crypto\bio\bss_file.c
::
error in rand

竟然找不到路径

查看了OpenSSL的cfg文件也没错

无奈,直接使用了绝对路径,命令如下:

OpenSSL> rand -out C:\CA\private\.rand 

搞定!

原因分析:

因为把openssl放入了path,因此,在cmd命令行下输入openssl后,回车,进入openssl的命令行,默认在%OPENSSL_HOME%\bin\目录下了

执行openssl rand -out XXX命令时,不需要前的openssl,只需要输入rand -out XX即可

问题来了,我的第一个命令:rand -out private\.rand 1000 ,使用的是相对路径(openssl的工作目录是C:\CA),肯定在%OPENSSL_HOME%\bin\目录下找不到

因此,解决方案二:

cd  C:C/CA

openssl -out private\.rand 1000

搞定!(注意命令前必须有openssl)

OpenSSL命令参考:

OpenSSL构建数字证书

No such file or directory 8356:error:02001003:system library:fopen:No such process:crypto\bio\bss_file.c:7 4:fopen的更多相关文章

  1. CMake error:System Error:No such file or directory CMake error:Could not open file for write in copy operation xxxx.ros_Config.cmake.tmp.

    微型电脑或嵌入式与电脑还是有点不同的,在微型电脑上ros indigo 版本下利用catkin编译如果你遇到如下错误: CMake error:System Error:No such file or ...

  2. pip install mysql-python报错1. Unable to find vcvarsall.bat 2 fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory 3.error: command 'mt.exe' failed with exit statu

    最近在安装mysql -python 时报错折腾了半天,通过以下方法解决: 1. pip install mysql-python报错 Unable to find vcvarsall.bat (参考 ...

  3. armv7a-mediatek451_001_vfp-linux-gnueabi-gcc: directory: No such file or directory 编译error

    release/vm_linux/output/hisense_android/mt5399_cn_android_JB/rel/obj/oss/source/arm_mali_ko/mali400- ...

  4. centos6.9安装xampp后报错:egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

    1.centos6.9安装xampp(xampp-linux-x64-7.0.21-0-installer.run)后启动的时候,报错: egrep: error while loading shar ...

  5. fatal error C1083: Cannot open include file: '_defs.h': No such file or directory

    b-PAC SDK: https://www.baidu.com/link?url=p6FcG0fvFl6XJf9QdSFLBP16eaS03jOQsdr0zd8cYprHWwqVy5t53bzMrA ...

  6. 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 ...

  7. tar 解压bz2报错 Cannot exec: No such file or directory

    tar: bzip2: Cannot exec: No such file or directorytar: Error is not recoverable: exiting now 需要安装bzi ...

  8. 错误: libstdc++.so.6: cannot open shared object file: No such file or directory

    解压完别人提供的openwrt代码,编译时,出现如下错误: # configuration written to .config#mips-openwrt-linux-uclibc-gcc: erro ...

  9. 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 ...

随机推荐

  1. [转]使用jquery dataTable

    本文转自:http://blog.csdn.net/llhwin2010/article/details/8663753 jQuery 的插件 dataTables 是一个优秀的表格插件,提供了针对表 ...

  2. Android Studio中导入v4,v7和recyclerview-v7包的方法

    概述 Android Studio中新建工程中会默认导入v7的包,即在gradle中默认配置了com.android.support:appcompat-v7:x.x.x的依赖.但是不会默认为我们配置 ...

  3. pat06-图4. Saving James Bond - Hard Version (30)

    06-图4. Saving James Bond - Hard Version (30) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作 ...

  4. Android JNI和NDK的关系

    转自:http://blog.csdn.net/elfylin/article/details/6121466 1.什么JNI Java Native Interface(JNI)标准是java平台的 ...

  5. struts2分页实现

    1.定义一个page类,里面包括每一个的数量,当前页码,总记录数,等 2.将page对象传入dao中,dao输出分页查询好的数据.返回到action中,action放到request中,jsp从req ...

  6. CST,CET,UTC,GMT,DST,Unix时间戳几种常见时间概述与关系

    1.UTC: Universal Time Coordinated 协调世界时,又称世界标准时间 多数的两地时间表都以GMT来表示,但也有些两地时间表上看不到GMT字样,出现的反而是UTC这3个英文字 ...

  7. Java 空对象设计模式(Null Object Pattern) 讲解

    转自:http://www.cnblogs.com/haodawang/articles/5962531.html 有时候我们的代码中为避免 NullPointerException 会出现很多的对N ...

  8. selenium学习备忘

    在做web项目的自动化端到端测试时主要使用的是Selenium WebDriver来驱动浏览器.Selenium WebDriver的优点是支持的语言多,支持的浏览器多.主流的浏览器Chrome.Fi ...

  9. Mybatis:Reader entry: ���� 4

    Mybatis:Reader entry: ���� 4 现象:   产生原因:mybatis-config.xml里面配置了包的别名引发的   处理过程:注释掉 结果:就没有乱码了

  10. MyBatisUtil类

    在用MyBatis框架连接数据库时,往往要经常创建sessionFactory,重复的编写大量代码,故将其中的重复代码提出成一个工具类,这样直接调用方法即可,可简化代码编写和优化运行效率,不需要重复的 ...