Skip to content

Commit

Permalink
Fix signatures not being stored as text on syncs
Browse files Browse the repository at this point in the history
fixes: pulp#1245
  • Loading branch information
gerrod3 committed Sep 16, 2022
1 parent df73a91 commit 2aec815
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES/1245.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
``CollectionVersionSignature`` data is now stored as plain text instead of bytes.
4 changes: 2 additions & 2 deletions pulp_ansible/app/tasks/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,11 +630,11 @@ async def _add_collection_version(self, api_version, collection_version_url, met
if signatures:
collection_version = await d_content.resolution()
for signature in signatures:
sig = signature["signature"].encode("utf8")
sig = signature["signature"]
cv_signature = CollectionVersionSignature(
signed_collection=collection_version,
data=sig,
digest=hashlib.sha256(sig).hexdigest(),
digest=hashlib.sha256(sig.encode("utf-8")).hexdigest(),
pubkey_fingerprint=signature["pubkey_fingerprint"],
)
await self.put(DeclarativeContent(content=cv_signature))
Expand Down

0 comments on commit 2aec815

Please sign in to comment.