Permalink
Browse files

Merge pull request #66 from 4mo1/master

feedback service via proxy also requires rejectUnauthorized flag
  • Loading branch information...
2 parents 1fc5255 + 6b3daa1 commit 1ec14c8fe3d4e17c475392cc90f5d659e4380c23 @argon argon committed Oct 4, 2012
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/feedback.js
View
@@ -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));

0 comments on commit 1ec14c8

Please sign in to comment.