A
A
Alexander Kravtsov2014-11-12 13:29:38
PHP
Alexander Kravtsov, 2014-11-12 13:29:38

How to authenticate with an SSL certificate?

Hello.
There is the following problem:
There is a certificate issued through Crypto Pro and installed on a Windows Machine, you need to send a SOAP request from this machine using PHP to a specific resource. When I go to this resource through MSIE, I am prompted to select a certificate. When I send a request via PHP-SOAP, an error occurs Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'hostname' : failed to load external entity "hostname", if I connect a certificate, then the error is the same, I use the login password for authorization sent to me.
When trying to send the same request via curl, the error d2i_PublickKey:unknown public key type occurs.
In this case, with ssl-handshake, you need to "present" the certificate of the test user to the server.
Tell me how it's done.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton B, 2014-11-12
@bigton

From here php.net

$connection = ssh2_connect('shell.example.com', 22, array('hostkey'=>'ssh-rsa'));

if (ssh2_auth_pubkey_file($connection, 'username', 
        '/home/username/.ssh/id_rsa.pub', 
        '/home/username/.ssh/id_rsa', 'secret')) 
    echo "Public Key Authentication Successful\n";
else 
    die('Public Key Authentication Failed');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question