diff options
Diffstat (limited to 'deps/npm/node_modules/sigstore/dist/verify.js')
-rw-r--r-- | deps/npm/node_modules/sigstore/dist/verify.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/deps/npm/node_modules/sigstore/dist/verify.js b/deps/npm/node_modules/sigstore/dist/verify.js index 1bcef03b5f..9d21b553ac 100644 --- a/deps/npm/node_modules/sigstore/dist/verify.js +++ b/deps/npm/node_modules/sigstore/dist/verify.js @@ -37,7 +37,7 @@ class Verifier { // Verifies the bundle signature, the bundle's certificate chain (if present) // and the bundle's transparency log entries. verify(bundle, options, data) { - this.verifyArtifactSignature(bundle, options, data); + this.verifyArtifactSignature(bundle, data); if (sigstore.isBundleWithCertificateChain(bundle)) { this.verifySigningCertificate(bundle, options); } @@ -45,8 +45,8 @@ class Verifier { } // Performs bundle signature verification. Determines the type of the bundle // content and delegates to the appropriate signature verification function. - verifyArtifactSignature(bundle, options, data) { - const publicKey = this.getPublicKey(bundle, options); + verifyArtifactSignature(bundle, data) { + const publicKey = this.getPublicKey(bundle); switch (bundle.content?.$case) { case 'messageSignature': if (!data) { @@ -79,7 +79,7 @@ class Verifier { // Returns the public key which will be used to verify the bundle signature. // The public key is selected based on the verification material in the bundle // and the options provided. - getPublicKey(bundle, options) { + getPublicKey(bundle) { // Select the key which will be used to verify the signature switch (bundle.verificationMaterial?.content?.$case) { // If the bundle contains a certificate chain, the public key is the @@ -89,7 +89,7 @@ class Verifier { // If the bundle contains a public key hint, the public key is selected // from the list of trusted keys in the options case 'publicKey': - return getPublicKeyFromHint(bundle.verificationMaterial.content.publicKey, options, this.keySelector); + return getPublicKeyFromHint(bundle.verificationMaterial.content.publicKey, this.keySelector); } } } @@ -101,7 +101,7 @@ function getPublicKeyFromCertificateChain(certificateChain) { } // Retrieves the public key through the key selector callback, passing the // public key hint from the bundle -function getPublicKeyFromHint(publicKeyID, options, keySelector) { +function getPublicKeyFromHint(publicKeyID, keySelector) { const key = keySelector(publicKeyID.hint); if (!key) { throw new error_1.VerificationError('no public key found for signature verification'); |