I have created a project for an application written in c++ that uses OpenSSL to implement encryption algorithms. I posted the project on GitHub, it is currently a private repo. There is an Apache 2.0 license added to this repo, but I heard about attaching a comment like . to each source file ( what about header files):

 * Copyright 2003-2004 The Apache Software Foundation.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at.
 * http://www.apache.org/licenses/LICENSE-2.0
 * * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.

How to legally post the information that the project uses OpenSSL based on the Apache 2.0 license. I will add that the Open SSL source files were modified. Is the license file in the repo enough or do I need to add comments in the source file? Alternatively, maybe there is another way? Please give me any information

  • Welcome robur :-) Sidebar question: What prompted you to choose Apache 2 over the others please?
    – Paul Uszak
    Commented Mar 29, 2023 at 14:38

1 Answer 1


The Apache 2 License is clear about the requirements you have to meet when redistributing any code.

For your own code you are not bound by this license, but it is good practice to do whatever is listed, because it simplifies the compliant use and re-distribution of your software by 3rd parties.

It is enough to have the license and notice files in one easy to find location on your repository.

In addition you can add an SPDX ID to each file, as this eases the OSS license compliance when automation and tools are used for that. I highly recommend it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.