Добавлена библиотека curl и решены проблемы при запуске программы
Этот коммит содержится в:
133
curl/dep/libressl/COPYING.txt
Обычный файл
133
curl/dep/libressl/COPYING.txt
Обычный файл
@@ -0,0 +1,133 @@
|
||||
|
||||
LibReSSL files are retained under the copyright of the authors. New
|
||||
additions are ISC licensed as per OpenBSD's normal licensing policy,
|
||||
or are placed in the public domain.
|
||||
|
||||
The OpenSSL code is distributed under the terms of the original OpenSSL
|
||||
licenses which follow:
|
||||
|
||||
LICENSE ISSUES
|
||||
==============
|
||||
|
||||
The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
|
||||
the OpenSSL License and the original SSLeay license apply to the toolkit.
|
||||
See below for the actual license texts. In case of any license issues
|
||||
related to OpenSSL please contact openssl-core@openssl.org.
|
||||
|
||||
OpenSSL License
|
||||
---------------
|
||||
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@openssl.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
Original SSLeay License
|
||||
-----------------------
|
||||
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@cryptsoft.com).
|
||||
* The implementation was written so as to conform with Netscapes SSL.
|
||||
*
|
||||
* This library is free for commercial and non-commercial use as long as
|
||||
* the following conditions are aheared to. The following conditions
|
||||
* apply to all code found in this distribution, be it the RC4, RSA,
|
||||
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||
* included with this distribution is covered by the same copyright terms
|
||||
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
* Copyright remains Eric Young's, and as such any Copyright notices in
|
||||
* the code are not to be removed.
|
||||
* If this package is used in a product, Eric Young should be given attribution
|
||||
* as the author of the parts of the library used.
|
||||
* This can be in the form of a textual message at program startup or
|
||||
* in documentation (online or textual) provided with the package.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* "This product includes cryptographic software written by
|
||||
* Eric Young (eay@cryptsoft.com)"
|
||||
* The word 'cryptographic' can be left out if the rouines from the library
|
||||
* being used are not cryptographic related :-).
|
||||
* 4. If you include any Windows specific code (or a derivative thereof) from
|
||||
* the apps directory (application code) you must include an acknowledgement:
|
||||
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* The licence and distribution terms for any publically available version or
|
||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
3239
curl/dep/libressl/ChangeLog.txt
Обычный файл
3239
curl/dep/libressl/ChangeLog.txt
Обычный файл
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
238
curl/dep/libressl/README.md
Обычный файл
238
curl/dep/libressl/README.md
Обычный файл
@@ -0,0 +1,238 @@
|
||||

