On Thu, Nov 22, 2012 at 3:47 PM, Steve Freegard <[email protected]> wrote: > setOptions() doesn't appear to be documented yet - can you give me an > example of how to use it. > > I've tried this: > > if (!options) options = {}; > options.secureOptions = constants.SSL_OP_ALL; > var sslcontext = crypto.createCredentials(options); > > However this throws an error: > > TypeError: Bad parameter > at new Credentials (crypto.js:65:27) > at Object.exports.createCredentials (crypto.js:74:11)
You're using it correctly but it turns out there's a bug in node that mangles the value of SSL_OP_ALL. I've landed a patch in [1] that you can cherry-pick. Alternatively, you can OR together SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS and whatever other constants you need. [1] https://github.com/joyent/node/commit/8d2753c -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
