1Libwebsockets and included programs are provided under the terms of the 2MIT license shown below, with the exception that some sources are under 3a similar permissive license like BSD, or are explicitly CC0 / public 4domain to remove any obstacles from basing differently-licensed code on 5them. 6 7Original liberal license retained: 8 9 - lib/misc/sha-1.c - 3-clause BSD license retained, link to original [BSD3] 10 - win32port/zlib - ZLIB license (see zlib.h) [ZLIB] 11 - lib/tls/mbedtls/wrapper - Apache 2.0 (only built if linked against mbedtls) [APACHE2] 12 lib/tls/mbedtls/mbedtls-extensions.c 13 - lib/misc/base64-decode.c - already MIT 14 - lib/misc/ieeehalfprecision.c - 2-clause BSD license retained [BSD2] 15 16Relicensed to MIT: 17 18 - lib/misc/daemonize.c - relicensed from Public Domain to MIT, 19 link to original Public Domain version 20 - lib/plat/windows/windows-resolv.c - relicensed from "Beerware v42" to MIT 21 22Public Domain (CC-zero) to simplify reuse: 23 24 - test-apps/*.c 25 - test-apps/*.h 26 - minimal-examples/* 27 - lwsws/* 28 29Although libwebsockets is available under a permissive license, it does not 30change the reality of dealing with large lumps of external code... if your 31copy diverges it is guaranteed to contain security problems after a while 32and can be very painful to pick backports (especially since historically, 33we are very hot on cleaning and refactoring the codebase). The least 34painful and lowest risk way remains sending your changes and fixes upstream 35to us so you can easily use later releases and fixes. 36 37## MIT License applied to libwebsockets 38 39https://opensource.org/licenses/MIT 40 41 Permission is hereby granted, free of charge, to any person obtaining a copy 42 of this software and associated documentation files (the "Software"), to 43 deal in the Software without restriction, including without limitation the 44 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 45 sell copies of the Software, and to permit persons to whom the Software is 46 furnished to do so, subject to the following conditions: 47 48 The above copyright notice and this permission notice shall be included in 49 all copies or substantial portions of the Software. 50 51 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 52 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 53 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 54 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 55 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 56 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 57 IN THE SOFTWARE. 58 593D Slicer Contribution and Software License Agreement Version 1.0 60applied to cmake/FindGit.cmake: 61 62 3D Slicer Contribution and Software License Agreement ("Agreement") 63 Version 1.0 (December 20, 2005) 64 65 This Agreement covers contributions to and downloads from the 3D 66 Slicer project ("Slicer") maintained by The Brigham and Women's 67 Hospital, Inc. ("Brigham"). Part A of this Agreement applies to 68 contributions of software and/or data to Slicer (including making 69 revisions of or additions to code and/or data already in Slicer). Part 70 B of this Agreement applies to downloads of software and/or data from 71 Slicer. Part C of this Agreement applies to all transactions with 72 Slicer. If you distribute Software (as defined below) downloaded from 73 Slicer, all of the paragraphs of Part B of this Agreement must be 74 included with and apply to such Software. 75 76 Your contribution of software and/or data to Slicer (including prior 77 to the date of the first publication of this Agreement, each a 78 "Contribution") and/or downloading, copying, modifying, displaying, 79 distributing or use of any software and/or data from Slicer 80 (collectively, the "Software") constitutes acceptance of all of the 81 terms and conditions of this Agreement. If you do not agree to such 82 terms and conditions, you have no right to contribute your 83 Contribution, or to download, copy, modify, display, distribute or use 84 the Software. 85 86 PART A. CONTRIBUTION AGREEMENT - License to Brigham with Right to 87 Sublicense ("Contribution Agreement"). 88 89 1. As used in this Contribution Agreement, "you" means the individual 90 contributing the Contribution to Slicer and the institution or 91 entity which employs or is otherwise affiliated with such 92 individual in connection with such Contribution. 93 94 2. This Contribution Agreement applies to all Contributions made to 95 Slicer, including without limitation Contributions made prior to 96 the date of first publication of this Agreement. If at any time you 97 make a Contribution to Slicer, you represent that (i) you are 98 legally authorized and entitled to make such Contribution and to 99 grant all licenses granted in this Contribution Agreement with 100 respect to such Contribution; (ii) if your Contribution includes 101 any patient data, all such data is de-identified in accordance with 102 U.S. confidentiality and security laws and requirements, including 103 but not limited to the Health Insurance Portability and 104 Accountability Act (HIPAA) and its regulations, and your disclosure 105 of such data for the purposes contemplated by this Agreement is 106 properly authorized and in compliance with all applicable laws and 107 regulations; and (iii) you have preserved in the Contribution all 108 applicable attributions, copyright notices and licenses for any 109 third party software or data included in the Contribution. 110 111 3. Except for the licenses granted in this Agreement, you reserve all 112 right, title and interest in your Contribution. 113 114 4. You hereby grant to Brigham, with the right to sublicense, a 115 perpetual, worldwide, non-exclusive, no charge, royalty-free, 116 irrevocable license to use, reproduce, make derivative works of, 117 display and distribute the Contribution. If your Contribution is 118 protected by patent, you hereby grant to Brigham, with the right to 119 sublicense, a perpetual, worldwide, non-exclusive, no-charge, 120 royalty-free, irrevocable license under your interest in patent 121 rights covering the Contribution, to make, have made, use, sell and 122 otherwise transfer your Contribution, alone or in combination with 123 any other code. 124 125 5. You acknowledge and agree that Brigham may incorporate your 126 Contribution into Slicer and may make Slicer available to members 127 of the public on an open source basis under terms substantially in 128 accordance with the Software License set forth in Part B of this 129 Agreement. You further acknowledge and agree that Brigham shall 130 have no liability arising in connection with claims resulting from 131 your breach of any of the terms of this Agreement. 132 133 6. YOU WARRANT THAT TO THE BEST OF YOUR KNOWLEDGE YOUR CONTRIBUTION 134 DOES NOT CONTAIN ANY CODE THAT REQURES OR PRESCRIBES AN "OPEN 135 SOURCE LICENSE" FOR DERIVATIVE WORKS (by way of non-limiting 136 example, the GNU General Public License or other so-called 137 "reciprocal" license that requires any derived work to be licensed 138 under the GNU General Public License or other "open source 139 license"). 140 141 PART B. DOWNLOADING AGREEMENT - License from Brigham with Right to 142 Sublicense ("Software License"). 143 144 1. As used in this Software License, "you" means the individual 145 downloading and/or using, reproducing, modifying, displaying and/or 146 distributing the Software and the institution or entity which 147 employs or is otherwise affiliated with such individual in 148 connection therewith. The Brigham and Women?s Hospital, 149 Inc. ("Brigham") hereby grants you, with right to sublicense, with 150 respect to Brigham's rights in the software, and data, if any, 151 which is the subject of this Software License (collectively, the 152 "Software"), a royalty-free, non-exclusive license to use, 153 reproduce, make derivative works of, display and distribute the 154 Software, provided that: 155 156 (a) you accept and adhere to all of the terms and conditions of this 157 Software License; 158 159 (b) in connection with any copy of or sublicense of all or any portion 160 of the Software, all of the terms and conditions in this Software 161 License shall appear in and shall apply to such copy and such 162 sublicense, including without limitation all source and executable 163 forms and on any user documentation, prefaced with the following 164 words: "All or portions of this licensed product (such portions are 165 the "Software") have been obtained under license from The Brigham and 166 Women's Hospital, Inc. and are subject to the following terms and 167 conditions:" 168 169 (c) you preserve and maintain all applicable attributions, copyright 170 notices and licenses included in or applicable to the Software; 171 172 (d) modified versions of the Software must be clearly identified and 173 marked as such, and must not be misrepresented as being the original 174 Software; and 175 176 (e) you consider making, but are under no obligation to make, the 177 source code of any of your modifications to the Software freely 178 available to others on an open source basis. 179 180 2. The license granted in this Software License includes without 181 limitation the right to (i) incorporate the Software into 182 proprietary programs (subject to any restrictions applicable to 183 such programs), (ii) add your own copyright statement to your 184 modifications of the Software, and (iii) provide additional or 185 different license terms and conditions in your sublicenses of 186 modifications of the Software; provided that in each case your use, 187 reproduction or distribution of such modifications otherwise 188 complies with the conditions stated in this Software License. 189 190 3. This Software License does not grant any rights with respect to 191 third party software, except those rights that Brigham has been 192 authorized by a third party to grant to you, and accordingly you 193 are solely responsible for (i) obtaining any permissions from third 194 parties that you need to use, reproduce, make derivative works of, 195 display and distribute the Software, and (ii) informing your 196 sublicensees, including without limitation your end-users, of their 197 obligations to secure any such required permissions. 198 199 4. The Software has been designed for research purposes only and has 200 not been reviewed or approved by the Food and Drug Administration 201 or by any other agency. YOU ACKNOWLEDGE AND AGREE THAT CLINICAL 202 APPLICATIONS ARE NEITHER RECOMMENDED NOR ADVISED. Any 203 commercialization of the Software is at the sole risk of the party 204 or parties engaged in such commercialization. You further agree to 205 use, reproduce, make derivative works of, display and distribute 206 the Software in compliance with all applicable governmental laws, 207 regulations and orders, including without limitation those relating 208 to export and import control. 209 210 5. The Software is provided "AS IS" and neither Brigham nor any 211 contributor to the software (each a "Contributor") shall have any 212 obligation to provide maintenance, support, updates, enhancements 213 or modifications thereto. BRIGHAM AND ALL CONTRIBUTORS SPECIFICALLY 214 DISCLAIM ALL EXPRESS AND IMPLIED WARRANTIES OF ANY KIND INCLUDING, 215 BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR 216 A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 217 BRIGHAM OR ANY CONTRIBUTOR BE LIABLE TO ANY PARTY FOR DIRECT, 218 INDIRECT, SPECIAL, INCIDENTAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES 219 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ARISING IN ANY WAY 220 RELATED TO THE SOFTWARE, EVEN IF BRIGHAM OR ANY CONTRIBUTOR HAS 221 BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. TO THE MAXIMUM 222 EXTENT NOT PROHIBITED BY LAW OR REGULATION, YOU FURTHER ASSUME ALL 223 LIABILITY FOR YOUR USE, REPRODUCTION, MAKING OF DERIVATIVE WORKS, 224 DISPLAY, LICENSE OR DISTRIBUTION OF THE SOFTWARE AND AGREE TO 225 INDEMNIFY AND HOLD HARMLESS BRIGHAM AND ALL CONTRIBUTORS FROM AND 226 AGAINST ANY AND ALL CLAIMS, SUITS, ACTIONS, DEMANDS AND JUDGMENTS 227 ARISING THEREFROM. 228 229 6. None of the names, logos or trademarks of Brigham or any of 230 Brigham's affiliates or any of the Contributors, or any funding 231 agency, may be used to endorse or promote products produced in 232 whole or in part by operation of the Software or derived from or 233 based on the Software without specific prior written permission 234 from the applicable party. 235 236 7. Any use, reproduction or distribution of the Software which is not 237 in accordance with this Software License shall automatically revoke 238 all rights granted to you under this Software License and render 239 Paragraphs 1 and 2 of this Software License null and void. 240 241 8. This Software License does not grant any rights in or to any 242 intellectual property owned by Brigham or any Contributor except 243 those rights expressly granted hereunder. 244 245 PART C. MISCELLANEOUS 246 247 This Agreement shall be governed by and construed in accordance with 248 the laws of The Commonwealth of Massachusetts without regard to 249 principles of conflicts of law. This Agreement shall supercede and 250 replace any license terms that you may have agreed to previously with 251 respect to Slicer. 252 253## BSD2 254 255``` 256 * Redistribution and use in source and binary forms, with or without 257 * modification, are permitted provided that the following conditions are 258 * met: 259 * 260 * * Redistributions of source code must retain the above copyright 261 * notice, this list of conditions and the following disclaimer. 262 * * Redistributions in binary form must reproduce the above copyright 263 * notice, this list of conditions and the following disclaimer in 264 * the documentation and/or other materials provided with the distribution 265 * 266 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 267 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 268 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 269 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 270 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 271 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 272 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 273 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 274 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 275 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 276 * POSSIBILITY OF SUCH DAMAGE. 277``` 278 279## BSD3 280 281For convenience, a copy of the license on `./lib/misc/sha-1.c`. In binary 282distribution, this applies to builds with ws support enabled, and without 283`LWS_WITHOUT_BUILTIN_SHA1` at cmake. 284 285``` 286/* 287 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 288 * All rights reserved. 289 * 290 * Redistribution and use in source and binary forms, with or without 291 * modification, are permitted provided that the following conditions 292 * are met: 293 * 1. Redistributions of source code must retain the above copyright 294 * notice, this list of conditions and the following disclaimer. 295 * 2. Redistributions in binary form must reproduce the above copyright 296 * notice, this list of conditions and the following disclaimer in the 297 * documentation and/or other materials provided with the distribution. 298 * 3. Neither the name of the project nor the names of its contributors 299 * may be used to endorse or promote products derived from this software 300 * without specific prior written permission. 301 * 302 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 303 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 304 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 305 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 306 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 307 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 308 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 309 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 310 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 311 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 312 * SUCH 313``` 314 315## ZLIB 316 317For convenience, a copy of the license on zlib. In binary distribution, 318this applies for win32 builds with internal zlib only. You can avoid 319building any zlib usage or copy at all with `-DLWS_WITH_ZLIB=0` (the 320default), and so avoid needing to observe the license for binary 321distribution that doesn't include the related code. 322 323``` 324 This software is provided 'as-is', without any express or implied 325 warranty. In no event will the authors be held liable for any damages 326 arising from the use of this software. 327 328 Permission is granted to anyone to use this software for any purpose, 329 including commercial applications, and to alter it and redistribute it 330 freely, subject to the following restrictions: 331 332 1. The origin of this software must not be misrepresented; you must not 333 claim that you wrote the original software. If you use this software 334 in a product, an acknowledgment in the product documentation would be 335 appreciated but is not required. 336 2. Altered source versions must be plainly marked as such, and must not be 337 misrepresented as being the original software. 338 3. This notice may not be removed or altered from any source distribution. 339 340 Jean-loup Gailly Mark Adler 341 jloup@gzip.org madler@alumni.caltech.edu 342``` 343 344 345## APACHE2 346 347For convenience, a copy of the license on the mbedtls wrapper part. In binary 348distribution, this applies only when building lws against mbedtls. 349 350The canonical license application to source files uses the URL reference, so the 351whole is not reproduced here. 352 353``` 354// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD 355// 356// Licensed under the Apache License, Version 2.0 (the "License"); 357// you may not use this file except in compliance with the License. 358// You may obtain a copy of the License at 359 360// http://www.apache.org/licenses/LICENSE-2.0 361// 362// Unless required by applicable law or agreed to in writing, software 363// distributed under the License is distributed on an "AS IS" BASIS, 364// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 365// See the License for the specific language governing permissions and 366// limitations under the License. 367``` 368 369## CC0 370 371For convenience,the full text of CC0 dedication found on the lws examples. 372The intention of this is to dedicate the examples to the public domain, so 373users can build off and modify them without any constraint. 374 375``` 376Statement of Purpose 377 378The 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"). 379 380Certain 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. 381 382For 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. 383 3841. 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: 385 386 the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; 387 moral rights retained by the original author(s) and/or performer(s); 388 publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; 389 rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; 390 rights protecting the extraction, dissemination, use and reuse of data in a Work; 391 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 392 other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. 393 3942. 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. 395 3963. 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. 397 3984. Limitations and Disclaimers. 399 400 No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. 401 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. 402 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. 403 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. 404``` 405 406