static public function generate()
    {
        if (! extension_loaded('openssl')) {
            throw new \RuntimeException("Can only generate a remote desktop certificate when OpenSSL PHP extension is installed.");
        }
        
        // Generate a new private (and public) key pair
        $config = array(
            'config' => __DIR__ . '/../Resources/config/openssl.cnf'
        );
        $privkey = openssl_pkey_new($config);
        
        // Generate a certificate signing request
        $dn = array(
            "commonName" => "AzureDistributionBundle for Symfony Tools"
        );
        $csr = openssl_csr_new($dn, $privkey, $config);
        $sscert = openssl_csr_sign($csr, null, $privkey, 365, $config);
        
        return new self($privkey, $sscert);
    }
static public function generate()
    {
        if (! extension_loaded('openssl')) {
            throw new \RuntimeException("Can only generate a remote desktop certificate when OpenSSL PHP extension is installed.");
        }
        
        // Generate a new private (and public) key pair
        $config = array(
            'config' => __DIR__ . '/../Resources/config/openssl.cnf'
        );
        $privkey = openssl_pkey_new($config);
        
        // Generate a certificate signing request
        $dn = array(
            "commonName" => "AzureDistributionBundle for Symfony Tools"
        );
        $csr = openssl_csr_new($dn, $privkey, $config);
        $sscert = openssl_csr_sign($csr, null, $privkey, 365, $config);
        
        return new self($privkey, $sscert);
    }
static public function generate ( ) { if ( ! extension_loaded ( 'openssl' ) ) { throw new \ RuntimeException ( "Can only generate a remote desktop certificate when OpenSSL PHP extension is installed." ) ; } // Generate a new private (and public) key pair $ config = array ( 'config' => __DIR__ . '/../Resources/config/openssl.cnf' ) ; $ privkey = openssl_pkey_new ( $ config ) ; // Generate a certificate signing request $ dn = array ( "commonName" => "AzureDistributionBundle for Symfony Tools" ) ; $ csr = openssl_csr_new ( $ dn , $ privkey , $ config ) ; $ sscert = openssl_csr_sign ( $ csr , null , $ privkey , 365 , $ config ) ; return new self ( $ privkey , $ sscert ) ; }
Generate a pkcs12 file and private key to use with remote desktoping.

@param string $password
@return RemoteDesktopCertificate
Generate a pkcs12 file and private key to use with remote desktoping .