Beispiel #1
0
 /**
  * Check whether Holder identifies given certificate.
  *
  * @param Certificate $cert
  * @return boolean
  */
 public function identifiesPKC(Certificate $cert)
 {
     // if neither baseCertificateID nor entityName are present
     if (!$this->_baseCertificateID && !$this->_entityName) {
         return false;
     }
     // if baseCertificateID is present, but doesn't match
     if ($this->_baseCertificateID && !$this->_baseCertificateID->identifiesPKC($cert)) {
         return false;
     }
     // if entityName is present, but doesn't match
     if ($this->_entityName && !$this->_checkEntityName($cert)) {
         return false;
     }
     return true;
 }