Skip to content

Commit

Permalink
check if ACME resource is available
Browse files Browse the repository at this point in the history
  • Loading branch information
skoerfgen committed Apr 22, 2022
1 parent 075a2d2 commit d59a772
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ACMEv2.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ protected function jws_encapsulate($type,$payload,$is_inner_jws=false){ // RFC75
$this->nonce=null;
}

if (!isset($this->resources[$type])){
throw new Exception('Resource "'.$type.'" not available.');
}

$protected['url']=$this->resources[$type];

$protected64=$this->base64url(json_encode($protected,JSON_UNESCAPED_SLASHES));
Expand Down

0 comments on commit d59a772

Please sign in to comment.