public function withIssuerCertificate(Certificate $cert): self
    {
        $obj = clone $this;
        // set issuer DN from cert's subject
        $obj->_issuer = $cert->tbsCertificate()->subject();
        // add authority key identifier extension
        $key_id = $cert->tbsCertificate()
            ->subjectPublicKeyInfo()
            ->keyIdentifier();
        $obj->_extensions = $obj->_extensions->withExtensions(
            new AuthorityKeyIdentifierExtension(false, $key_id));
        return $obj;
    }
public function withIssuerCertificate(Certificate $cert): self
    {
        $obj = clone $this;
        // set issuer DN from cert's subject
        $obj->_issuer = $cert->tbsCertificate()->subject();
        // add authority key identifier extension
        $key_id = $cert->tbsCertificate()
            ->subjectPublicKeyInfo()
            ->keyIdentifier();
        $obj->_extensions = $obj->_extensions->withExtensions(
            new AuthorityKeyIdentifierExtension(false, $key_id));
        return $obj;
    }
public function withIssuerCertificate ( Certificate $ cert ) : self { $ obj = clone $ this ; // set issuer DN from cert's subject $ obj -> _issuer = $ cert -> tbsCertificate ( ) -> subject ( ) ; // add authority key identifier extension $ key_id = $ cert -> tbsCertificate ( ) -> subjectPublicKeyInfo ( ) -> keyIdentifier ( ) ; $ obj -> _extensions = $ obj -> _extensions -> withExtensions ( new AuthorityKeyIdentifierExtension ( false , $ key_id ) ) ; return $ obj ; }
Get self with fields set from the issuer's certificate.

Issuer shall be set to issuing certificate's subject.
Authority key identifier extensions shall be added with a key identifier
set to issuing certificate's public key identifier.

@param Certificate $cert Issuing party's certificate
@return self
Get self with fields set from the issuer s certificate .