Id da sessão usando curl_7_35

0

Eu quero usar o curl para obter o id da sessão. Então, por favor me ajude se houver alguma maneira de obter o id da sessão usando o Curl. Antes eu estava usando o Open SSL para capturar o id da sessão. Agora não quero usá-lo.

Eu tentei enviar este comando:

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

Estou sentindo falta de algo aqui? Se sim, por favor me avise.

Saída se eu usar o 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
    
por alpha 21.08.2017 / 12:19

1 resposta

0

Eu não acho que haja uma opção --sessionid para curl ou algo semelhante que você possa usar aqui. Também não faria sentido, já que o ID da sessão TLS (e o token de sessão) refere-se aos estados SSL internos de um handshake de TLS existente que o cliente de curl não possui.

    
por 21.08.2017 / 12:29

Tags