Skip to content

Commit 6419557

Browse files
committed
Add LICENSE.md and clarify snippet from curl
1 parent 2b8085c commit 6419557

File tree

5 files changed

+132
-276
lines changed

5 files changed

+132
-276
lines changed

LICENSE

Lines changed: 0 additions & 25 deletions
This file was deleted.

LICENSE.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
The Cryptolens Client API for C++ is licensed under the 2-Clause BSD License
2+
given below. The client API consists of the files in the `examples/`, `include/`,
3+
`src/` and `vsprojects/` directories.
4+
5+
```
6+
Copyright (c) 2019, Cryptolens AB
7+
All rights reserved.
8+
9+
Redistribution and use in source and binary forms, with or without
10+
modification, are permitted provided that the following conditions are met:
11+
12+
* Redistributions of source code must retain the above copyright notice, this
13+
list of conditions and the following disclaimer.
14+
15+
* Redistributions in binary form must reproduce the above copyright notice,
16+
this list of conditions and the following disclaimer in the documentation
17+
and/or other materials provided with the distribution.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
```
30+
31+
## Dependencies
32+
33+
The client API depends on other libraries for it to function correctly.
34+
35+
Currently, all versions and configurations are set up to use the
36+
base64 implementation found in `third_party/base64_OpenBSD/`. This
37+
implementation is licensed under a ISC license as well as something
38+
similar to a 3-Clause BSD license, for more details, see the files in
39+
the directory.
40+
41+
In the `master` branch on Github we have for conveniance included several
42+
other dependencies in the `third_party/` directory. Which of these are used
43+
depends on how the `basic_Cryptolens` or `basic_SKM` class is set up, as well
44+
as how you set up your build environment.
45+
46+
The following sections cover which dependencies from `third_party/` are
47+
included by default for the different api versions.
48+
49+
### Core dependencies
50+
51+
This section details the dependencies which are used independently of which
52+
template arguments are provided to the `basic_Cryptolens` or `basic_SKM`
53+
class.
54+
55+
More precisly, the following dependencies are included when using the
56+
`cryptolens_io::v20180502` namespace, or when using the
57+
`cryptolens_io::v20190401` namespace with `Configuration_Unix`,
58+
`Configuration_Unix_IgnoreExpires`, `Configuration_Windows` or
59+
`Configuration_Windows_IgnoreExpires` as the `Configuration` template
60+
argument to `basic_Cryptolens` class.
61+
62+
* [ArduinoJson 5](https://github.com/bblanchon/ArduinoJson) from the
63+
`third_party/ArduinoJson` directory.
64+
* [optional lite](https://github.com/martinmoene/optional-lite) from
65+
the `third_party/optional-lite` is used when compiling against
66+
C++-14 or below.
67+
68+
### Configuration dependent dependencies
69+
70+
When using `Configuration_Windows`, `Configuration_Windows_IgnoreExpires`
71+
or `RequestHandler_WinHTTP` the default build configurations link against
72+
the code in `third_party/curl`. This code consists of a single, very simple
73+
function from the [cURL](https://curl.haxx.se/) library. It is unclear
74+
to us if this function is complex enough to be covered by copyright.

ThirdPartyLicenses.txt

Lines changed: 0 additions & 227 deletions
This file was deleted.

src/RequestHandler_WinHTTP.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -157,30 +157,6 @@ RequestHandler_WinHTTP_PostBuilder::make(basic_Error & e)
157157

158158
namespace internal {
159159

160-
/* FROM CURL */
161-
static bool Curl_isunreserved(unsigned char in)
162-
{
163-
switch (in) {
164-
case '0': case '1': case '2': case '3': case '4':
165-
case '5': case '6': case '7': case '8': case '9':
166-
case 'a': case 'b': case 'c': case 'd': case 'e':
167-
case 'f': case 'g': case 'h': case 'i': case 'j':
168-
case 'k': case 'l': case 'm': case 'n': case 'o':
169-
case 'p': case 'q': case 'r': case 's': case 't':
170-
case 'u': case 'v': case 'w': case 'x': case 'y': case 'z':
171-
case 'A': case 'B': case 'C': case 'D': case 'E':
172-
case 'F': case 'G': case 'H': case 'I': case 'J':
173-
case 'K': case 'L': case 'M': case 'N': case 'O':
174-
case 'P': case 'Q': case 'R': case 'S': case 'T':
175-
case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z':
176-
case '-': case '.': case '_': case '~':
177-
return 1;
178-
default:
179-
break;
180-
}
181-
return 0;
182-
}
183-
184160
std::string
185161
percent_encode(std::string const& s)
186162
{

0 commit comments

Comments
 (0)