使用curl_7_35的会话ID

使用curl_7_35的会话ID

我想用它curl来获取会话ID。有什么方法可以使用 来获取会话 ID 吗curl?我之前使用 Open SSL 来捕获会话 id。现在,我不想使用它。

我尝试发送这个命令:

curl_7_35_0 -v -k -tls1.2 --sessionid 'not_sure_what_to_use_here' https://30.1.1.101/ssl_ecdhe.txt

我在这里错过了什么吗?如果是,请告诉我。

OpenSSL 的输出是:

Cli31(runs)# /usr/local/ssl/bin/openssl s_client -connect 30.1.1.101:443 -tls1_2 -servername 20.1.1.1 -reconnect -crlf

CONNECTED(00000003)
depth=0 C = US, ST = California, L = San Jose, O = A10Networks Inc., OU = QA, CN = www.automationserver.com, emailAddress = [email protected]
verify error:num=18:self signed certificate
verify return:1
depth=0 C = US, ST = California, L = San Jose, O = A10Networks Inc., OU = QA, CN = www.automationserver.com, emailAddress = [email protected]
verify return:1
---
Certificate chain
 0 s:/C=US/ST=California/L=San Jose/O=A10Networks Inc./OU=QA/CN=www.automationserver.com/[email protected]
   i:/C=US/ST=California/L=San Jose/O=A10Networks Inc./OU=QA/CN=www.automationserver.com/[email protected]
---
Server certificate
-----BEGIN CERTIFICATE-----
MIICkTCCAjigAwIBAgIJAMSTNrUEbSQ4MAkGByqGSM49BAEwgaUxCzAJBgNVBAYT
AlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMREwDwYDVQQHDAhTYW4gSm9zZTEZMBcG
A1UECgwQQTEwTmV0d29ya3MgSW5jLjELMAkGA1UECwwCUUExITAfBgNVBAMMGHd3
dy5hdXRvbWF0aW9uc2VydmVyLmNvbTEjMCEGCSqGSIb3DQEJARYUaW5mb0BhMTBu
ZXR3b3Jrcy5jb20wHhcNMTQxMTE0MDk0ODU2WhcNMjQxMTExMDk0ODU2WjCBpTEL
MAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExETAPBgNVBAcMCFNhbiBK
b3NlMRkwFwYDVQQKDBBBMTBOZXR3b3JrcyBJbmMuMQswCQYDVQQLDAJRQTEhMB8G
A1UEAwwYd3d3LmF1dG9tYXRpb25zZXJ2ZXIuY29tMSMwIQYJKoZIhvcNAQkBFhRp
bmZvQGExMG5ldHdvcmtzLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABEIt
e+YKJNyZtyshcoELz8raSxvviLnYElxSdhedUSWluLOdV7RQFvcA7vUSSXpJkKCN
LFSsN3ZuLe0bEOfe/RyjUDBOMB0GA1UdDgQWBBRdh99xn941eV8A/zYpsSWKE8vW
cjAfBgNVHSMEGDAWgBRdh99xn941eV8A/zYpsSWKE8vWcjAMBgNVHRMEBTADAQH/
MAkGByqGSM49BAEDSAAwRQIhAOvWNfesjT2CPQjEDato2C84lEXeOGx8wKxDKKLV
7kxfAiBDcWCPPXPQLfW/PtEn+yrRNyrd2KDKk3uU3CvviFJt6w==
-----END CERTIFICATE-----
subject=/C=US/ST=California/L=San Jose/O=A10Networks Inc./OU=QA/CN=www.automationserver.com/[email protected]
issuer=/C=US/ST=California/L=San Jose/O=A10Networks Inc./OU=QA/CN=www.automationserver.com/[email protected]
---
No client certificate CA names sent
Peer signing digest: SHA256
Server Temp Key: ECDH, P-256, 256 bits
---
SSL handshake has read 1010 bytes and written 475 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-ECDSA-AES128-SHA
Server public key is 256 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-ECDSA-AES128-SHA
    Session-ID: 0AABABCBB2C24ABD3D5BD4B84A1914EC563E3D518108A89487A6B056BB879CC4
    Session-ID-ctx: 
    Master-Key: BCD8B034C67DB603132FB69295FEB996628502A08BE9E58BAF03D365A8FFCC03E117A4D836BB782AAA2D65424686BB2A
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1503310272
    Timeout   : 7200 (sec)
    Verify return code: 18 (self signed certificate)
---
drop connection and then reconnect
CONNECTED(00000003)
---
Reused, TLSv1/SSLv3, Cipher is ECDHE-ECDSA-AES128-SHA
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-ECDSA-AES128-SHA
    Session-ID: 0AABABCBB2C24ABD3D5BD4B84A1914EC563E3D518108A89487A6B056BB879CC4
    Session-ID-ctx: 
    Master-Key: BCD8B034C67DB603132FB69295FEB996628502A08BE9E58BAF03D365A8FFCC03E117A4D836BB782AAA2D65424686BB2A
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1503310272
    Timeout   : 7200 (sec)
    Verify return code: 18 (self signed certificate)
---
drop connection and then reconnect
CONNECTED(00000003)
---
Reused, TLSv1/SSLv3, Cipher is ECDHE-ECDSA-AES128-SHA
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-ECDSA-AES128-SHA
    Session-ID: 0AABABCBB2C24ABD3D5BD4B84A1914EC563E3D518108A89487A6B056BB879CC4
    Session-ID-ctx: 
    Master-Key: BCD8B034C67DB603132FB69295FEB996628502A08BE9E58BAF03D365A8FFCC03E117A4D836BB782AAA2D65424686BB2A
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1503310272
    Timeout   : 7200 (sec)
    Verify return code: 18 (self signed certificate)
---
drop connection and then reconnect
CONNECTED(00000003)
---
Reused, TLSv1/SSLv3, Cipher is ECDHE-ECDSA-AES128-SHA
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-ECDSA-AES128-SHA
    Session-ID: 0AABABCBB2C24ABD3D5BD4B84A1914EC563E3D518108A89487A6B056BB879CC4
    Session-ID-ctx: 
    Master-Key: BCD8B034C67DB603132FB69295FEB996628502A08BE9E58BAF03D365A8FFCC03E117A4D836BB782AAA2D65424686BB2A
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1503310272
    Timeout   : 7200 (sec)
    Verify return code: 18 (self signed certificate)
---
drop connection and then reconnect
CONNECTED(00000003)
---
Reused, TLSv1/SSLv3, Cipher is ECDHE-ECDSA-AES128-SHA
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-ECDSA-AES128-SHA
    Session-ID: 0AABABCBB2C24ABD3D5BD4B84A1914EC563E3D518108A89487A6B056BB879CC4
    Session-ID-ctx: 
    Master-Key: BCD8B034C67DB603132FB69295FEB996628502A08BE9E58BAF03D365A8FFCC03E117A4D836BB782AAA2D65424686BB2A
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1503310272
    Timeout   : 7200 (sec)
    Verify return code: 18 (self signed certificate)
---
drop connection and then reconnect
CONNECTED(00000003)
---
Reused, TLSv1/SSLv3, Cipher is ECDHE-ECDSA-AES128-SHA
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-ECDSA-AES128-SHA
    Session-ID: 0AABABCBB2C24ABD3D5BD4B84A1914EC563E3D518108A89487A6B056BB879CC4
    Session-ID-ctx: 
    Master-Key: BCD8B034C67DB603132FB69295FEB996628502A08BE9E58BAF03D365A8FFCC03E117A4D836BB782AAA2D65424686BB2A
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1503310272
    Timeout   : 7200 (sec)
    Verify return code: 18 (self signed certificate)
---
GET /ssl_ecdhe.txt HTTP/1.0

read:errno=104

答案1

我不认为--sessionid这里有卷曲或类似的选项可以使用。它也没有任何意义,因为 TLS 会话 ID(和会话令牌)都引用来自现有 TLS 握手的内部 SSL 状态,而curl 客户端没有。

相关内容