From 624e5dc3d7c91347cafd96dd3ff383982fea46e2 Mon Sep 17 00:00:00 2001 From: xynydev Date: Thu, 21 Dec 2023 18:41:19 +0200 Subject: [PATCH] fix: add support for newer cosign privkeys with SIGSTORE header --- src/components/ImageChooser/Cosign.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/ImageChooser/Cosign.svelte b/src/components/ImageChooser/Cosign.svelte index 7fd4cf3..036f75c 100644 --- a/src/components/ImageChooser/Cosign.svelte +++ b/src/components/ImageChooser/Cosign.svelte @@ -17,10 +17,11 @@ throw new Error(); } if ( + !privateKey.startsWith("-----BEGIN ENCRYPTED SIGSTORE PRIVATE KEY-----") && !privateKey.startsWith("-----BEGIN ENCRYPTED COSIGN PRIVATE KEY-----") ) { log += - 'Invalid private key, must start with "-----BEGIN ENCRYPTED COSIGN PRIVATE KEY-----". \n'; + 'Invalid private key, must start with "-----BEGIN ENCRYPTED SIGSTORE PRIVATE KEY-----" or "-----BEGIN ENCRYPTED COSIGN PRIVATE KEY-----". \n'; throw new Error(); } @@ -166,7 +167,7 @@ Remember to include logs, both from the console (enable XHR) and here."; bind:value={privateKey} id="private" class="w-full h-32 bg-transparent text-fg-primary placeholder:text-fg-secondary p-1 px-2" - placeholder="-----BEGIN ENCRYPTED COSIGN PRIVATE KEY-----" + placeholder="-----BEGIN ENCRYPTED SIGSTORE PRIVATE KEY-----" />