@@ -278,6 +278,10 @@ declare module "node-forge" {
278278 }
279279 var oids : oids ;
280280
281+ interface MDSigner {
282+ sign ( md : md . MessageDigest ) : Bytes ;
283+ }
284+
281285 namespace rsa {
282286 type EncryptionScheme = "RSAES-PKCS1-V1_5" | "RSA-OAEP" | "RAW" | "NONE" | null ;
283287 type SignatureScheme = "RSASSA-PKCS1-V1_5" | pss . PSS | "NONE" | null ;
@@ -472,10 +476,10 @@ declare module "node-forge" {
472476 /**
473477 * Signs this certificate using the given private key.
474478 *
475- * @param key the private key to sign with.
479+ * @param signer the signer used to sign this csr
476480 * @param md the message digest object to use (defaults to forge.md.sha1).
477481 */
478- sign ( key : pki . PrivateKey , md ?: md . MessageDigest ) : void ;
482+ sign ( signer : MDSigner , md ?: md . MessageDigest ) : void ;
479483 /**
480484 * Attempts verify the signature on the passed certificate using this
481485 * certificate's public key.
@@ -567,10 +571,10 @@ declare module "node-forge" {
567571 /**
568572 * Signs this csr using the given private key.
569573 *
570- * @param key the private key to sign with.
574+ * @param signer the signer used to sign this csr
571575 * @param md the message digest object to use (defaults to forge.md.sha1).
572576 */
573- sign ( key : pki . PrivateKey , md ?: md . MessageDigest ) : void ;
577+ sign ( signer : MDSigner , md ?: md . MessageDigest ) : void ;
574578 /**
575579 * Attempts verify the signature on this csr using this
576580 * csr's public key.
0 commit comments