Last active
April 8, 2016 18:35
-
-
Save pgampe/99b15f690178f364d33c to your computer and use it in GitHub Desktop.
Test TLS Support by PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
echo '<html><head><title>Test cURL with TLS</title></head><body><pre>'; | |
$fp = fopen("/dev/null", "w"); | |
$output = fopen('php://output', 'rw'); | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, "http://repositories.typo3.org/mirrors.xml.gz"); | |
curl_setopt($ch, CURLOPT_FILE, $fp); | |
curl_setopt($ch, CURLOPT_HEADER, true); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); | |
curl_setopt($ch, CURLOPT_MAXREDIRS, 10); | |
curl_setopt($ch, CURLOPT_VERBOSE, true); | |
curl_setopt($ch, CURLOPT_CERTINFO, true); | |
curl_setopt($ch, CURLOPT_STDERR, $output); | |
curl_setopt($ch, CURLOPT_WRITEHEADER, $output); | |
curl_exec($ch); | |
$error = curl_error($ch); | |
print_r($error); | |
curl_close($ch); | |
echo '</pre></body></html>'; | |
curl_exec($ch); | |
$error = curl_error($ch); | |
print_r($error); | |
curl_close($ch); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Trying 91.184.35.5... | |
* Connected to repositories.typo3.org (91.184.35.5) port 80 (#0) | |
> GET /mirrors.xml.gz HTTP/1.1 | |
Host: repositories.typo3.org | |
Accept: */* | |
< HTTP/1.1 301 Moved Permanently | |
HTTP/1.1 301 Moved Permanently | |
< Server: nginx/1.9.9 | |
Server: nginx/1.9.9 | |
< Date: Fri, 18 Mar 2016 22:30:36 GMT | |
Date: Fri, 18 Mar 2016 22:30:36 GMT | |
< Content-Type: text/html | |
Content-Type: text/html | |
< Content-Length: 184 | |
Content-Length: 184 | |
< Connection: keep-alive | |
Connection: keep-alive | |
< Location: https://repositories.typo3.org/mirrors.xml.gz | |
Location: https://repositories.typo3.org/mirrors.xml.gz | |
< Strict-Transport-Security: max-age=31536000; includeSubdomains; preload; | |
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload; | |
< X-Content-Type-Options: nosniff | |
X-Content-Type-Options: nosniff | |
< X-Frame-Options: SAMEORIGIN | |
X-Frame-Options: SAMEORIGIN | |
< X-XSS-Protection: 1; mode=block | |
X-XSS-Protection: 1; mode=block | |
< | |
* Ignoring the response-body | |
* Connection #0 to host repositories.typo3.org left intact | |
* Issue another request to this URL: 'https://repositories.typo3.org/mirrors.xml.gz' | |
* Found bundle for host repositories.typo3.org: 0x56473e0ba1e0 | |
* Trying 91.184.35.5... | |
* Connected to repositories.typo3.org (91.184.35.5) port 443 (#1) | |
* Initializing NSS with certpath: sql:/etc/pki/nssdb | |
* CAfile: /etc/pki/tls/certs/ca-bundle.crt | |
CApath: none | |
* NPN, server accepted to use http/1.1 | |
* SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 | |
* Server certificate: | |
* 0 Subject: CN=*.typo3.org | |
* Issuer: C=US, O=GeoTrust Inc., CN=RapidSSL SHA256 CA - G4 | |
* Version: 3 (0x2) | |
* Serial Number: 0x612d | |
* Signature Algorithm: sha256WithRSAEncryption | |
* Start Date: 2016-02-04 23:50:08 GMT | |
* Expire Date: 2019-05-04 08:51:17 GMT | |
* Public Key Algorithm: rsaEncryption | |
* RSA Public Key (2048 bits) | |
* rsa(n): b6:3d:f8:60:25:a7:21:3d:db:5c:9a:ed:03:b5:c5:3e:03:e7:83:33:e7:e7:58:76:3c:e3:b0:5c:2f:e6:27:df:07:a6:75:82:0e:f5:b3:bd:96:a1:80:f4:da:b9:b3:56:5f:23:13:e3:92:43:55:88:78:43:c8:53:9f:8b:7f:97:78:d9:4b:52:6a:75:3f:a3:02:33:71:48:c7:5a:f7:3d:80:b6:58:c1:68:bb:e6:8d:d7:ec:43:8c:7a:d3:8a:ef:ca:1f:f5:29:4d:2f:0b:00:d3:38:64:12:08:eb:8d:60:7d:6e:4b:30:91:1c:e0:9a:12:64:cd:b0:6b:6a:29:1a:5f:96:3b:dc:b1:72:b1:18:ad:48:13:30:f1:47:f9:35:86:b7:e2:55:48:dc:23:f1:76:6a:72:a3:01:03:ec:bc:53:f7:4b:81:20:e0:c9:88:bb:76:b4:fe:d4:ab:dc:ce:01:2c:20:ab:8f:83:17:65:12:63:15:10:b8:4b:0e:1a:ad:a8:fd:fa:0f:ac:3e:6b:27:11:d6:6f:ea:4e:66:69:ca:a6:b8:df:42:ea:5e:4e:c0:3d:b9:bf:1d:23:9a:83:70:96:46:3e:4f:0c:20:d3:8c:ca:17:f9:cd:cc:26:b2:f6:15:f8:99:6a:58:d4:a4:3b:e9:99:50:2f:ad:90:6d: | |
* rsa(e): 0x10001 | |
* Signature: 91:b3:f8:a5:9d:c2:79:fa:9c:92:13:12:06:e3:68:c1:8f:9e:39:bf:99:ab:32:50:b4:97:4a:8e:4e:95:5e:5c:51:ea:7f:a8:7a:bc:4a:f4:bd:4e:78:e6:56:6c:9b:dd:2c:ef:55:15:ce:7b:0e:cb:4e:ff:df:a5:0c:9f:2e:c3:79:a7:d7:a2:77:22:00:62:84:39:a9:dd:0a:41:75:fc:1f:2f:e4:af:5a:1f:d0:37:95:1d:7b:19:f0:e3:81:d7:b4:e6:bf:98:9b:a7:cb:6a:e0:94:07:c2:e6:5a:31:5c:e7:4f:04:e5:93:0b:7f:e1:e4:48:8b:a0:e8:3d:95:bc:7e:bf:4b:49:d8:be:01:24:2a:80:d7:8e:2b:e3:9d:f1:93:26:74:68:32:92:db:30:8b:cc:90:3e:24:aa:67:52:2e:d5:e3:75:2e:9e:fe:e3:c6:fe:91:ca:95:e2:5d:5c:ba:be:ca:2e:99:a6:88:a7:2a:3e:9e:0a:65:9e:24:85:7f:a6:b9:4e:31:2d:b2:fe:63:76:2f:7d:ac:3f:a1:37:f4:99:b2:30:0d:e1:cf:47:02:8f:02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R8EJDAiMCCgHqAchhpodHRwOi8vZ3ouc3ltY2IuY29tL2d6LmNybDAMBgNVHRMB | |
Af8EAjAAMEEGA1UdIAQ6MDgwNgYGZ4EMAQIBMCwwKgYIKwYBBQUHAgEWHmh0dHBz | |
Oi8vd3d3LnJhcGlkc3NsLmNvbS9sZWdhbDANBgkqhkiG9w0BAQsFAAOCAQEAkbP4 | |
pZ3CefqckhMSBuNowY+eOb+ZqzJQtJdKjk6VXlxR6n+oerxK9L1OeOZWbJvdLO9V | |
Fc57DstO/9+lDJ8uw3mn16J3IgBihDmp3QpBdfwfL+SvWh/QN5Udexnw44HXtOa/ | |
mJuny2rglAfC5loxXOdPBOWTC3/h5EiLoOg9lbx+v0tJ2L4BJCqA144r453xkyZ0 | |
aDKS2zCLzJA+JKpnUi7V43Uunv7jxv6RypXiXVy6vsoumaaIpyo+ngplniSFf6a5 | |
TjEtsv5jdi99rD+hN/SZsjAN4c9HAo8CUuL+3wx58WUOuob+XXePb0zNCnJieSei | |
gqEPyomRbLZv39N13g== | |
-----END CERTIFICATE----- | |
> GET /mirrors.xml.gz HTTP/1.1 | |
Host: repositories.typo3.org | |
Accept: */* | |
< HTTP/1.1 200 OK | |
HTTP/1.1 200 OK | |
< Server: nginx/1.9.9 | |
Server: nginx/1.9.9 | |
< Date: Fri, 18 Mar 2016 22:30:36 GMT | |
Date: Fri, 18 Mar 2016 22:30:36 GMT | |
< Content-Type: application/x-gzip | |
Content-Type: application/x-gzip | |
< Content-Length: 265 | |
Content-Length: 265 | |
< Connection: keep-alive | |
Connection: keep-alive | |
< Last-Modified: Mon, 25 Jan 2016 19:40:36 GMT | |
Last-Modified: Mon, 25 Jan 2016 19:40:36 GMT | |
< ETag: "fa5de6-109-52a2dbe316ea2" | |
ETag: "fa5de6-109-52a2dbe316ea2" | |
< Accept-Ranges: bytes | |
Accept-Ranges: bytes | |
< Vary: Accept-Encoding | |
Vary: Accept-Encoding | |
< Strict-Transport-Security: max-age=31536000; includeSubdomains; preload; | |
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload; | |
< X-Content-Type-Options: nosniff | |
X-Content-Type-Options: nosniff | |
< X-Frame-Options: SAMEORIGIN | |
X-Frame-Options: SAMEORIGIN | |
< X-XSS-Protection: 1; mode=block | |
X-XSS-Protection: 1; mode=block | |
< | |
* Connection #1 to host repositories.typo3.org left intact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment