parent
825554580a
commit
57c4a3be98
|
|
@ -169,6 +169,8 @@ const forge_BigInteger = function(){};
|
|||
* @return {number}
|
||||
*/
|
||||
forge_BigInteger.prototype.compareTo = function(a){};
|
||||
/** @return {number} */
|
||||
forge_BigInteger.prototype.bitLength = function(){};
|
||||
/** @constructor */
|
||||
const forge_cert = function(){};
|
||||
/** @type {forge_key} */
|
||||
|
|
@ -195,6 +197,11 @@ const forge_key = function(){};
|
|||
forge_key.prototype.n;
|
||||
/** @type {forge_BigInteger} */
|
||||
forge_key.prototype.e;
|
||||
/**
|
||||
* @param {forge.md.digest} md
|
||||
* @return {string}
|
||||
*/
|
||||
forge_key.prototype.sign = function(md){};
|
||||
/** @constructor */
|
||||
const forge_cert_issuer = function(){};
|
||||
/** @type {Array<forge_cert_attr>} */
|
||||
|
|
|
|||
|
|
@ -223,11 +223,11 @@ z.newRefs = new z.NewRefMap();
|
|||
*/
|
||||
z.RsaSigner = class{
|
||||
/**
|
||||
* @param {forge.pki.rsa.PrivateKey} privateKey
|
||||
* @param {forge_key} privateKey
|
||||
* @param {forge_cert} certificate
|
||||
*/
|
||||
constructor(privateKey, certificate){
|
||||
/** @type {forge.pki.rsa.PrivateKey} */
|
||||
/** @type {forge_key} */
|
||||
this.privateKey = privateKey;
|
||||
/** @type {forge_cert} */
|
||||
this.certificate = certificate;
|
||||
|
|
@ -264,7 +264,7 @@ z.RsaSigner = class{
|
|||
* supported; this factory is the single place to extend the seam with ECDSA
|
||||
* or post-quantum signers without touching the PDF assembly.
|
||||
*
|
||||
* @param {forge.pki.rsa.PrivateKey} privateKey
|
||||
* @param {forge_key} privateKey
|
||||
* @param {forge_cert} certificate
|
||||
* @return {z.RsaSigner}
|
||||
*/
|
||||
|
|
@ -756,7 +756,7 @@ z.PdfSigner = class{
|
|||
var hasMinRsaKeyBits = typeof _this.opt.minRsaKeyBits === "number";
|
||||
if(strictCrypto || hasMinRsaKeyBits){
|
||||
/** @type {number} */
|
||||
var minRsaKeyBits = hasMinRsaKeyBits ? _this.opt.minRsaKeyBits : 3000;
|
||||
var minRsaKeyBits = hasMinRsaKeyBits ? /** @type {number} */(_this.opt.minRsaKeyBits) : 3000;
|
||||
/** @type {number} */
|
||||
var rsaKeyBits = _this.privateKey.n.bitLength();
|
||||
if(rsaKeyBits < minRsaKeyBits){
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
"server": "node test4node.js webserver",
|
||||
"test": "node --test",
|
||||
"test:fixtures": "node testutil/make-demo.js",
|
||||
"test:manual": "node test4node.js",
|
||||
"test:manual": "node test4node.js ${pfxpwd}",
|
||||
"test:fetch": "node test4node.js fetch"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
|||
Loading…
Reference in New Issue