Skip to content

Commit 1fd7793

Browse files
authored
bugfix: getSAN: also return 'IP Address' fields
2 parents 3971a21 + 9b67ec1 commit 1fd7793

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ACMECert v3.7.0
1+
# ACMECert v3.7.1
22

33
PHP client library for [Let's Encrypt](https://letsencrypt.org/) and other [ACME v2 - RFC 8555](https://tools.ietf.org/html/rfc8555) compatible Certificate Authorities.
44

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "skoerfgen/acmecert",
3-
"version": "3.7.0",
3+
"version": "3.7.1",
44
"description": "PHP client library for Let's Encrypt and other ACME v2 - RFC 8555 compatible Certificate Authorities",
55
"license": "MIT",
66
"authors": [

src/ACMECert.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,8 @@ public function getSAN($pem){
404404
}
405405
$out=array();
406406
foreach(explode(',',$ret['extensions']['subjectAltName']) as $line){
407-
list($type,$name)=array_map('trim',explode(':',$line));
408-
if ($type==='DNS'){
407+
list($type,$name)=array_map('trim',explode(':',$line,2));
408+
if ($type==='DNS' || $type==='IP Address'){
409409
$out[]=$name;
410410
}
411411
}

src/ACMEv2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ protected function http_request($url,$data=null){
308308
}
309309

310310
$method=$data===false?'HEAD':($data===null?'GET':'POST');
311-
$user_agent='ACMECert v3.7.0 (+https://github.com/skoerfgen/ACMECert)';
311+
$user_agent='ACMECert v3.7.1 (+https://github.com/skoerfgen/ACMECert)';
312312
$header=($data===null||$data===false)?array():array('Content-Type: application/jose+json');
313313
if ($this->ch) {
314314
$headers=array();

0 commit comments

Comments
 (0)