windows系统
node.js 1.6.x版本
尝试使用自签名jks生成适配nginx的ssl证书,
将p12转换成crt证书与未加密key时发生报错, 命令如下:
openssl pkcs12 -in server.p12 -nokeys -clcerts -out server.crt
openssl pkcs12 -in server.p12 -nocerts -nodes -out server.key
报错信息:
Error outputting keys and certificates
5C0C0000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:crypto\evp\evp_fetch.c:349:Global default library context, Algorithm (RC2-40-CBC : 0), Properties ()
尝试使用网上提到的方法:
新建环境变量
NODE_OPTIONS=--openssl-legacy-provider
——无效
更改node.js的package.json添加
"serve": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service serve",
"build": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service build",
"build:report": "set NODE_OPTIONS=--openssl-legacy-provider & vue-cli-service build --report",
——无效
使用了不受支持的算法