Skip to content

Commit

Permalink
Updated Chromium patch. (#51)
Browse files Browse the repository at this point in the history
corrected patchfile name

Co-authored-by: xvzcf <[email protected]>
  • Loading branch information
baentsch and xvzcf authored Sep 9, 2020
1 parent 8661765 commit 3cc8df2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion chromium/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Further be aware that both cloning the source code as well as building Chromium

Note: You might have to install `ninja` if not already done, e.g., by running `sudo apt-get install ninja`. You also might want to run `SKIP_TESTS=doxygen,style ninja run_tests` to validate liboqs operating OK on your machine. For this you need to install `pytest` if not already present on your machine, e.g., by running `sudo apt-get install python3-pytest python3-pytest-xdist` first.

5. After successfully installing liboqs as per the above, navigate to `<CHROMIUM_ROOT>` and apply the `BUILD.gn.patch` file provided here by running `git apply <PATH_TO_PATCH_FILE>`. Then, navigate to `third_party/boringssl`, and run `python src/util/generate_build_files.py gn`.
5. After successfully installing liboqs as per the above, navigate to `<CHROMIUM_ROOT>` and apply the `oqs-mods.patch` file provided here by running `git apply <PATH_TO_PATCH_FILE>`. Then, navigate to `third_party/boringssl`, and run `python src/util/generate_build_files.py gn`.

Note: For this to succeed, you might have to install go if not already present on your machine, e.g., by running `sudo apt install golang-go`. If _any_ error occurs in this step, Chromium will build fine, just without support for quantum-safe crypto, i.e., only the final testing steps below will fail.

Expand Down
15 changes: 15 additions & 0 deletions chromium/BUILD.gn.patch → chromium/oqs-mods.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
diff --git a/net/cert/internal/simple_path_builder_delegate.cc b/net/cert/internal/simple_path_builder_delegate.cc
index e4259ee6eb39..74e8158edfda 100644
--- a/net/cert/internal/simple_path_builder_delegate.cc
+++ b/net/cert/internal/simple_path_builder_delegate.cc
@@ -35,6 +35,10 @@ bool IsAcceptableCurveForEcdsa(int curve_nid) {
return true;
}

+ if (IS_OQS_PKEY(curve_nid)) {
+ return true;
+ }
+
return false;
}

diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
index b435499f459b..0493ba2ec628 100644
--- a/third_party/boringssl/BUILD.gn
Expand Down

0 comments on commit 3cc8df2

Please sign in to comment.