Skip to content

[Collections] Add skip signature check option to 'add' #3291

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

Merged
merged 1 commit into from
Feb 18, 2021

Conversation

yim-lee
Copy link
Contributor

@yim-lee yim-lee commented Feb 18, 2021

Motivation:
On non-Apple platforms since there are no trusted root certificates by default, signature checks will most certainly fail. To help people get started more quickly, and to offer people a way to opt-out, we will add a --skip-signature-check flag to the add collection command. User's selection is persisted to collection sources config such that refresh would honor it as well.

Modifications:

  • Add skipSignatureCheck to CollectionSource
  • Add --skip-signature-check to CLI
  • Add isVerified to Collection.SignatureData. It is false when skipSignatureCheck == true.
  • Update logic in JSONPackageCollectionProvider to honor skipSignatureCheck
  • Update CLI to handle cannotVerifySignature error

Motivation:
On non-Apple platforms since there are no trusted root certificates by default, signature checks will most certainly fail. To help people get started more quickly, and to offer people a way to opt-out, we will add a `--skip-signature-check` flag to the `add` collection command. User's selection is persisted to collection sources config such that `refresh` would honor it as well.

Modifications:
- Add `skipSignatureCheck` to `CollectionSource`
- Add `--skip-signature-check` to CLI
- Add `isVerified` to `Collection.SignatureData`. It is `false` when `skipSignatureCheck == true`.
- Update logic in `JSONPackageCollectionProvider` to honor `skipSignatureCheck`
- Update CLI to handle `cannotVerifySignature` error
@yim-lee
Copy link
Contributor Author

yim-lee commented Feb 18, 2021

@swift-ci please smoke test

Copy link
Contributor

@tomerd tomerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@tomerd
Copy link
Contributor

tomerd commented Feb 18, 2021

@swift-ci please smoke test linux

@tomerd tomerd added the ready Author believes the PR is ready to be merged & any feedback has been addressed label Feb 18, 2021
@yim-lee yim-lee merged commit 5d0e191 into swiftlang:main Feb 18, 2021
@yim-lee yim-lee deleted the skip-signature-check branch February 18, 2021 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants