Peter Larsen <mail@czar.dk> skrev:
>Nogen der har eksempler de vil dele ud af?
>
>--
>regards, Peter Larsen
Under antagelse af at dit setup er
- Apache
- mod_ssl
- php 3 eller højere
konfigureret med
- klientautentifikation
- opsat med TDC OCES CA rod som trusted root
<snip>
// Retrieve Subject DN from client certificate
if(isset($_SERVER['SSL_CLIENT_S_DN']))
$subjectDN = $_SERVER['SSL_CLIENT_S_DN'];
else
$subjectDN = '';
// Retrieve Issuer DN from client certificate
if(isset($_SERVER['SSL_CLIENT_I_DN']))
$issuerDN = $_SERVER['SSL_CLIENT_I_DN'];
else
$issuerDN = '';
// Retrieve certificate serno. from client certificate
if(isset($_SERVER['SSL_CLIENT_M_SERIAL']))
$certSN = $_SERVER['SSL_CLIENT_M_SERIAL'];
else
$certSN = '';
// Retrieve Subject commonName from client certificate
//
// Note:
// Better handling of danish characters than SSL_CLIENT_S_DN
if(isset($_SERVER['SSL_CLIENT_S_DN_CN']))
$subjectCN = $_SERVER['SSL_CLIENT_S_DN_CN'];
else
$subjectCN = '';
// See more options of information to retreive at
//
http://www.modssl.org/docs/2.8/ssl_reference.html#ToC25
echo('Client Subject DN:' . $subjectDN . '<br>');
echo('Client Issuer DN:' . $issuerDN . '<br>');
echo('Client Cert Serno.:' . $certSN . '<br>');
</snip>
Såååååh, der skal altså ikke laves ret meget ud over
konfigurationen af webserveren, og her er
www.modssl.org din hjælp.
God arbejdslyst
Peter Lind Damkjær