OpenSSLతో HTTP ప్రాక్సీ ద్వారా వెబ్సైట్ సర్టిఫికెట్ను పరిశీలించండి
HTTP CONNECT ప్రాక్సీ ద్వారా OpenSSL s_client ఉపయోగించి గమ్యస్థాన పేరు, SNI మరియు సర్టిఫికెట్ ధృవీకరణను సమన్వయంగా ఉంచండి.
s_clientకు మద్దతు ఇచ్చే ఇన్స్టాల్ చేసిన OpenSSL -proxyను ఉపయోగించండి. అనుమతించబడిన HTTP CONNECT endpoint కోసం:
openssl s_client -proxy proxy.example:3128 -connect example.com:443 -servername example.com -verify_hostname example.com -verify_return_error -showcertsప్రాక్సీ చిరునామాను మార్చి ఉద్దేశించిన గమ్యస్థాన పేరును స్థిరంగా ఉపయోగించండి. ఎంచుకోగల ప్రాక్సీ ద్వారా public destination పరీక్షించడానికి HTTP proxy list నుంచి HTTP candidate ఎంచుకోండి. -connect లక్ష్యాన్ని ఎంచుకుంటుంది, -servername దాని TLS virtual hostకు SNI పంపుతుంది, -verify_hostname గుర్తింపును తనిఖీ చేస్తుంది. SNI ఒక్కటే hostname verification కాదు. ఎంపికలను మార్చేటప్పుడు ఇన్స్టాల్ చేసిన release manual చూడండి.
-showcerts server పంపినదాన్ని చూపిస్తుంది; chain నమ్మదగినదని ప్రకటించదు. -verify_return_error verification errors వచ్చినప్పుడు handshakeను ముగిస్తుంది; లేకపోతే diagnostic client errors తర్వాత కొనసాగవచ్చు. Private service కోసం ఆమోదించిన CA material వాడండి, యాదృచ్ఛికంగా download చేసిన certificateను నమ్మవద్దు.
| ఫలితం | దశ |
|---|---|
| 407 | Destination TLSకు ముందు proxy authentication. |
| తిరస్కరించిన CONNECT target | Proxy destination policy. |
| Certificate అందింది, verification ప్రయత్నించబడింది | ఆమోదించిన tunnel ద్వారా destination TLS exchange. |
OpenSSL 3.x మరియు Basic-authenticating HTTP proxyతో destination verification ఉంచి s_client proxy-account options వాడండి.
SOCKS-only endpoint ఈ command ఉపయోగించే HTTP proxy interfaceను అందించదు. Authorized TLS interceptionలో కనిపించే certificate ఆ intermediary జారీ చేసి ఉండవచ్చు. తేడాను చెడిపోయిన websiteకి ఆపాదించే ముందు దాని issuer మరియు intended trust arrangement పోల్చండి.