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

remove chromium pins and add brave pins #352

Merged
merged 1 commit into from
Aug 22, 2018
Merged

remove chromium pins and add brave pins #352

merged 1 commit into from
Aug 22, 2018

Conversation

bridiver
Copy link
Collaborator

@bridiver bridiver commented Aug 22, 2018

fix brave/brave-browser#767

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed.
  • Add appropriate QA labels (QA/Needed or QA/No-QA-Needed) to include the closed issue in milestone

Test Plan:

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

@bridiver bridiver self-assigned this Aug 22, 2018
@bridiver
Copy link
Collaborator Author

verified that the output header only contains the pins we added

{ "name": "balance.mercury.basicattentiontoken.org", "policy": "custom", "mode": "force-https", "pins": "brave"},
{ "name": "balance-staging.mercury.basicattentiontoken.org", "policy": "custom", "mode": "force-https", "pins": "brave"},
{ "name": "download.brave.com", "mode": "force-https", "policy": "custom", "pins": "brave"},
{ "name": "laptop-updates.brave.com", "mode": "force-https", "policy": "custom", "pins": "brave"},
Copy link
Member

Choose a reason for hiding this comment

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

does anyone know yet if we're going to be using the same domains for brave-core updates? if not we need to add a new issue to add them to this list once they're finalized

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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


bool ParseCertificatesFile(base::StringPiece certs_input, Pinsets* pinsets) {
base::StringPiece brave_certs = R"brave_certs(TestSPKI
sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
Copy link
Member

Choose a reason for hiding this comment

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

string literals have a max length of 65,536. I think we're ok for now but we'll probably need to change this eventually. Have you considered using a pak file and loading the resource from there?

Copy link
Member

Choose a reason for hiding this comment

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

Similar to:
std::string str = ui::ResourceBundle::GetSharedInstance().GetRawDataResource( IDR_BRAVE_TAG_MANAGER_POLYFILL).as_string();

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This runs at build time so pak wouldn't work. I thought about loading from a file, but paths get a little weird so I just used a string for now

Copy link
Member

Choose a reason for hiding this comment

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

ok we can just concat in a string when needed later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

if length becomes a problem we can either split it into multiple strings (maybe one for each cert?) or try to sort out the path issue

@bbondy bbondy merged commit 74fb2a1 into master Aug 22, 2018
@bbondy bbondy deleted the issue/767 branch August 23, 2018 13:39
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.

Enable HPKP/expect-CT for brave domains
3 participants