• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Want to contribute? Great! First, read this page (including the small print at the end).
2
3### Before you contribute
4Before we can use your code, you must sign the
5[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual)
6(CLA), which you can do online. The CLA is necessary mainly because you own the
7copyright to your changes, even after your contribution becomes part of our
8codebase, so we need your permission to use and distribute your code. We also
9need to be sure of various other things—for instance that you'll tell us if you
10know that your code infringes on other people's patents. You don't have to sign
11the CLA until after you've submitted your code for review and a member has
12approved it, but you must do it before we can put your code into our codebase.
13Before you start working on a larger contribution, you should get in touch with
14us first via email with your idea so that we can help out and possibly guide
15you. Coordinating up front makes it much easier to avoid frustration later on.
16
17### Code reviews
18All submissions, including submissions by project members, require review. We
19use [Gerrit](https://boringssl-review.googlesource.com) for this purpose.
20
21#### Setup
22If you have not done so on this machine, you will need to set up a password for
23Gerrit. Sign in with a Google account, visit
24[this link](https://boringssl.googlesource.com/), and click the "Generate
25Password" link in the top right. You must also have a Gerrit account associated with
26your Google account.  To do this visit the [Gerrit review server](https://boringssl-review.googlesource.com)
27and click "Sign in" (top right).
28You will also need to prepare your checkout to
29[add Change-Ids](https://gerrit-review.googlesource.com/Documentation/cmd-hook-commit-msg.html)
30on commit. Run:
31
32    curl -Lo .git/hooks/commit-msg https://boringssl-review.googlesource.com/tools/hooks/commit-msg
33    chmod u+x .git/hooks/commit-msg
34
35#### Uploading changes
36To upload a change, push it to the special `refs/for/master` target:
37
38    git push origin HEAD:refs/for/master
39
40The output will then give you a link to the change. Add `agl@google.com`,
41`davidben@google.com`, and `bbe@google.com` as reviewers.
42
43Pushing a commit with the same Change-Id as an existing change will upload a new
44version of it. (Use the `git rebase` or `git commit --amend` commands.)
45
46For more detailed instructions, see the
47[Gerrit User Guide](https://gerrit-review.googlesource.com/Documentation/intro-user.html).
48
49### Copyright headers
50New files contributed directly to BoringSSL should use the following copyright
51header, where `YEAR` is the year the file was added:
52
53    Copyright YEAR The BoringSSL Authors
54
55To list individual contributors, we maintain an [AUTHORS](./AUTHORS) file at the
56top level of the project. See [this documentation](https://opensource.google/documentation/reference/releasing/authors)
57for more details. If you wish to be added, you are welcome to add yourself as
58part of your contribution, or request that we add you.
59
60We started the AUTHORS file after the project began, and after receiving many
61valuable contributions. To avoid being presumptuous, we did not proactively list
62all past contributors. If you previously made a contribution, you are likewise
63welcome to send us a patch to be added, or request that we add you.
64
65### The small print
66Contributions made by corporations are covered by a different agreement than
67the one above, the
68[Software Grant and Corporate Contributor License Agreement](https://cla.developers.google.com/about/google-corporate).
69