Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request support for client side SSL certificates #116

Open
rob-watts2 opened this issue Oct 3, 2016 · 4 comments
Open

Request support for client side SSL certificates #116

rob-watts2 opened this issue Oct 3, 2016 · 4 comments
Assignees

Comments

@rob-watts2
Copy link

I am requesting support for client side SSL support.

Consider this code in PHP/cURL fragment:

    curl_setopt($curl, CURLOPT_CAINFO, 'someCertificateCA.pem'); 
    curl_setopt($curl, CURLOPT_SSLCERT, 'someClientSideSSLCertificate.pem');
    curl_setopt($curl, CURLOPT_SSLCERTPASSWD, "aPassw0rd");

There is no way to do this in the current version of UniRest for PHP that I'm aware of.
Can it be added?

@ahmadnassri ahmadnassri self-assigned this Oct 21, 2016
@ahmadnassri
Copy link
Contributor

indeed, this is something important to add

@serveba
Copy link

serveba commented Sep 4, 2017

is there some news about this issue?

@miquelnez
Copy link

This library... is a bit abandoned... but, if you review all the code, on Request.php you can find a static curlOpts to any CURL param:

\Unirest\Request::curlOpts(array(
CURLOPT_SSLKEY => $this->keyPath,
CURLOPT_CAINFO => $this->caPath,
CURLOPT_SSLCERT => $this->certPath
));

here is the curl_setopt options:
http://us2.php.net/manual/es/function.curl-setopt.php

@rob-watts
Copy link

So is Unirest for PHP not being maintained? I like this library way better than Gulp..

I was thinking of trying to patch this up.

If you set auth like this:

// basic auth
Unirest\Request::auth('username', 'password');

Could we not do something like

Unirest\Request::certificate('certificatePath', 'password');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants