2
0
mirror of https://git.coolaj86.com/coolaj86/old-keypairs.js synced 2025-03-14 12:20:42 +00:00
old-keypairs.js/lib/x509-packer.js

15 lines
237 B
JavaScript
Raw Normal View History

2018-12-17 23:42:43 -07: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);
}
};