xref: /freebsd/crypto/openssl/CONTRIBUTING.md (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1*b077aed3SPierre ProncheryHOW TO CONTRIBUTE TO OpenSSL
2*b077aed3SPierre Pronchery============================
3*b077aed3SPierre Pronchery
4*b077aed3SPierre ProncheryPlease visit our [Getting Started] page for other ideas about how to contribute.
5*b077aed3SPierre Pronchery
6*b077aed3SPierre Pronchery  [Getting Started]: <https://www.openssl.org/community/getting-started.html>
7*b077aed3SPierre Pronchery
8*b077aed3SPierre ProncheryDevelopment is done on GitHub in the [openssl/openssl] repository.
9*b077aed3SPierre Pronchery
10*b077aed3SPierre Pronchery  [openssl/openssl]: <https://github.com/openssl/openssl>
11*b077aed3SPierre Pronchery
12*b077aed3SPierre ProncheryTo request new features or report bugs, please open an issue on GitHub
13*b077aed3SPierre Pronchery
14*b077aed3SPierre ProncheryTo submit a patch, please open a pull request on GitHub.  If you are thinking
15*b077aed3SPierre Proncheryof making a large contribution, open an issue for it before starting work,
16*b077aed3SPierre Proncheryto get comments from the community.  Someone may be already working on
17*b077aed3SPierre Proncherythe same thing or there may be reasons why that feature isn't implemented.
18*b077aed3SPierre Pronchery
19*b077aed3SPierre ProncheryTo make it easier to review and accept your pull request, please follow these
20*b077aed3SPierre Proncheryguidelines:
21*b077aed3SPierre Pronchery
22*b077aed3SPierre Pronchery 1. Anything other than a trivial contribution requires a [Contributor
23*b077aed3SPierre Pronchery    License Agreement] (CLA), giving us permission to use your code.
24*b077aed3SPierre Pronchery    If your contribution is too small to require a CLA (e.g. fixing a spelling
25*b077aed3SPierre Pronchery    mistake), place the text "`CLA: trivial`" on a line by itself separated by
26*b077aed3SPierre Pronchery    an empty line from the rest of the commit message. It is not sufficient to
27*b077aed3SPierre Pronchery    only place the text in the GitHub pull request description.
28*b077aed3SPierre Pronchery
29*b077aed3SPierre Pronchery    [Contributor License Agreement]: <https://www.openssl.org/policies/cla.html>
30*b077aed3SPierre Pronchery
31*b077aed3SPierre Pronchery    To amend a missing "`CLA: trivial`" line after submission, do the following:
32*b077aed3SPierre Pronchery
33*b077aed3SPierre Pronchery    ```
34*b077aed3SPierre Pronchery        git commit --amend
35*b077aed3SPierre Pronchery        [add the line, save and quit the editor]
36*b077aed3SPierre Pronchery        git push -f
37*b077aed3SPierre Pronchery    ```
38*b077aed3SPierre Pronchery
39*b077aed3SPierre Pronchery 2. All source files should start with the following text (with
40*b077aed3SPierre Pronchery    appropriate comment characters at the start of each line and the
41*b077aed3SPierre Pronchery    year(s) updated):
42*b077aed3SPierre Pronchery
43*b077aed3SPierre Pronchery    ```
44*b077aed3SPierre Pronchery        Copyright 20xx-20yy The OpenSSL Project Authors. All Rights Reserved.
45*b077aed3SPierre Pronchery
46*b077aed3SPierre Pronchery        Licensed under the Apache License 2.0 (the "License").  You may not use
47*b077aed3SPierre Pronchery        this file except in compliance with the License.  You can obtain a copy
48*b077aed3SPierre Pronchery        in the file LICENSE in the source distribution or at
49*b077aed3SPierre Pronchery        https://www.openssl.org/source/license.html
50*b077aed3SPierre Pronchery    ```
51*b077aed3SPierre Pronchery
52*b077aed3SPierre Pronchery 3. Patches should be as current as possible; expect to have to rebase
53*b077aed3SPierre Pronchery    often. We do not accept merge commits, you will have to remove them
54*b077aed3SPierre Pronchery    (usually by rebasing) before it will be acceptable.
55*b077aed3SPierre Pronchery
56*b077aed3SPierre Pronchery 4. Patches should follow our [coding style] and compile without warnings.
57*b077aed3SPierre Pronchery    Where `gcc` or `clang` is available you should use the
58*b077aed3SPierre Pronchery    `--strict-warnings` `Configure` option.  OpenSSL compiles on many varied
59*b077aed3SPierre Pronchery    platforms: try to ensure you only use portable features.  Clean builds via
60*b077aed3SPierre Pronchery    GitHub Actions and AppVeyor are required, and they are started automatically
61*b077aed3SPierre Pronchery    whenever a PR is created or updated.
62*b077aed3SPierre Pronchery
63*b077aed3SPierre Pronchery    [coding style]: https://www.openssl.org/policies/technical/coding-style.html
64*b077aed3SPierre Pronchery
65*b077aed3SPierre Pronchery 5. When at all possible, patches should include tests. These can
66*b077aed3SPierre Pronchery    either be added to an existing test, or completely new.  Please see
67*b077aed3SPierre Pronchery    [test/README.md](test/README.md) for information on the test framework.
68*b077aed3SPierre Pronchery
69*b077aed3SPierre Pronchery 6. New features or changed functionality must include
70*b077aed3SPierre Pronchery    documentation. Please look at the "pod" files in doc/man[1357] for
71*b077aed3SPierre Pronchery    examples of our style. Run "make doc-nits" to make sure that your
72*b077aed3SPierre Pronchery    documentation changes are clean.
73*b077aed3SPierre Pronchery
74*b077aed3SPierre Pronchery 7. For user visible changes (API changes, behaviour changes, ...),
75*b077aed3SPierre Pronchery    consider adding a note in [CHANGES.md](CHANGES.md).
76*b077aed3SPierre Pronchery    This could be a summarising description of the change, and could
77*b077aed3SPierre Pronchery    explain the grander details.
78*b077aed3SPierre Pronchery    Have a look through existing entries for inspiration.
79*b077aed3SPierre Pronchery    Please note that this is NOT simply a copy of git-log one-liners.
80*b077aed3SPierre Pronchery    Also note that security fixes get an entry in [CHANGES.md](CHANGES.md).
81*b077aed3SPierre Pronchery    This file helps users get more in depth information of what comes
82*b077aed3SPierre Pronchery    with a specific release without having to sift through the higher
83*b077aed3SPierre Pronchery    noise ratio in git-log.
84*b077aed3SPierre Pronchery
85*b077aed3SPierre Pronchery 8. For larger or more important user visible changes, as well as
86*b077aed3SPierre Pronchery    security fixes, please add a line in [NEWS.md](NEWS.md).
87*b077aed3SPierre Pronchery    On exception, it might be worth adding a multi-line entry (such as
88*b077aed3SPierre Pronchery    the entry that announces all the types that became opaque with
89*b077aed3SPierre Pronchery    OpenSSL 1.1.0).
90*b077aed3SPierre Pronchery    This file helps users get a very quick summary of what comes with a
91*b077aed3SPierre Pronchery    specific release, to see if an upgrade is worth the effort.
92*b077aed3SPierre Pronchery
93*b077aed3SPierre Pronchery 9. Guidelines how to integrate error output of new crypto library modules
94*b077aed3SPierre Pronchery    can be found in [crypto/err/README.md](crypto/err/README.md).
95