Comparing version 3.3.3 to 3.3.4
@@ -14,5 +14,2 @@ 'use strict'; | ||
var BLACKLISTED_FINGERPRINTS = require('fs').readFileSync( | ||
path.join(__dirname, '../data/blacklisted_fingerprints'), 'utf8' | ||
).replace(/^\s+|\s+$/g, '').split('\n'); | ||
@@ -237,13 +234,2 @@ // Provide extension mechanism for Stripe Resource Sub-Classes | ||
socket.on((isInsecureConnection ? 'connect' : 'secureConnect'), function() { | ||
if (!isInsecureConnection && | ||
BLACKLISTED_FINGERPRINTS.indexOf(socket.getPeerCertificate().fingerprint) > -1) { | ||
req.abort(); | ||
return callback.call(self, | ||
new Error.StripeError({ | ||
message: 'Revoked SSL Certificate', | ||
detail: 'Invalid server certificate. You tried to connect to a server that has a revoked SSL certificate, which means we cannot securely send data to that server. Please email support@stripe.com if you need help connecting to the correct API server.' | ||
}) | ||
); | ||
} | ||
// Send payload; we're safe: | ||
@@ -250,0 +236,0 @@ req.write(requestData); |
{ | ||
"name": "stripe", | ||
"version": "3.3.3", | ||
"version": "3.3.4", | ||
"description": "Stripe API wrapper", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/stripe/stripe-node", |
@@ -32,20 +32,2 @@ 'use strict'; | ||
describe('Using revoked.stripe.com', function() { | ||
before(function() { | ||
stripe.setHost('revoked.stripe.com', 444); | ||
}); | ||
after(function() { | ||
stripe.setHost('api.stripe.com', 443); | ||
}); | ||
it('Throws "revoked ssl cert" correctly', function() { | ||
return expect( | ||
stripe.account.retrieve() | ||
).to.eventually.be.rejectedWith('Revoked SSL Certificate'); | ||
}); | ||
}); | ||
it('Allows me to retrieve default_currency', function() { | ||
@@ -52,0 +34,0 @@ return expect( |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2
157454
63
4290