0

My webpage has a login form that requests a p12 file to validate your identity using a certificate.

How can I get the p12 information using PHP code?

Pang
  • 9,564
  • 146
  • 81
  • 122
J. García
  • 67
  • 1
  • 12

1 Answers1

2

I think this will help you.

$certs = array();
$pkcs12 = file_get_contents( "pkcs12file.pem" );
openssl_pkcs12_read( $pkcs12, $certs, "" );
print_r( $certs );

There are more in the documentation : PHP.net doc

YamneZ
  • 120
  • 9