Skip to content

Commit decb2cb

Browse files
committed
sign: b64 wrapping
1 parent e95a965 commit decb2cb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sigstore/_internal/rekor/client_v2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import requests
2626
from cryptography.hazmat.primitives import serialization
2727
from cryptography.x509 import Certificate
28-
from sigstore_models import intoto
2928
from sigstore_models.common import v1 as common_v1
3029
from sigstore_models.rekor import v2 as rekor_v2
3130
from sigstore_models.rekor.v1 import TransparencyLogEntry as _TransparencyLogEntry

sigstore/sign.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838

3939
from __future__ import annotations
4040

41+
import base64
4142
import logging
4243
from collections.abc import Iterator
4344
from contextlib import contextmanager
@@ -244,9 +245,9 @@ def sign_artifact(
244245
content = MessageSignature(
245246
message_digest=HashOutput(
246247
algorithm=hashed_input.algorithm,
247-
digest=hashed_input.digest,
248+
digest=base64.b64encode(hashed_input.digest),
248249
),
249-
signature=artifact_signature,
250+
signature=base64.b64encode(artifact_signature),
250251
)
251252

252253
# Create the proposed hashedrekord entry

0 commit comments

Comments
 (0)