npm / npm-registry-client

http://npm.im/npm-registry-client
ISC License
264 stars 108 forks source link

ssl.certificate option is confused for ssl.cert in lib/initialize.js #103

Closed atamon closed 9 years ago

atamon commented 9 years ago

The documentation says that ssl.certificate is what should be used for supplying this option.

I'm unable to get this to work when running this registry-client through the npm cli however, please see https://github.com/npm/npm/issues/7672 for more background on this.

The error I'm getting is

npm info retry will retry, error on last attempt: Error: 140735288345344:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/s3_pkt.c:1275:SSL alert number 40

and stunnel.log on my server says that it never receives a certificate. (Debugging the npm-registry-client code also indicates that this option gets lost along the way).

Please see PR below for proposed fix.