PHP code example of hrobertson / x509-verify

1. Go to this page and download the library: Download hrobertson/x509-verify 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/ */

    

hrobertson / x509-verify example snippets


use HRobertson\X509Verify\SslCertificate;

$leafCertificate = new SslCertificate(file_get_contents('example.com.pem'));
$issuerCertificate = new SslCertificate(file_get_contents('intermediate.pem'));

$leafCertificate->isSignedBy($issuerCertificate); // returns true if $leafCertificate is signed by $issuerCertificate