Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add support for rejectUnauthorized in socket options when using a loc…

…al proxy
  • Loading branch information...
commit 6b3daa143d1f3aa50b8175b0c050fddd173d01a7 1 parent 1fc5255
Amol Neurgaonkar authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/feedback.js
View
7 lib/feedback.js
@@ -42,6 +42,7 @@ function Feedback(options) {
ca: null, /* Certificate Authority
address: 'feedback.push.apple.com', /* feedback address */
port: 2196, /* feedback port */
+ rejectUnauthorized: true, /* Set this to false incase using a local proxy, reject otherwise */
feedback: false, /* enable feedback service, set to callback */
errorCallback: false, /* error handler to catch connection exceptions */
interval: 3600, /* interval in seconds to connect to feedback service */
@@ -135,17 +136,13 @@ Feedback.prototype.connect = function () {
socketOptions.cert = this.certData;
socketOptions.passphrase = this.options.passphrase;
socketOptions.ca = this.options.ca;
+ socketOptions.rejectUnauthorized = this.options.rejectUnauthorized;
this.socket = tls.connect(
this.options['port'],
this.options['address'],
socketOptions,
function () {
- if (!this.socket.authorized) {
- this.deferredConnection.reject(this.socket.authorizationError);
- this.deferredConnection = null;
- }
-
debug("Connection established");
this.deferredConnection.resolve();
}.bind(this));
Please sign in to comment.
Something went wrong with that request. Please try again.