Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apk/signature: remove support for creating new SHA1 signatures #1496

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xnox
Copy link
Contributor

@xnox xnox commented Jan 25, 2025

Remove support for creating new SHA1 signatures.

Verification of SHA1 signatures remains until after Alpine migrates to
SHA256.

Using current melange, adding replace in go.mod to use this apko, and use the bypass environment variable to worse SHA1 signatures results in this runtime error:

SIGNING_DIGEST=SHA1 melange sign --signing-key *.rsa packages/x86_64/openssl-dev-3.4.0-r7.apk 
2025/01/25 03:45:52 INFO Processing apk packages/x86_64/openssl-dev-3.4.0-r7.apk
2025/01/25 03:45:52 ERRO creating sha1 signatures not supported

And similarly during package build

export SIGNING_DIGEST=SHA1
make package/wolfi-baselayout
2025/01/25 03:46:07 INFO   runtime:
2025/01/25 03:46:07 INFO     ca-certificates-bundle
2025/01/25 03:46:07 INFO   installed-size: 127332
2025/01/25 03:46:07 INFO   data.tar.gz digest: 08809c5352881593c0e3c70108ee8d8ef6f2a2e4dadd358df972bb42f60c0c42
2025/01/25 03:46:07 ERRO failed to build package: unable to emit package: emitting signature: creating sha1 signatures not supported

Thus any users of this public API will too get a nice error in case they are still trying to use SHA1 signatures.

Remove support for creating new SHA1 signatures.

Verification of SHA1 signatures remains until after Alpine migrates to
SHA256.
@xnox xnox force-pushed the remove-sha1-signing-support branch from 7432c6e to 78e7aeb Compare January 29, 2025 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant