PHP code example of alanmburr / self-signed-tls-generator

1. Go to this page and download the library: Download alanmburr/self-signed-tls-generator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

alanmburr / self-signed-tls-generator example snippets


> $dn = new DistinguishedName("US", "Virginia", "Richmond", "org", false, "mynewawesometlsdomain.local", false);
> 

> $ca = new CaInformation(__DIR__."/ca.crt", __DIR__."/ca.key", "123abc");
> 

> $tlsgen = new SelfSignedTlsGenerator($dn);
> 

> $crt = $tlsgen->generateFromDN($ca);
> print_r($crt);
>