protected function addSignature(SignedElement $element)
    {
        if ($this->signKey === null) {
            return;
        }

        /** @var string $this->signAlg */
        $privateKey = new XMLSecurityKey($this->signAlg, ['type' => 'private']);
        if ($this->signKeyPass !== null) {
            $privateKey->passphrase = $this->signKeyPass;
        }
        $privateKey->loadKey($this->signKey, false);

        $element->setSignatureKey($privateKey);

        if ($this->signCert !== null) {
            $element->setCertificates([$this->signCert]);
        }
    }
protected function addSignature(SignedElement $element)
    {
        if ($this->signKey === null) {
            return;
        }

        /** @var string $this->signAlg */
        $privateKey = new XMLSecurityKey($this->signAlg, ['type' => 'private']);
        if ($this->signKeyPass !== null) {
            $privateKey->passphrase = $this->signKeyPass;
        }
        $privateKey->loadKey($this->signKey, false);

        $element->setSignatureKey($privateKey);

        if ($this->signCert !== null) {
            $element->setCertificates([$this->signCert]);
        }
    }
protected function addSignature ( SignedElement $ element ) { if ( $ this -> signKey === null ) { return ; } /** @var string $this->signAlg */ $ privateKey = new XMLSecurityKey ( $ this -> signAlg , [ 'type' => 'private' ] ) ; if ( $ this -> signKeyPass !== null ) { $ privateKey -> passphrase = $ this -> signKeyPass ; } $ privateKey -> loadKey ( $ this -> signKey , false ) ; $ element -> setSignatureKey ( $ privateKey ) ; if ( $ this -> signCert !== null ) { $ element -> setCertificates ( [ $ this -> signCert ] ) ; } }
Sign the generated EntitiesDescriptor.
@return void
Sign the generated EntitiesDescriptor .