|
||||
|
||||
## Official portable version of [LibreSSL](https://www.libressl.org)
|
||||
|
||||
[](https://github.com/libressl/portable/actions/workflows/linux.yml)
|
||||
[](https://github.com/libressl/portable/actions/workflows/macos.yml)
|
||||
[](https://github.com/libressl/portable/actions/workflows/windows.yml)
|
||||
[](https://github.com/libressl/portable/actions/workflows/android.yml)
|
||||
[](https://github.com/libressl/portable/actions/workflows/solaris.yml)
|
||||
[](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:libressl)
|
||||
|
||||
LibreSSL is a fork of [OpenSSL](https://www.openssl.org) 1.0.1g developed by the
|
||||
[OpenBSD](https://www.openbsd.org) project. Our goal is to modernize the codebase,
|
||||
improve security, and apply best practice development processes from OpenBSD.
|
||||
|
||||
## Compatibility with OpenSSL
|
||||
|
||||
LibreSSL provides much of the OpenSSL 1.1 API. The OpenSSL 3 API is not currently
|
||||
supported. Incompatibilities between the projects exist and are unavoidable since
|
||||
both evolve with different goals and priorities. Important incompatibilities will
|
||||
be addressed if possible and as long as they are not too detrimental to LibreSSL's
|
||||
goals of simplicity, security and sanity. We do not add new features, ciphers and
|
||||
API without a solid reason and require that new code be clean and of high quality.
|
||||
|
||||
LibreSSL is not ABI compatible with any release of OpenSSL, or necessarily
|
||||
earlier releases of LibreSSL. You will need to relink your programs to
|
||||
LibreSSL in order to use it, just as in moving between major versions of OpenSSL.
|
||||
LibreSSL's installed library version numbers are incremented to account for
|
||||
ABI and API changes.
|
||||
|
||||
## Compatibility with other operating systems
|
||||
|
||||
While primarily developed on and taking advantage of APIs available on OpenBSD,
|
||||
the LibreSSL portable project attempts to provide working alternatives for
|
||||
other operating systems, and assists with improving OS-native implementations
|
||||
where possible.
|
||||
|
||||
At the time of this writing, LibreSSL is known to build and work on:
|
||||
|
||||
* Linux (kernel 3.17 or later recommended)
|
||||
* FreeBSD (tested with 9.2 and later)
|
||||
* NetBSD (7.0 or later recommended)
|
||||
* HP-UX (11i)
|
||||
* Solaris 11 and later
|
||||
* Mac OS X (tested with 10.8 and later)
|
||||
* AIX (5.3 and later)
|
||||
* Emscripten (3.1.44 and later)
|
||||
|
||||
LibreSSL also supports the following Windows environments:
|
||||
|
||||
* Microsoft Windows (Windows 7 / Windows Server 2008r2 or later, x86 and x64)
|
||||
* Wine (32-bit and 64-bit)
|
||||
* MinGW-w64, Cygwin, and Visual Studio
|
||||
|
||||
Official release tarballs are available at your friendly neighborhood
|
||||
OpenBSD mirror in directory
|
||||
[LibreSSL](https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/),
|
||||
although we suggest that you use a [mirror](https://www.openbsd.org/ftp.html).
|
||||
|
||||
The LibreSSL portable build framework is also
|
||||
[mirrored](https://github.com/libressl/portable) on GitHub.
|
||||
|
||||
Please report bugs either to the public libressl@openbsd.org mailing list,
|
||||
or to the GitHub
|
||||
[issue tracker](https://github.com/libressl/portable/issues)
|
||||
|
||||
Severe vulnerabilities or bugs requiring coordination with OpenSSL can be
|
||||
sent to the core team at libressl-security@openbsd.org.
|
||||
|
||||
# Building LibreSSL
|
||||
|
||||
## Building from a Git checkout
|
||||
|
||||
If you have checked out this source using Git, or have downloaded a source
|
||||
tarball from GitHub, follow these initial steps to prepare the source tree for
|
||||
building. _Note: Your build will fail if you do not follow these instructions!
|
||||
If you cannot follow these instructions or cannot meet these prerequisites,
|
||||
please download an official release distribution from
|
||||
https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/ instead. Using official
|
||||
releases is strongly advised if you are not a developer._
|
||||
|
||||
1. Ensure that you have a bash shell. This is also required on Windows.
|
||||
2. Ensure that you have the following packages installed:
|
||||
automake, autoconf, git, libtool, perl.
|
||||
3. Run `./autogen.sh` to prepare the source tree for building.
|
||||
|
||||
## Build steps using configure
|
||||
|
||||
Once you have the source tree prepared, run these commands to build and install:
|
||||
|
||||
```sh
|
||||
./configure # see ./configure --help for configuration options
|
||||
make check # runs builtin unit tests
|
||||
make install # set DESTDIR= to install to an alternate location
|
||||
```
|
||||
|
||||
Alternatively, it is possible to run `./dist.sh` to prepare a tarball.
|
||||
|
||||
## Build steps using CMake
|
||||
|
||||
Once you have the source tree prepared, run these commands to build and install:
|
||||
|
||||
```sh
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
make test
|
||||
```
|
||||
|
||||
For faster builds, you can use Ninja:
|
||||
|
||||
```sh
|
||||
mkdir build-ninja
|
||||
cd build-ninja
|
||||
cmake -G"Ninja" ..
|
||||
ninja
|
||||
ninja test
|
||||
```
|
||||
|
||||
Or another supported build system like Visual Studio:
|
||||
|
||||
```sh
|
||||
mkdir build-vs2022
|
||||
cd build-vs2022
|
||||
cmake -G"Visual Studio 17 2022" ..
|
||||
```
|
||||
|
||||
#### Additional CMake Options
|
||||
|
||||
| Option Name | Default | Description |
|
||||
|-------------------------|--------:|-----------------------------------------------------------------------------------------------------------------|
|
||||
| `LIBRESSL_SKIP_INSTALL` | `OFF` | allows skipping install() rules. Can be specified from command line using <br>```-DLIBRESSL_SKIP_INSTALL=ON``` |
|
||||
| `LIBRESSL_APPS` | `ON` | allows skipping application builds. Apps are required to run tests |
|
||||
| `LIBRESSL_TESTS` | `ON` | allows skipping of tests. Tests are only available in static builds |
|
||||
| `BUILD_SHARED_LIBS` | `OFF` | CMake option for building shared libraries. |
|
||||
| `ENABLE_ASM` | `ON` | builds assembly optimized rules. |
|
||||
| `ENABLE_EXTRATESTS` | `OFF` | Enable extra tests that may be unreliable on some platforms |
|
||||
| `ENABLE_NC` | `OFF` | Enable installing TLS-enabled nc(1) |
|
||||
| `OPENSSLDIR` | Blank | Set the default openssl directory. Can be specified from command line using <br>```-DOPENSSLDIR=<dirname>``` |
|
||||
|
||||
## Build information for specific systems
|
||||
|
||||
### HP-UX (11i)
|
||||
|
||||
Set the UNIX_STD environment variable to `2003` before running `configure`
|
||||
in order to build with the HP C/aC++ compiler. See the "standards(5)" man
|
||||
page for more details.
|
||||
|
||||
```sh
|
||||
export UNIX_STD=2003
|
||||
./configure
|
||||
make
|
||||
```
|
||||
|
||||
### MinGW-w64 - Windows
|
||||
|
||||
LibreSSL builds against relatively recent versions of [MinGW-w64](https://www.mingw-w64.org/), not to be
|
||||
confused with the original mingw.org project. MinGW-w64 3.2 or later
|
||||
should work. See [README.mingw.md](README.mingw.md) for more information.
|
||||
|
||||
### Emscripten
|
||||
|
||||
When configuring LibreSSL for use with Emscripten, make sure to prepend
|
||||
`emcmake` to your `cmake` configuration command. Once configured, you can
|
||||
proceed with your usual `cmake` commands. For example:
|
||||
|
||||
```sh
|
||||
emcmake cmake . -Bbuild
|
||||
cmake --build build --config Release
|
||||
ctest --test-dir build -C Release --output-on-failure
|
||||
```
|
||||
|
||||
# Using LibreSSL
|
||||
|
||||
## CMake
|
||||
|
||||
Make a new folder in your project root (where your main `CMakeLists.txt` file is
|
||||
located) called CMake. Copy the `FindLibreSSL.cmake` file to that folder, and
|
||||
add the following line to your main `CMakeLists.txt`:
|
||||
|
||||
```cmake
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
|
||||
```
|
||||
|
||||
After your `add_executable` or `add_library` line in your `CMakeLists.txt` file
|
||||
add the following:
|
||||
|
||||
```cmake
|
||||
find_package(LibreSSL REQUIRED)
|
||||
```
|
||||
|
||||
It will tell CMake to find LibreSSL and if found will let you use the following
|
||||
3 interfaces in your `CMakeLists.txt` file:
|
||||
|
||||
* LibreSSL::Crypto
|
||||
* LibreSSL::SSL
|
||||
* LibreSSL::TLS
|
||||
|
||||
If you for example want to use the LibreSSL TLS library in your test program,
|
||||
include it like so (SSL and Crypto are required by TLS and included
|
||||
automatically too):
|
||||
|
||||
```cmake
|
||||
target_link_libraries(test LibreSSL::TLS)
|
||||
```
|
||||
|
||||
Full example:
|
||||
|
||||
```cmake
|
||||
cmake_minimum_required(VERSION 3.10.0)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
|
||||
|
||||
project(test)
|
||||
|
||||
add_executable(test Main.cpp)
|
||||
|
||||
find_package(LibreSSL REQUIRED)
|
||||
|
||||
target_link_libraries(test LibreSSL::TLS)
|
||||
```
|
||||
|
||||
#### Linux
|
||||
|
||||
Following the guide in the sections above to compile LibreSSL using make and
|
||||
running `sudo make install` will install LibreSSL to the `/usr/local/` folder,
|
||||
and will be found automatically by find_package. If your system installs it to
|
||||
another location, or you have placed them yourself in a different location, you
|
||||
can set the CMake variable `LIBRESSL_ROOT_DIR` to the correct path, to help
|
||||
CMake find the library.
|
||||
|
||||
#### Windows
|
||||
|
||||
Placing the library files in `C:/Program Files/LibreSSL/lib` and the include
|
||||
files in `C:/Program Files/LibreSSL/include` should let CMake find them
|
||||
automatically, but it is recommended that you use CMake-GUI to set the paths.
|
||||
It is more convenient as you can have the files in any folder you choose.
|
||||
Ссылка в новой задаче
Block a user