forked from indutny/ocsp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix failing tests rename ocsp.js to index.js fix failing gen-certs.js
- Loading branch information
1 parent
f4dc9a0
commit 6a2f012
Showing
18 changed files
with
186 additions
and
102 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
'use strict' | ||
|
||
var ocsp = require('../ocsp') | ||
var ocsp = require('..') | ||
|
||
var rfc2560 = require('asn1.js-rfc2560') | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,11 +13,15 @@ | |
}, | ||
"license": "MIT", | ||
"author": "Fedor Indutny <[email protected]>", | ||
"main": "lib/ocsp.js", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"certs": "node scripts/certs.js", | ||
"lint": "eslint lib test", | ||
"test": "mocha" | ||
}, | ||
"mocha": { | ||
"exit": true | ||
}, | ||
"dependencies": { | ||
"asn1.js": "^5.3.0", | ||
"asn1.js-rfc2560": "^5.0.1", | ||
|
@@ -33,6 +37,7 @@ | |
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"mocha": "^7.1.1", | ||
"selfsigned.js": "^3.0.2" | ||
"selfsigned.js": "^3.0.2", | ||
"shelljs": "^0.8.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const { exec } = require('shelljs') | ||
const fs = require('fs') | ||
|
||
const dir = `${__dirname}/../test/fixtures` | ||
|
||
function getCerts (domain, file) { | ||
const { stdout } = exec(`openssl s_client -showcerts -verify 5 -connect ${domain}:443 < /dev/null`) | ||
const [cert, issuer] = stdout.match(/(-----BEGIN CERTIFICATE-----[^]+?-----END CERTIFICATE-----)/mg) | ||
if (file) { | ||
fs.writeFileSync(`${dir}/${file}-cert.pem`, cert, 'utf8') | ||
fs.writeFileSync(`${dir}/${file}-issuer.pem`, issuer, 'utf8') | ||
} | ||
} | ||
|
||
getCerts('google.com', 'google') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.