1d4afb5ceSopenharmony_ciLibwebsockets and included programs are provided under the terms of the
2d4afb5ceSopenharmony_ciMIT license shown below, with the exception that some sources are under
3d4afb5ceSopenharmony_cia similar permissive license like BSD, or are explicitly CC0 / public
4d4afb5ceSopenharmony_cidomain to remove any obstacles from basing differently-licensed code on
5d4afb5ceSopenharmony_cithem.
6d4afb5ceSopenharmony_ci
7d4afb5ceSopenharmony_ciOriginal liberal license retained:
8d4afb5ceSopenharmony_ci
9d4afb5ceSopenharmony_ci  - lib/misc/sha-1.c                     - 3-clause BSD license retained, link to original [BSD3]
10d4afb5ceSopenharmony_ci  - win32port/zlib                       - ZLIB license (see zlib.h) [ZLIB]
11d4afb5ceSopenharmony_ci  - lib/tls/mbedtls/wrapper              - Apache 2.0 (only built if linked against mbedtls) [APACHE2]
12d4afb5ceSopenharmony_ci    lib/tls/mbedtls/mbedtls-extensions.c
13d4afb5ceSopenharmony_ci  - lib/misc/base64-decode.c             - already MIT
14d4afb5ceSopenharmony_ci  - lib/misc/ieeehalfprecision.c         - 2-clause BSD license retained [BSD2]
15d4afb5ceSopenharmony_ci
16d4afb5ceSopenharmony_ciRelicensed to MIT:
17d4afb5ceSopenharmony_ci
18d4afb5ceSopenharmony_ci  - lib/misc/daemonize.c               - relicensed from Public Domain to MIT,
19d4afb5ceSopenharmony_ci                                         link to original Public Domain version
20d4afb5ceSopenharmony_ci  - lib/plat/windows/windows-resolv.c  - relicensed from "Beerware v42" to MIT
21d4afb5ceSopenharmony_ci
22d4afb5ceSopenharmony_ciPublic Domain (CC-zero) to simplify reuse:
23d4afb5ceSopenharmony_ci
24d4afb5ceSopenharmony_ci  - test-apps/*.c
25d4afb5ceSopenharmony_ci  - test-apps/*.h
26d4afb5ceSopenharmony_ci  - minimal-examples/*
27d4afb5ceSopenharmony_ci  - lwsws/*
28d4afb5ceSopenharmony_ci
29d4afb5ceSopenharmony_ciAlthough libwebsockets is available under a permissive license, it does not
30d4afb5ceSopenharmony_cichange the reality of dealing with large lumps of external code... if your
31d4afb5ceSopenharmony_cicopy diverges it is guaranteed to contain security problems after a while
32d4afb5ceSopenharmony_ciand can be very painful to pick backports (especially since historically,
33d4afb5ceSopenharmony_ciwe are very hot on cleaning and refactoring the codebase).  The least
34d4afb5ceSopenharmony_cipainful and lowest risk way remains sending your changes and fixes upstream
35d4afb5ceSopenharmony_cito us so you can easily use later releases and fixes.
36d4afb5ceSopenharmony_ci
37d4afb5ceSopenharmony_ci## MIT License applied to libwebsockets
38d4afb5ceSopenharmony_ci
39d4afb5ceSopenharmony_cihttps://opensource.org/licenses/MIT 
40d4afb5ceSopenharmony_ci
41d4afb5ceSopenharmony_ci Permission is hereby granted, free of charge, to any person obtaining a copy
42d4afb5ceSopenharmony_ci of this software and associated documentation files (the "Software"), to
43d4afb5ceSopenharmony_ci deal in the Software without restriction, including without limitation the
44d4afb5ceSopenharmony_ci rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
45d4afb5ceSopenharmony_ci sell copies of the Software, and to permit persons to whom the Software is
46d4afb5ceSopenharmony_ci furnished to do so, subject to the following conditions:
47d4afb5ceSopenharmony_ci
48d4afb5ceSopenharmony_ci The above copyright notice and this permission notice shall be included in
49d4afb5ceSopenharmony_ci all copies or substantial portions of the Software.
50d4afb5ceSopenharmony_ci
51d4afb5ceSopenharmony_ci THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
52d4afb5ceSopenharmony_ci IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
53d4afb5ceSopenharmony_ci FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
54d4afb5ceSopenharmony_ci AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
55d4afb5ceSopenharmony_ci LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
56d4afb5ceSopenharmony_ci FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
57d4afb5ceSopenharmony_ci IN THE SOFTWARE.
58d4afb5ceSopenharmony_ci
59d4afb5ceSopenharmony_ci## BSD2
60d4afb5ceSopenharmony_ci
61d4afb5ceSopenharmony_ci```
62d4afb5ceSopenharmony_ci *  Redistribution and use in source and binary forms, with or without 
63d4afb5ceSopenharmony_ci *  modification, are permitted provided that the following conditions are 
64d4afb5ceSopenharmony_ci *  met:
65d4afb5ceSopenharmony_ci *
66d4afb5ceSopenharmony_ci *     * Redistributions of source code must retain the above copyright 
67d4afb5ceSopenharmony_ci *       notice, this list of conditions and the following disclaimer.
68d4afb5ceSopenharmony_ci *     * Redistributions in binary form must reproduce the above copyright 
69d4afb5ceSopenharmony_ci *       notice, this list of conditions and the following disclaimer in 
70d4afb5ceSopenharmony_ci *       the documentation and/or other materials provided with the distribution
71d4afb5ceSopenharmony_ci *      
72d4afb5ceSopenharmony_ci *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
73d4afb5ceSopenharmony_ci *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
74d4afb5ceSopenharmony_ci *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
75d4afb5ceSopenharmony_ci *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
76d4afb5ceSopenharmony_ci *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
77d4afb5ceSopenharmony_ci *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
78d4afb5ceSopenharmony_ci *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
79d4afb5ceSopenharmony_ci *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
80d4afb5ceSopenharmony_ci *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
81d4afb5ceSopenharmony_ci *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
82d4afb5ceSopenharmony_ci *  POSSIBILITY OF SUCH DAMAGE.
83d4afb5ceSopenharmony_ci```
84d4afb5ceSopenharmony_ci
85d4afb5ceSopenharmony_ci## BSD3
86d4afb5ceSopenharmony_ci
87d4afb5ceSopenharmony_ciFor convenience, a copy of the license on `./lib/misc/sha-1.c`.  In binary
88d4afb5ceSopenharmony_cidistribution, this applies to builds with ws support enabled, and without
89d4afb5ceSopenharmony_ci`LWS_WITHOUT_BUILTIN_SHA1` at cmake.
90d4afb5ceSopenharmony_ci
91d4afb5ceSopenharmony_ci```
92d4afb5ceSopenharmony_ci/*
93d4afb5ceSopenharmony_ci * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
94d4afb5ceSopenharmony_ci * All rights reserved.
95d4afb5ceSopenharmony_ci *
96d4afb5ceSopenharmony_ci * Redistribution and use in source and binary forms, with or without
97d4afb5ceSopenharmony_ci * modification, are permitted provided that the following conditions
98d4afb5ceSopenharmony_ci * are met:
99d4afb5ceSopenharmony_ci * 1. Redistributions of source code must retain the above copyright
100d4afb5ceSopenharmony_ci *    notice, this list of conditions and the following disclaimer.
101d4afb5ceSopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright
102d4afb5ceSopenharmony_ci *    notice, this list of conditions and the following disclaimer in the
103d4afb5ceSopenharmony_ci *    documentation and/or other materials provided with the distribution.
104d4afb5ceSopenharmony_ci * 3. Neither the name of the project nor the names of its contributors
105d4afb5ceSopenharmony_ci *    may be used to endorse or promote products derived from this software
106d4afb5ceSopenharmony_ci *    without specific prior written permission.
107d4afb5ceSopenharmony_ci *
108d4afb5ceSopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
109d4afb5ceSopenharmony_ci * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
110d4afb5ceSopenharmony_ci * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
111d4afb5ceSopenharmony_ci * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
112d4afb5ceSopenharmony_ci * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
113d4afb5ceSopenharmony_ci * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
114d4afb5ceSopenharmony_ci * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
115d4afb5ceSopenharmony_ci * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
116d4afb5ceSopenharmony_ci * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
117d4afb5ceSopenharmony_ci * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
118d4afb5ceSopenharmony_ci * SUCH
119d4afb5ceSopenharmony_ci```
120d4afb5ceSopenharmony_ci
121d4afb5ceSopenharmony_ci## ZLIB
122d4afb5ceSopenharmony_ci
123d4afb5ceSopenharmony_ciFor convenience, a copy of the license on zlib.  In binary distribution,
124d4afb5ceSopenharmony_cithis applies for win32 builds with internal zlib only.  You can avoid
125d4afb5ceSopenharmony_cibuilding any zlib usage or copy at all with `-DLWS_WITH_ZLIB=0` (the
126d4afb5ceSopenharmony_cidefault), and so avoid needing to observe the license for binary
127d4afb5ceSopenharmony_cidistribution that doesn't include the related code.
128d4afb5ceSopenharmony_ci
129d4afb5ceSopenharmony_ci```
130d4afb5ceSopenharmony_ci  This software is provided 'as-is', without any express or implied
131d4afb5ceSopenharmony_ci  warranty.  In no event will the authors be held liable for any damages
132d4afb5ceSopenharmony_ci  arising from the use of this software.
133d4afb5ceSopenharmony_ci
134d4afb5ceSopenharmony_ci  Permission is granted to anyone to use this software for any purpose,
135d4afb5ceSopenharmony_ci  including commercial applications, and to alter it and redistribute it
136d4afb5ceSopenharmony_ci  freely, subject to the following restrictions:
137d4afb5ceSopenharmony_ci
138d4afb5ceSopenharmony_ci  1. The origin of this software must not be misrepresented; you must not
139d4afb5ceSopenharmony_ci     claim that you wrote the original software. If you use this software
140d4afb5ceSopenharmony_ci     in a product, an acknowledgment in the product documentation would be
141d4afb5ceSopenharmony_ci     appreciated but is not required.
142d4afb5ceSopenharmony_ci  2. Altered source versions must be plainly marked as such, and must not be
143d4afb5ceSopenharmony_ci     misrepresented as being the original software.
144d4afb5ceSopenharmony_ci  3. This notice may not be removed or altered from any source distribution.
145d4afb5ceSopenharmony_ci
146d4afb5ceSopenharmony_ci  Jean-loup Gailly        Mark Adler
147d4afb5ceSopenharmony_ci  jloup@gzip.org          madler@alumni.caltech.edu
148d4afb5ceSopenharmony_ci```
149d4afb5ceSopenharmony_ci
150d4afb5ceSopenharmony_ci
151d4afb5ceSopenharmony_ci## APACHE2
152d4afb5ceSopenharmony_ci
153d4afb5ceSopenharmony_ciFor convenience, a copy of the license on the mbedtls wrapper part.  In binary
154d4afb5ceSopenharmony_cidistribution, this applies only when building lws against mbedtls.
155d4afb5ceSopenharmony_ci
156d4afb5ceSopenharmony_ciThe canonical license application to source files uses the URL reference, so the
157d4afb5ceSopenharmony_ciwhole is not reproduced here.
158d4afb5ceSopenharmony_ci
159d4afb5ceSopenharmony_ci```
160d4afb5ceSopenharmony_ci// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
161d4afb5ceSopenharmony_ci//
162d4afb5ceSopenharmony_ci// Licensed under the Apache License, Version 2.0 (the "License");
163d4afb5ceSopenharmony_ci// you may not use this file except in compliance with the License.
164d4afb5ceSopenharmony_ci// You may obtain a copy of the License at
165d4afb5ceSopenharmony_ci
166d4afb5ceSopenharmony_ci//     http://www.apache.org/licenses/LICENSE-2.0
167d4afb5ceSopenharmony_ci//
168d4afb5ceSopenharmony_ci// Unless required by applicable law or agreed to in writing, software
169d4afb5ceSopenharmony_ci// distributed under the License is distributed on an "AS IS" BASIS,
170d4afb5ceSopenharmony_ci// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
171d4afb5ceSopenharmony_ci// See the License for the specific language governing permissions and
172d4afb5ceSopenharmony_ci// limitations under the License.
173d4afb5ceSopenharmony_ci```
174d4afb5ceSopenharmony_ci
175d4afb5ceSopenharmony_ci## CC0
176d4afb5ceSopenharmony_ci
177d4afb5ceSopenharmony_ciFor convenience,the full text of CC0 dedication found on the lws examples.
178d4afb5ceSopenharmony_ciThe intention of this is to dedicate the examples to the public domain, so
179d4afb5ceSopenharmony_ciusers can build off and modify them without any constraint.
180d4afb5ceSopenharmony_ci
181d4afb5ceSopenharmony_ci```
182d4afb5ceSopenharmony_ciStatement of Purpose
183d4afb5ceSopenharmony_ci
184d4afb5ceSopenharmony_ciThe laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
185d4afb5ceSopenharmony_ci
186d4afb5ceSopenharmony_ciCertain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
187d4afb5ceSopenharmony_ci
188d4afb5ceSopenharmony_ciFor these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
189d4afb5ceSopenharmony_ci
190d4afb5ceSopenharmony_ci1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
191d4afb5ceSopenharmony_ci
192d4afb5ceSopenharmony_ci    the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
193d4afb5ceSopenharmony_ci    moral rights retained by the original author(s) and/or performer(s);
194d4afb5ceSopenharmony_ci    publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
195d4afb5ceSopenharmony_ci    rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
196d4afb5ceSopenharmony_ci    rights protecting the extraction, dissemination, use and reuse of data in a Work;
197d4afb5ceSopenharmony_ci    database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
198d4afb5ceSopenharmony_ci    other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
199d4afb5ceSopenharmony_ci
200d4afb5ceSopenharmony_ci2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
201d4afb5ceSopenharmony_ci
202d4afb5ceSopenharmony_ci3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
203d4afb5ceSopenharmony_ci
204d4afb5ceSopenharmony_ci4. Limitations and Disclaimers.
205d4afb5ceSopenharmony_ci
206d4afb5ceSopenharmony_ci    No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
207d4afb5ceSopenharmony_ci    Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
208d4afb5ceSopenharmony_ci    Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
209d4afb5ceSopenharmony_ci    Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
210d4afb5ceSopenharmony_ci```
211d4afb5ceSopenharmony_ci
212