npm / npm-registry-client

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

Not fail if OpenSSL crypto support isn't available #66

Closed piranna closed 10 years ago

piranna commented 10 years ago

If node.js is compiled without OpenSSL crypto support NPM fails to load, but it's only required for publishing. This patch catch the exception thrown by 'crypto' module if OpenSSL is not available and left the 'crypto' namespace undefined. Later, when publish() function is called, an error is given on the callback. This way, npm-registry-client`` andnpm``` itself can be used on node.js compilations without OpenSSL support.

othiym23 commented 10 years ago

This is only a partial fix for the underlying issue, and as such, it doesn't really make sense to accept on its own. Sorry!