public function createRequest()
    {
        $this->crt = new SignedCertificate();
        $this->crt->setPrivateKey(openssl_pkey_new($this->certConfigure));

        $privKey = $this->crt->getPrivateKey();
        $this->crt->setCsr(openssl_csr_new($this->domainName()->get(), $privKey, $this->certConfigure));

        $request = json_encode([
            'csr' => $this->crt->getCsr()
        ]);

        // Send CSR to server and wait for signing
        $response = $this->signWithServer($request);
        $response = json_decode($response);
        $this->crt->setSignedCert(openssl_x509_read($response->certificate));

        return $this;
    }
public function createRequest()
    {
        $this->crt = new SignedCertificate();
        $this->crt->setPrivateKey(openssl_pkey_new($this->certConfigure));

        $privKey = $this->crt->getPrivateKey();
        $this->crt->setCsr(openssl_csr_new($this->domainName()->get(), $privKey, $this->certConfigure));

        $request = json_encode([
            'csr' => $this->crt->getCsr()
        ]);

        // Send CSR to server and wait for signing
        $response = $this->signWithServer($request);
        $response = json_decode($response);
        $this->crt->setSignedCert(openssl_x509_read($response->certificate));

        return $this;
    }
public function createRequest ( ) { $ this -> crt = new SignedCertificate ( ) ; $ this -> crt -> setPrivateKey ( openssl_pkey_new ( $ this -> certConfigure ) ) ; $ privKey = $ this -> crt -> getPrivateKey ( ) ; $ this -> crt -> setCsr ( openssl_csr_new ( $ this -> domainName ( ) -> get ( ) , $ privKey , $ this -> certConfigure ) ) ; $ request = json_encode ( [ 'csr' => $ this -> crt -> getCsr ( ) ] ) ; // Send CSR to server and wait for signing $ response = $ this -> signWithServer ( $ request ) ; $ response = json_decode ( $ response ) ; $ this -> crt -> setSignedCert ( openssl_x509_read ( $ response -> certificate ) ) ; return $ this ; }
Create request for server signing
For Client App

@return string
Create request for server signing For Client App