Skip to content

Instantly share code, notes, and snippets.

@brankoajzele
Last active December 11, 2015 11:38
Show Gist options
  • Save brankoajzele/4594662 to your computer and use it in GitHub Desktop.
Save brankoajzele/4594662 to your computer and use it in GitHub Desktop.
<?php
$certificate = null;
$certificatePass = 'MyCertPassHere';
$pfxCertificate = '/path/to/cert/fiskal-demo-aplikativni.pfx';
openssl_pkcs12_read(file_get_contents($pfxCertificate), $certificate, $certificatePass);
$publicCertificate = $certificate['cert'];
$privateKey = $certificate['pkey'];
$privateKeyResource = openssl_pkey_get_private($privateKey, $certificatePass);
$publicCertificateData = openssl_x509_parse($publicCertificate);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment