15 lines
237 B
JavaScript
15 lines
237 B
JavaScript
|
'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);
|
||
|
}
|
||
|
};
|