New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
能支持ecc证书么 #895
Comments
怎么重现? |
我在 .WhistleAppData/ 下面建 certs 目录作为证书目录, 下面放上根证书:
目录查看如下 :
```
.WhistleAppData/certs > ls
root.crt root.key
```
其中这个根证书是用ecc算法的自签名根证书,证书信息如下:
```
.WhistleAppData/certs > openssl x509 -text -noout -in root.crt
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 100 (0x64)
Signature Algorithm: ecdsa-with-SHA256
Issuer: C=CN, ST=Guangdong, L=Shenzhen, O=february31st.com, CN=february31st.com
Validity
Not Before: Jan 1 00:00:00 2000 GMT
Not After : Jan 1 00:00:00 2100 GMT
Subject: C=CN, ST=Guangdong, L=Shenzhen, O=february31st.com, CN=february31st.com
Subject Public Key Info:
Public Key Algorithm: id-ecPublicKey
Public-Key: (256 bit)
pub:
04:db:7c:a9:ba:cb:3f:29:4a:1c:98:8e:10:ef:1b:
4f:40:44:e4:17:a8:7c:8e:00:03:0b:3b:9d:4b:9b:
7a:ff:ec:bc:3b:53:99:6d:df:07:67:cd:e5:93:05:
9c:64:a1:ef:28:cf:cc:ce:3d:2e:a2:88:8f:18:98:
c1:ae:9b:47:45
ASN1 OID: prime256v1
NIST CURVE: P-256
X509v3 extensions:
X509v3 Subject Key Identifier:
E1:82:21:33:25:6A:05:F3:D8:D9:F1:FC:1A:AB:0F:4D:11:DA:22:CD
X509v3 Authority Key Identifier:
keyid:E1:82:21:33:25:6A:05:F3:D8:D9:F1:FC:1A:AB:0F:4D:11:DA:22:CD
X509v3 Basic Constraints:
CA:TRUE
Signature Algorithm: ecdsa-with-SHA256
30:45:02:20:6e:2f:3d:bf:cb:0d:22:8f:37:24:5e:93:44:b1:
75:f9:fb:b3:d2:8b:3b:16:69:51:4c:78:c3:c4:92:f5:ad:c5:
02:21:00:8b:1f:f4:41:96:e0:9e:c7:77:ba:0d:b1:fa:98:cc:
2c:ff:59:5c:f6:51:a3:2a:54:21:d4:61:16:7c:bd:51:ad
```
使用使用这个根证书启动whistle
```
.WhistleAppData/certs > w2 start --certDir ./
[i] ***@***.*** started
[i] 1. use your device to visit the following URL list, gets the IP of the URL you can access:
http://127.0.0.1:8899/
Note: If all the above URLs are unable to access, check the firewall settings
For help see https://github.com/avwo/whistle
[i] 2. set the HTTP proxy on your device with IP(127.0.0.1) & PORT(8899)
[i] 3. use Chrome to visit http://local.whistlejs.com/ to get started
/usr/local/lib/node_modules/whistle/node_modules/node-forge/lib/pki.js:58
throw error;
^
Error: Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".
at Object.pki.privateKeyFromPem (/usr/local/lib/node_modules/whistle/node_modules/node-forge/lib/pki.js:55:17)
at createRootCA (/usr/local/lib/node_modules/whistle/lib/https/ca.js:365:20)
at Object.<anonymous> (/usr/local/lib/node_modules/whistle/lib/https/ca.js:518:1)
at Module._compile (node:internal/modules/cjs/loader:1191:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1245:10)
at Module.load (node:internal/modules/cjs/loader:1069:32)
at Function.Module._load (node:internal/modules/cjs/loader:904:12)
at Module.require (node:internal/modules/cjs/loader:1093:19)
at require (node:internal/modules/cjs/helpers:108:18)
at Object.<anonymous> (/usr/local/lib/node_modules/whistle/lib/https/index.js:19:10) {
headerType: 'EC PARAMETERS'
}
```
…------------------ 原始邮件 ------------------
发件人: "avwo/whistle" ***@***.***>;
发送时间: 2023年4月24日(星期一) 下午2:19
***@***.***>;
***@***.******@***.***>;
主题: Re: [avwo/whistle] 能支持ecc证书么 (Issue #895)
怎么重现?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
第三方库还不支持,估计要再等等:digitalbazaar/forge#925 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使用ecc证书时报错:
Error: Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".
at Object.pki.privateKeyFromPem (/usr/local/lib/node_modules/whistle/node_modules/node-forge/lib/pki.js:55:17)
The text was updated successfully, but these errors were encountered: