Created
July 16, 2012 20:20
-
-
Save ozten/3124781 to your computer and use it in GitHub Desktop.
Get public key or other fields from a cert
This file contains hidden or 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
| /* | |
| cd into directory with root.cert | |
| node extract_public_key.js | |
| */ | |
| var fs = require('fs'); | |
| cert = fs.readFileSync('root.cert').toString('utf8'); | |
| var pkEnc = cert.split('.')[1] | |
| console.log(new Buffer(pkEnc, 'base64').toString('utf8')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment