Fix alpine failures by switching default back to only warn on verification failures. To prevent build failures due to missing GPG or rotated vendor keys. (#1262)

Also allow multiple GPG keys to be provided.

Co-authored-by: John <1615532+johnoliver@users.noreply.github.com>
This commit is contained in:
Bruno Borges
2026-09-03 13:27:24 -04:00
committed by GitHub
parent 4889c4aff5
commit 0781fc6af3
27 changed files with 575 additions and 136 deletions
+8 -3
View File
@@ -9,12 +9,13 @@ import {
getToolcachePath,
isVersionSatisfies
} from '../util.js';
import {
import type {
ChecksumAlgorithm,
ChecksumMetadata,
JavaDownloadRelease,
JavaInstallerOptions,
JavaInstallerResults
JavaInstallerResults,
SignatureVerificationKey
} from './base-models.js';
import {MACOS_JAVA_CONTENT_POSTFIX} from '../constants.js';
import {RetryingHttpClient} from '../retrying-http-client.js';
@@ -44,7 +45,8 @@ export abstract class JavaBase {
private floatingVersionVerified = false;
protected setDefault: boolean;
protected verifySignature: boolean;
protected verifySignaturePublicKey: string | undefined;
protected verifySignatureExplicitlyRequested: boolean;
protected verifySignaturePublicKey: SignatureVerificationKey | undefined;
constructor(
protected distribution: string,
@@ -70,6 +72,8 @@ export abstract class JavaBase {
: true;
this.verifySignature =
installerOptions.verifySignature ?? this.supportsSignatureVerification();
this.verifySignatureExplicitlyRequested =
installerOptions.verifySignature === true;
this.verifySignaturePublicKey = installerOptions.verifySignaturePublicKey;
}
@@ -369,6 +373,7 @@ export abstract class JavaBase {
source: this.getJdkReleaseIdentity(javaRelease),
verification: getJdkVerificationIdentity(
this.verifySignature,
this.verifySignatureExplicitlyRequested,
this.verifySignaturePublicKey
),
path: this.getJdkCachePath(javaRelease.version)