SoapClient and apache strong authentication with openssl certificate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

I have a question for you.
I succeeded on generating certificates, securing apache and connecting to a
web service using soap with a certificate authentication mecanism.

Now, i'm wondering what the openssl module can do.

My wish is to generate a client certificate through the openssl module's
functions.
But the documentation isn't very useful at the moment.

I'm trying to do the exact same thing as :
https://gist.github.com/901407starting at the line 8
It looks like :
$privkey = openssl_pkey_new();
$privkey = openssl_pkey_new();
$csr = openssl_csr_new($dn, $privkey);
$sscert = openssl_csr_sign($csr, file_get_contents('/PATH_TO/ca.crt'),
file_get_contents('/PATH_TO/ca.key'), 10000);
openssl_x509_export($sscert, $cert);
openssl_pkcs12_export($cert, $pkcs12, $privkey, '', array('clcerts',
'nokeys'));

And here I'm stuck. Is there a way to do the following command in PHP ?
openssl pkcs12 -nodes -clcerts -in cacert.p12 -out client.pem

thanks

Denis Fingonnet

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux