使用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. shell查看内存

    <1>jps<2>ps<3>free<4>df<5>top jps: 很多Java命令都在jdk的JAVA_HOME/bin/目录下面,jp ...

  2. webstorm 常见问题

    1.webstorm(10.0.2)的端口号修改 https://blog.csdn.net/m0_38082783/article/details/71079274 2.导入主题 file –> ...

  3. django中的Ajax文件上传

    主要介绍两个 1.ajax文件上传 2.写路由器 3.创建对应的函数 4.file_put.html代码 <!DOCTYPE html> <html lang="en&qu ...

  4. C++计算二叉树的节点数和高度

    用struct结构体的写法: /* * description: 计算二叉树的层数和节点数 * writeby: nick * date: 2012-10-23 16:16 * */ #include ...

  5. 如何才能够写出优美的C代码呢?

    转载自http://developer.51cto.com/art/201601/503802.htm 面向对象的语言更接近人的思维方式,而且在很大程度上降低了代码的复杂性,同时提高了代码的可读性和可 ...

  6. Homebrew 配置

    使用ruby脚本安装完成homebrew之后, 需要配置三个源以及添加一些环境变量 1. export HOMEBREW_NO_AUTO_UPDATE=true # 不自动检查更新 2. cd $(b ...

  7. WCF、WebAPI、WCFREST、WebService 、RPC、HTTP 概念解释

    在.net平台下,有大量的技术让你创建一个HTTP服务,像Web Service,WCF,现在又出了Web API.在.net平台下,你有很多的选择来构建一个HTTP Services.我分享一下我对 ...

  8. c# 读取图片文件

    /// <summary> /// 通过FileStream 来打开文件,这样就可以实现不锁定Image文件,到时可以让多用户同时访问Image文件 /// </summary> ...

  9. spring注入bean的五种方式

    1.属性注入 2.构造方法注入 3.静态工厂注入 package com.voole.factorybeans; import com.voole.beans.TestBean; public cla ...

  10. jQuery的定时执行和延迟执行

    jQuery的定时执行和延迟执行 //延迟执行 setTimeout(function(){ console.log("实战授课,100%就业"); },600); //定时执行 ...