public function sign(SignatureAlgorithmIdentifier $algo,
        PrivateKeyInfo $privkey_info, Crypto $crypto = null): CertificationRequest
    {
        $crypto = $crypto ?: Crypto::getDefault();
        $data = $this->toASN1()->toDER();
        $signature = $crypto->sign($data, $privkey_info, $algo);
        return new CertificationRequest($this, $algo, $signature);
    }
public function sign(SignatureAlgorithmIdentifier $algo,
        PrivateKeyInfo $privkey_info, Crypto $crypto = null): CertificationRequest
    {
        $crypto = $crypto ?: Crypto::getDefault();
        $data = $this->toASN1()->toDER();
        $signature = $crypto->sign($data, $privkey_info, $algo);
        return new CertificationRequest($this, $algo, $signature);
    }
public function sign ( SignatureAlgorithmIdentifier $ algo , PrivateKeyInfo $ privkey_info , Crypto $ crypto = null ) : CertificationRequest { $ crypto = $ crypto ? : Crypto :: getDefault ( ) ; $ data = $ this -> toASN1 ( ) -> toDER ( ) ; $ signature = $ crypto -> sign ( $ data , $ privkey_info , $ algo ) ; return new CertificationRequest ( $ this , $ algo , $ signature ) ; }
Create signed CertificationRequest.

@param SignatureAlgorithmIdentifier $algo Algorithm used for signing
@param PrivateKeyInfo $privkey_info Private key used for signing
@param Crypto|null $crypto Crypto engine, use default if not set
@return CertificationRequest
Create signed CertificationRequest .