Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added missing branches

added missing branches
  • Loading branch information...
commit edec0bca314ef0e32ab0a4c65cc878b50a6e0ca8 1 parent 1516f9a
@pocketcrocodile authored
View
3  lib/Cake/Network/Http/HttpResponse.php
@@ -428,8 +428,9 @@ public function offsetGet($offset) {
public function setContext($context){
if (get_resource_type($context) === "OpenSSL X.509" && function_exists(openssl_x509_export)){
- if (!isset($context))
+ if (!isset($context)){
return false;
+ }
openssl_x509_export($context, &$certstring);
$certstring = str_replace('-----BEGIN CERTIFICATE-----', '', $certstring);
$certstring = str_replace('-----END CERTIFICATE-----', '', $certstring);
View
7 lib/Cake/Network/Http/HttpSocket.php
@@ -384,9 +384,9 @@ public function request($request = array()) {
$responseClass = $this->responseClass;
$this->response = new $responseClass($response);
- if (!empty($context) && isset($context['ssl']['peer_certificate']))
+ if (!empty($context) && isset($context['ssl']['peer_certificate'])){
$this->response->setContext($context['ssl']['peer_certificate']);
-
+ }
if (!empty($this->response->cookies)) {
if (!isset($this->config['request']['cookies'][$Host])) {
$this->config['request']['cookies'][$Host] = array();
@@ -759,8 +759,9 @@ private function _configContext($context = null){
public function checkFingerprint($fingerprint){
- if (!isset($this->request['context']['ssl']['peer_certificate']))
+ if (!isset($this->request['context']['ssl']['peer_certificate'])){
return false;
+ }
openssl_x509_export($this->request['context']['ssl']['peer_certificate'], &$certstring);
$certstring = str_replace('-----BEGIN CERTIFICATE-----', '', $certstring);
$certstring = str_replace('-----END CERTIFICATE-----', '', $certstring);
Please sign in to comment.
Something went wrong with that request. Please try again.