Added support for HTTPS cert & key #433

merged 3 commits into from Feb 13, 2013


None yet

3 participants


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 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 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.

@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 request:master Feb 13, 2013
@indexzero indexzero deleted the indexzero:feature-https-cert-key branch Feb 13, 2013


@indexzero indexzero referenced this pull request in opsmezzo/conservatory-api Feb 14, 2013

[api] Add certificate and key support #8

mikeal commented Feb 19, 2013

this was just pushed in a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment