Check your domain SSL/TLS setup with the SSL Decoder.org API (unofficial)
var ssldecoder = require ('ssldecoder') ();
// Process response data
function processHost (err, data) {
if (err) {
console.log (err);
return;
}
console.log (data.connection.protocols);
}
// Get certificate details
ssldecoder.host ('myhostname.net', processHost);
npm install ssldecoder
param | type | required | default | description |
---|---|---|---|---|
timeout | number | no | 20000 |
Request wait time out in ms, 1000 = 1 sec |
endpoint | string | no | https://ssldecoder.org |
Send calls to another API |
// Set timeout to 5 seconds and your own server
var ssldecoder = require ('ssldecoder') ({
timeout: 5000,
endpoint: 'https://my-box.tld/path'
});
( params, callback )
Retrieve certificate details from a hostname.
param | type | required | description |
---|---|---|---|
params | object or string | yes | Hostname (string) or parameters (object) |
callback | function | yes | function (err, data) {} |
param | type | required | default | description |
---|---|---|---|---|
params.host | string | no * | resolved from ip |
Hostname |
params.ip | string | no * | resolved from host |
IP address |
params.port | number | no | 443 |
HTTPS port |
params.fastcheck | boolean | no | false |
Limited connection data enumeration, no certificate transparency submission |
Always provide either host
or ip
, or ideally both!
Otherwise the host
or ip
is DNS resolved from the other,
selecting only the first result it gets.
// Only hostname, let the module lookup the IP
ssldecoder.host ('myhostname.net', processData);
// Only IP, let the module lookup the hostname
var params = {
ip: '2a01:7c8:aab3:35a::3',
fastcheck: true
};
ssldecoder.host (params, processData);
// Full control with hostname and IP
var params = {
host: 'myhostname.net',
ip: '1.2.3.4'
};
ssldecoder.host (params, processData);
( csr, callback )
Process CSR PEM
argument | type | required | description |
---|---|---|---|
csr | string | yes | Either /path/to/csr.pem or full PEM string |
callback | function | yes | function (err, data) {} |
// Read PEM from path
ssldecoder.csr ('csr.pem', processCSR);
// Send PEM text
var pem = '-----BEGIN CERTIFICATE REQUEST-----\n...';
ssldecoder.csr (pem, processCSR);
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to http://unlicense.org