Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added support for HTTPS cert & key #433

Merged
merged 3 commits into from

3 participants

@indexzero

Currently request does not support some of the options from node core https.request. This pull request adds support for key, cert, and rejectUnauthorized options.

Including full list from nodejs.org/api for reference

The following options from tls.connect() can also be specified. However, a globalAgent silently ignores these.

  • pfx: Certificate, Private key and CA certificates to use for SSL. Default null.
  • key: Private key to use for SSL. Default null.
  • passphrase: A string of passphrase for the private key or pfx. Default null.
  • ca: An authority certificate or array of authority certificates to check the remote host against.
  • cert: Public x509 certificate to use. Default null.
  • ciphers: A string describing the ciphers to use or exclude. Consult http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT for details on the format.
  • rejectUnauthorized: If true, the server certificate is verified against the list of supplied CAs. An 'error' event is emitted if verification fails. Verification happens at the connection level, before the HTTP request is sent. Default false.
@indexzero

@mikeal worth noting that this is basically #399 without any attention paid to streams2. Breaking it out into a separate PR so it can land first.

@mikeal mikeal merged commit 7b6f90d into from
@indexzero indexzero deleted the branch
@indexzero

Rock!

@indexzero indexzero referenced this pull request in opsmezzo/conservatory-api
Merged

[api] Add certificate and key support #8

@mikeal
Owner

this was just pushed in a release.

@cybdoom cybdoom referenced this pull request from a commit in cybdoom/EbayAmazonApiServer
@cybdoom cybdoom