Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

Commit

Permalink
fix: add support for newer cosign privkeys with SIGSTORE header
Browse files Browse the repository at this point in the history
  • Loading branch information
xynydev committed Dec 21, 2023
1 parent 38c4403 commit 624e5dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/ImageChooser/Cosign.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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-----"
/>
</Box>
<button on:click={setupSigning}>
Expand Down

0 comments on commit 624e5dc

Please sign in to comment.