php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50614 Certificate private key
Submitted: 2009-12-30 22:51 UTC Modified: 2009-12-31 17:51 UTC
From: dimarikson at yandex dot ru Assigned:
Status: Not a bug Package: OpenSSL related
PHP Version: 5.2.12 OS: FreeBSD 7, Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dimarikson at yandex dot ru
New email:
PHP Version: OS:

 

 [2009-12-30 22:51 UTC] dimarikson at yandex dot ru
Description:
------------
Setting curl certificate option "CURLOPT_SSLCERT" arrouse checking of a private key and throws an error if key is not valid or empty: "(58) unable to set private key file". 

But many sites do not provide private key at all (i.e. only outgoing data being encrypted). So this makes impossible to communicate with these sites through php.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-31 13:01 UTC] dimarikson at yandex dot ru
Actually this is not a bug. May be a misfunction. I found this in a curl source code:

if(SSL_CTX_use_PrivateKey_file(ctx, key_file, file_type) != 1) {
failf(data, "unable to set private key file: '%s' type %s",
key_file, key_type?key_type:"PEM");

Also I have found a solution how to avoid this. I have used "OpenSSL" library and "fsockopen" to manually encrypt and send the request. May be this is a bit offtopic, but I guess it can help someone.
 [2009-12-31 17:51 UTC] jani@php.net
You should report curl bugs at:
 
 http://sourceforge.net/tracker/?group_id=976&atid=100976
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC