Skip to content

Commit

Permalink
add support for DER and P12 certs (#2411)
Browse files Browse the repository at this point in the history
  • Loading branch information
Razvan Grigore committed Dec 1, 2019
1 parent df36d8d commit 42110b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Handler/CurlFactory.php
Expand Up @@ -450,6 +450,10 @@ private function applyHandlerOptions(EasyHandle $easy, array &$conf)
"SSL certificate not found: {$cert}"
);
}
$ext = pathinfo($cert, PATHINFO_EXTENSION);
if (preg_match('#^(der|p12)$#i', $ext)) {
$conf[CURLOPT_SSLCERTTYPE] = strtoupper($ext);
}
$conf[CURLOPT_SSLCERT] = $cert;
}

Expand Down

0 comments on commit 42110b5

Please sign in to comment.