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