1b0d17251SchristosHOW TO CONTRIBUTE TO OpenSSL 2b0d17251Schristos============================ 3b0d17251Schristos 4b0d17251SchristosPlease visit our [Getting Started] page for other ideas about how to contribute. 5b0d17251Schristos 6*97e3c585Schristos [Getting Started]: <https://openssl-library.org/community/getting-started> 7b0d17251Schristos 8b0d17251SchristosDevelopment is done on GitHub in the [openssl/openssl] repository. 9b0d17251Schristos 10b0d17251Schristos [openssl/openssl]: <https://github.com/openssl/openssl> 11b0d17251Schristos 120e2e28bcSchristosTo request a new feature, ask a question, or report a bug, 130e2e28bcSchristosplease open an [issue on GitHub](https://github.com/openssl/openssl/issues). 14b0d17251Schristos 150e2e28bcSchristosTo submit a patch or implement a new feature, please open a 160e2e28bcSchristos[pull request on GitHub](https://github.com/openssl/openssl/pulls). 170e2e28bcSchristosIf you are thinking of making a large contribution, 180e2e28bcSchristosopen an issue for it before starting work, to get comments from the community. 190e2e28bcSchristosSomeone may be already working on the same thing, 200e2e28bcSchristosor there may be special reasons why a feature is not implemented. 21b0d17251Schristos 22b0d17251SchristosTo make it easier to review and accept your pull request, please follow these 23b0d17251Schristosguidelines: 24b0d17251Schristos 25b0d17251Schristos 1. Anything other than a trivial contribution requires a [Contributor 26b0d17251Schristos License Agreement] (CLA), giving us permission to use your code. 270e2e28bcSchristos If your contribution is too small to require a CLA (e.g., fixing a spelling 280e2e28bcSchristos mistake), then place the text "`CLA: trivial`" on a line by itself below 290e2e28bcSchristos the rest of your commit message separated by an empty line, like this: 300e2e28bcSchristos 310e2e28bcSchristos ``` 320e2e28bcSchristos One-line summary of trivial change 330e2e28bcSchristos 340e2e28bcSchristos Optional main body of commit message. It might contain a sentence 350e2e28bcSchristos or two explaining the trivial change. 360e2e28bcSchristos 370e2e28bcSchristos CLA: trivial 380e2e28bcSchristos ``` 390e2e28bcSchristos 400e2e28bcSchristos It is not sufficient to only place the text "`CLA: trivial`" in the GitHub 410e2e28bcSchristos pull request description. 42b0d17251Schristos 43b0d17251Schristos [Contributor License Agreement]: <https://www.openssl.org/policies/cla.html> 44b0d17251Schristos 45b0d17251Schristos To amend a missing "`CLA: trivial`" line after submission, do the following: 46b0d17251Schristos 47b0d17251Schristos ``` 48b0d17251Schristos git commit --amend 490e2e28bcSchristos # add the line, save and quit the editor 500e2e28bcSchristos git push -f [<repository> [<branch>]] 51b0d17251Schristos ``` 52b0d17251Schristos 53b0d17251Schristos 2. All source files should start with the following text (with 54b0d17251Schristos appropriate comment characters at the start of each line and the 55b0d17251Schristos year(s) updated): 56b0d17251Schristos 57b0d17251Schristos ``` 58b0d17251Schristos Copyright 20xx-20yy The OpenSSL Project Authors. All Rights Reserved. 59b0d17251Schristos 60b0d17251Schristos Licensed under the Apache License 2.0 (the "License"). You may not use 61b0d17251Schristos this file except in compliance with the License. You can obtain a copy 62b0d17251Schristos in the file LICENSE in the source distribution or at 63b0d17251Schristos https://www.openssl.org/source/license.html 64b0d17251Schristos ``` 65b0d17251Schristos 66b0d17251Schristos 3. Patches should be as current as possible; expect to have to rebase 67b0d17251Schristos often. We do not accept merge commits, you will have to remove them 68b0d17251Schristos (usually by rebasing) before it will be acceptable. 69b0d17251Schristos 700e2e28bcSchristos 4. Code provided should follow our [coding style] and [documentation policy] 710e2e28bcSchristos and compile without warnings. 720e2e28bcSchristos There is a [Perl tool](util/check-format.pl) that helps 730e2e28bcSchristos finding code formatting mistakes and other coding style nits. 740e2e28bcSchristos Where `gcc` or `clang` is available, you should use the 75b0d17251Schristos `--strict-warnings` `Configure` option. OpenSSL compiles on many varied 760e2e28bcSchristos platforms: try to ensure you only use portable features. 770e2e28bcSchristos Clean builds via GitHub Actions are required. They are started automatically 780e2e28bcSchristos whenever a PR is created or updated by committers. 79b0d17251Schristos 80*97e3c585Schristos [coding style]: https://openssl-library.org/policies/technical/coding-style/ 81*97e3c585Schristos [documentation policy]: https://openssl-library.org/policies/technical/documentation-policy/ 82b0d17251Schristos 830e2e28bcSchristos 5. When at all possible, code contributions should include tests. These can 84b0d17251Schristos either be added to an existing test, or completely new. Please see 85b0d17251Schristos [test/README.md](test/README.md) for information on the test framework. 86b0d17251Schristos 87b0d17251Schristos 6. New features or changed functionality must include 880e2e28bcSchristos documentation. Please look at the `.pod` files in `doc/man[1357]` for 890e2e28bcSchristos examples of our style. Run `make doc-nits` to make sure that your 90b0d17251Schristos documentation changes are clean. 91b0d17251Schristos 92b0d17251Schristos 7. For user visible changes (API changes, behaviour changes, ...), 93b0d17251Schristos consider adding a note in [CHANGES.md](CHANGES.md). 94b0d17251Schristos This could be a summarising description of the change, and could 95b0d17251Schristos explain the grander details. 96b0d17251Schristos Have a look through existing entries for inspiration. 97b0d17251Schristos Please note that this is NOT simply a copy of git-log one-liners. 98b0d17251Schristos Also note that security fixes get an entry in [CHANGES.md](CHANGES.md). 990e2e28bcSchristos This file helps users get more in-depth information of what comes 100b0d17251Schristos with a specific release without having to sift through the higher 101b0d17251Schristos noise ratio in git-log. 102b0d17251Schristos 103b0d17251Schristos 8. For larger or more important user visible changes, as well as 104b0d17251Schristos security fixes, please add a line in [NEWS.md](NEWS.md). 105b0d17251Schristos On exception, it might be worth adding a multi-line entry (such as 106b0d17251Schristos the entry that announces all the types that became opaque with 107b0d17251Schristos OpenSSL 1.1.0). 108b0d17251Schristos This file helps users get a very quick summary of what comes with a 109b0d17251Schristos specific release, to see if an upgrade is worth the effort. 110b0d17251Schristos 111b0d17251Schristos 9. Guidelines how to integrate error output of new crypto library modules 112b0d17251Schristos can be found in [crypto/err/README.md](crypto/err/README.md). 113