Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verification failure on many popular sites #18

Closed
benturner opened this issue Mar 2, 2017 · 3 comments
Closed

Verification failure on many popular sites #18

benturner opened this issue Mar 2, 2017 · 3 comments

Comments

@benturner
Copy link

Hi @indutny, this lib is great, but I'm having lots of trouble verifying OCSP on some popular sites. I was wondering if you had any idea what is different between the cert setup in the success cases versus the failure cases of this simple script:

'use strict';

const ocsp = require('ocsp');
const https = require('https');

const agent = new ocsp.Agent();

function go(host) {
  const req = https.request({host: host, agent: agent}, (res) => {
    console.log(host, res.statusCode);
  });
  req.on('error', (error) => {
    console.error(host, error);
  });
  req.end();
}

go('google.com');
go('yahoo.com');
go('nytimes.com');
go('microsoft.com');

Running this script produces the following:

$ node ocsp.js 
nytimes.com 301
yahoo.com Error: Invalid signature
    at Object.verify (/Users/bent/src/test/node_modules/ocsp/lib/ocsp/verify.js:50:17)
    at onIssuer (/Users/bent/src/test/node_modules/ocsp/lib/ocsp/agent.js:93:12)
    at Agent.handleOCSPResponse (/Users/bent/src/test/node_modules/ocsp/lib/ocsp/agent.js:103:12)
    at TLSSocket.<anonymous> (/Users/bent/src/test/node_modules/ocsp/lib/ocsp/agent.js:52:17)
    at emitNone (events.js:91:20)
    at TLSSocket.emit (events.js:185:7)
    at TLSSocket._finishInit (_tls_wrap.js:603:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:433:38)
microsoft.com Error: Invalid signature
    at Object.verify (/Users/bent/src/test/node_modules/ocsp/lib/ocsp/verify.js:50:17)
    at onIssuer (/Users/bent/src/test/node_modules/ocsp/lib/ocsp/agent.js:93:12)
    at Agent.handleOCSPResponse (/Users/bent/src/test/node_modules/ocsp/lib/ocsp/agent.js:103:12)
    at TLSSocket.<anonymous> (/Users/bent/src/test/node_modules/ocsp/lib/ocsp/agent.js:52:17)
    at emitNone (events.js:91:20)
    at TLSSocket.emit (events.js:185:7)
    at TLSSocket._finishInit (_tls_wrap.js:603:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:433:38)
google.com 301
@benturner
Copy link
Author

openssl seems happy enough with these sites, by the way.

@indutny indutny closed this as completed in 6ed19f0 Apr 3, 2017
@indutny
Copy link
Owner

indutny commented Apr 3, 2017

Should be fixed now, sorry!

@benturner
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants