old-keypairs.js/lib/x509-packer.js

15 lines
237 B
JavaScript
Raw Normal View History

2018-12-18 06:42:43 +00:00
'use strict';
var x509 = module.exports;
var RSA = require('./rsa.js');
var EC = require('./ec.js');
x509.pack = function (opts) {
if ('RSA' === opts.jwk.kty) {
return RSA.pack(opts);
} else {
return EC.pack(opts);
}
};