我正在構建通過openssl與在線服務器進行通信的IOT設備的原型。 該軟件使用我自己的subca簽署的ECDSA證書。沒有密碼可用於特定的ECDSA證書
問題似乎沒有該證書的密碼availlable。 爲了測試我在服務器端使用openssl s_server以及在客戶端使用nmap ssl-enum-ciphers腳本的全部內容。 nmap返回一個無效的密碼列表。
服務器給出的命令是:
openssl s_server -accept 4433 -cert server1.crt -certform PEM -key server1.key
這是我在服務器側使用的證書。
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 256 (0x100)
Signature Algorithm: ecdsa-with-SHA256
Issuer: C=IT, O=wwwtech, CN=wwwtech Server CA
Validity
Not Before: Jul 17 12:11:31 2017 GMT
Not After : Jul 17 12:11:31 2019 GMT
Subject: C=IT, O=wwwtech, CN=server1
Subject Public Key Info:
Public Key Algorithm: id-ecPublicKey
Public-Key: (160 bit)
pub:
04:1c:e3:02:ec:bc:0f:88:7a:58:0b:36:b6:55:2c:
e5:f1:67:5f:a0:7a:c3:c9:4b:7c:45:02:42:61:20:
0c:4d:30:22:f6:c7:09:b5:ef:e1:8e
ASN1 OID: brainpoolP160r1
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Key Usage:
Key Encipherment
Netscape Cert Type:
SSL Server
Netscape Comment:
AreaWFI Server Certificate
X509v3 Subject Key Identifier:
8D:92:1A:9F:6A:AB:D2:E5:6B:72:CB:25:A9:15:27:38:08:CE:DE:A9
X509v3 Authority Key Identifier:
keyid:E7:2F:0E:A7:39:B4:85:46:FE:2A:EA:9F:0A:FE:54:F4:B9:A5:B6:AC
X509v3 Subject Alternative Name:
IP Address:127.0.0.1
Signature Algorithm: ecdsa-with-SHA256
30:44:02:20:32:f1:d1:90:08:f1:dc:a5:9d:30:d3:db:4b:05:
6c:d2:41:cc:ac:6f:01:f8:90:0d:a5:25:27:4d:f9:38:62:14:
02:20:19:37:c4:7c:07:e9:07:2d:c8:6e:1f:a4:db:4e:44:48:
68:4a:e9:9d:03:68:b3:b0:c6:31:60:92:ed:54:5c:22
我使用OpenSSL 1.0.2g。我以爲brainpoolP160r1被支持,因爲openssl ecparam -list_curves顯示它。非常感謝你。 –
ecparam選項列出了libcrypto支持的所有曲線,這是比libssl支持的列表長得多的列表。並非所有曲線都被認爲適用於SSL/TLS使用。在1.0.2g中,libssl默認曲線列表比1.1.0更長。它包括P-256,P-384,P-512以及類似尺寸的腦池曲線和一些其他的很少使用的其他的。 1.0.2g中支持的曲線的完整列表(您必須使用「-curves」啓用)是一個很長的列表,但仍不包含brainpoolP160r1。 –
1.0.2中libssl支持的曲線列表如下:https://github.com/openssl/openssl/blob/OpenSSL_1_0_2-stable/ssl/t1_lib。c#L290 –