1
0
Fork 0
forked from svrjs/svrjs
This repository has been archived on 2024-11-10. You can view files and clone it, but cannot push or open issues or pull requests.
svrjs/node_modules/ocsp/lib/ocsp/api.js
2023-07-29 20:33:28 +02:00

14 lines
404 B
JavaScript

'use strict';
var ocsp = require('../ocsp');
var rfc2560 = require('asn1.js-rfc2560');
var rfc5280 = require('asn1.js-rfc5280');
exports.getOCSPURI = function getOCSPURI(rawCert, cb) {
var ocspMethod = rfc2560['id-pkix-ocsp'].join('.');
var cert = ocsp.utils.toDER(rawCert, 'CERTIFICATE');
cert = rfc5280.Certificate.decode(cert, 'der');
ocsp.utils.getAuthorityInfo(cert, ocspMethod, cb);
};