Doc #76388 [NEW]: CURLOPT_SSLKEYPASSWD is not supported when curl is compiled with NSS

From: Date: Tue, 29 May 2018 10:00:23 +0000
Subject: Doc #76388 [NEW]: CURLOPT_SSLKEYPASSWD is not supported when curl is compiled with NSS
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-15723@lists.php.net to get a copy of this message
From:             samuel dot chemla at orange dot com
Operating system: linux rhel
PHP version:      7.2.6
Package:          Documentation problem
Bug Type:         Documentation Problem
Bug description:CURLOPT_SSLKEYPASSWD is not supported when curl is compiled with NSS

Description:
------------
Making a request with curl and a client certificate won't work if the
client certificate key is ciphered.

Curl will generate an error:
curl error (58): unable to load client key: -8178 (SEC_ERROR_BAD_KEY) 

It seems this is due to curl compiled with NSS because with curl
compiled with openssl it works

If this is correct please could you update the documentation to warn
about this?

Test script:
---------------
curl_setopt($ch, CURLOPT_SSLCERT,       "<path to client PEM cert>");
curl_setopt($ch, CURLOPT_SSLKEY,        "<path to client PEM key>");
curl_setopt($ch, CURLOPT_SSLKEYPASSWD,  "password");




Expected result:
----------------
The client certificate should be presented to remote

Actual result:
--------------
If the private key begins with:
-----BEGIN PRIVATE KEY-----
--> it will work

If it begins with:
-----BEGIN ENCRYPTED PRIVATE KEY-----
--> it will generate "curl error (58): unable to load client key: -8178
(SEC_ERROR_BAD_KEY)"

-- 
Edit bug report at https://bugs.php.net/bug.php?id=76388&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=76388&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=76388&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=76388&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=76388&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=76388&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=76388&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=76388&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=76388&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=76388&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=76388&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=76388&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=76388&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=76388&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76388&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=76388&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=76388&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=76388&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76388&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=76388&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=76388&r=mysqlcfg



Thread (1 message)

  • samuel dot chemla at orange dot com
« previous php.doc.bugs (#15723) next »