我想知道有没有办法向启动的会话OpenSSL发送查询。有点像?
openssl s_client -connect some.secure-server.com:443 < data.txt
不幸的是,以下代码不起作用。有任何想法如何修改它以使其工作?
谢谢, 纳斯
答案 0 :(得分:-3)
为什么你感谢Jona,显然Jona没有帮助过你。
the documentation的哪一部分未被学生理解?
懒散的人!
禪師無@北京:~ $ openssl s_client -connect google.com:443
CONNECTED(00000003)
depth=1 C = ZA, O = Thawte Consulting (Pty) Ltd., CN = Thawte SGC CA
verify error:num=20:unable to get local issuer certificate
verify return:0
---
Certificate chain
0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=www.google.com
i:/C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA
1 s:/C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA
i:/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIDITCCAoqgAwIBAgIQL9+89q6RUm0PmqPfQDQ+mjANBgkqhkiG9w0BAQUFADBM
MQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkg
THRkLjEWMBQGA1UEAxMNVGhhd3RlIFNHQyBDQTAeFw0wOTEyMTgwMDAwMDBaFw0x
MTEyMTgyMzU5NTlaMGgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh
MRYwFAYDVQQHFA1Nb3VudGFpbiBWaWV3MRMwEQYDVQQKFApHb29nbGUgSW5jMRcw
FQYDVQQDFA53d3cuZ29vZ2xlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC
gYEA6PmGD5D6htffvXImttdEAoN4c9kCKO+IRTn7EOh8rqk41XXGOOsKFQebg+jN
gtXj9xVoRaELGYW84u+E593y17iYwqG7tcFR39SDAqc9BkJb4SLD3muFXxzW2k6L
05vuuWciKh0R73mkszeK9P4Y/bz5RiNQl/Os/CRGK1w7t0UCAwEAAaOB5zCB5DAM
BgNVHRMBAf8EAjAAMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9jcmwudGhhd3Rl
LmNvbS9UaGF3dGVTR0NDQS5jcmwwKAYDVR0lBCEwHwYIKwYBBQUHAwEGCCsGAQUF
BwMCBglghkgBhvhCBAEwcgYIKwYBBQUHAQEEZjBkMCIGCCsGAQUFBzABhhZodHRw
Oi8vb2NzcC50aGF3dGUuY29tMD4GCCsGAQUFBzAChjJodHRwOi8vd3d3LnRoYXd0
ZS5jb20vcmVwb3NpdG9yeS9UaGF3dGVfU0dDX0NBLmNydDANBgkqhkiG9w0BAQUF
AAOBgQCfQ89bxFApsb/isJr/aiEdLRLDLE5a+RLizrmCUi3nHX4adpaQedEkUjh5
u2ONgJd8IyAPkU0Wueru9G2Jysa9zCRo1kNbzipYvzwY4OA8Ys+WAi0oR1A04Se6
z5nRUP8pJcA2NhUzUnC+MY+f6H/nEQyNv4SgQhqAibAxWEEHXw==
-----END CERTIFICATE-----
subject=/C=US/ST=California/L=Mountain View/O=Google Inc/CN=www.google.com
issuer=/C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA
---
No client certificate CA names sent
---
SSL handshake has read 1907 bytes and written 397 bytes
---
New, TLSv1/SSLv3, Cipher is RC4-SHA
Server public key is 1024 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : RC4-SHA
Session-ID: E17E53235F9870A35F3F477AE7E8692875A46DA68F4E0FAC4D0A81AF8CFAE5B8
Session-ID-ctx:
Master-Key: 3A8C9540963D5538063D74B5BC2174CEF1145917F02FCD6111D246D9357EB90B7E79076CCD597D37BD2C3FACBE0377B6
Key-Arg : None
PSK identity: None
PSK identity hint: None
TLS session ticket lifetime hint: 100800 (seconds)
TLS session ticket:
0000 - 1a b6 4a e9 9e fd 36 e2-74 0a 05 ba 4c bf b3 d3 ..J...6.t...L...
0010 - f1 7e 67 8b 81 d3 af cb-52 3c d1 8f 3f b0 97 5f .~g.....R<..?.._
0020 - 67 30 ea 32 7e f2 c6 01-5e 73 53 6d f3 d0 bb 65 g0.2~...^sSm...e
0030 - fa b5 03 af 76 0d 9f 25-93 f8 b4 70 1f d7 25 3d ....v..%...p..%=
0040 - ec 09 82 81 a0 48 11 41-0b 93 bf 08 df 25 a6 87 .....H.A.....%..
0050 - 5a 11 13 ad 0d 6e 58 a2-22 9c 96 be 38 cc 3c 51 Z....nX."...8.<Q
0060 - ff 35 99 cd 46 f4 b9 9c-07 7e c9 e4 31 69 55 83 .5..F....~..1iU.
0070 - 58 41 a6 83 f1 87 7c d5-38 ac ec 7f 65 6d b6 a6 XA....|.8...em..
0080 - 3a 68 aa 68 4e 5b b4 6d-81 91 a0 7d fd cc 56 db :h.hN[.m...}..V.
0090 - ad da c9 74 ...t
Start Time: 1288632388
Timeout : 300 (sec)
Verify return code: 20 (unable to get local issuer certificate)
---