Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #64 from nsabovic/master

Add rejectUnauthorized as an option.
  • Loading branch information...
commit faebb57cf276e20287914ae1e777bd4d4bac423a 2 parents 613fbda + 2dd8215
@argon authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/connection.js
View
7 lib/connection.js
@@ -42,6 +42,7 @@ function Connection (options) {
ca: null,
gateway: 'gateway.push.apple.com',
port: 2195,
+ rejectUnauthorized: true,
enhanced: true,
errorCallback: undefined,
cacheLength: 100
@@ -133,17 +134,13 @@ Connection.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['gateway'],
socketOptions,
function () {
- if (!this.socket.authorized) {
- this.deferredConnection.reject(this.socket.authorizationError);
- return;
- }
-
if (this.connectionTimeout) {
clearTimeout(this.connectionTimeout);
}
Please sign in to comment.
Something went wrong with that request. Please try again.