@crossbind/extension-updater 0.0.0-stage → 2.0.0-beta.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +35 -2
- package/crossbind.extension.js +48 -0
- package/native/darwin.mm +100 -0
- package/native/linux.cpp +69 -0
- package/native/monocypher/LICENCE.md +167 -0
- package/native/monocypher/README.md +10 -0
- package/native/monocypher/monocypher-ed25519.c +503 -0
- package/native/monocypher/monocypher-ed25519.h +140 -0
- package/native/monocypher/monocypher.c +2988 -0
- package/native/monocypher/monocypher.h +321 -0
- package/native/monocypher-ed25519.cpp +2 -0
- package/native/monocypher.cpp +2 -0
- package/native/updater.cpp +461 -0
- package/native/updater.h +27 -0
- package/native/windows.cpp +195 -0
- package/package.json +40 -3
- package/page.d.ts +12 -0
- package/page.js +21 -0
- package/src/update.js +146 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Buğra Sarı and crossbind contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @crossbind/extension-updater
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A desktop app's own updates, each checked against its Ed25519 signature.
|
|
4
|
+
|
|
5
|
+
An app has it by having `@crossbind/core-app-host`, which lists it as a dependency: there is nothing to install or list.
|
|
6
|
+
|
|
7
|
+
## Use
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
import { updater } from 'crossbind/app';
|
|
11
|
+
|
|
12
|
+
const update = await updater.check();
|
|
13
|
+
if (update) await updater.install();
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
`updater.install` downloads the version `updater.check` found, installs it once its signature holds, then quits the app
|
|
17
|
+
and opens the new one.
|
|
18
|
+
|
|
19
|
+
## Options
|
|
20
|
+
|
|
21
|
+
`app.updater` turns it on: `{ url, publicKey }`, the address of the manifest an update is listed in and the Ed25519
|
|
22
|
+
public key that checks it. `npx crossbind app updater-key` makes the key pair; a build with the private key in
|
|
23
|
+
`CROSSBIND_UPDATER_PRIVATE_KEY` writes each platform's update and its signed manifest beside the app.
|
|
24
|
+
|
|
25
|
+
## Platforms
|
|
26
|
+
|
|
27
|
+
macOS, Linux and Windows. A Linux app updates itself from what `tar-gz` makes, and a Windows app from what `nsis` makes. An iOS or Android app updates through its store, and `updater.check()` rejects there.
|
|
28
|
+
|
|
29
|
+
## Replace or leave out
|
|
30
|
+
|
|
31
|
+
It holds the role `updater`. An extension that gives `replaces: 'updater'` takes it; `app: { without: ['updater'] }` in `crossbind.config.js` leaves it out. Its update goes with it. Leaving it out while `app.updater` is set stops the build. [The guide](https://crossbind.dev/guide/extensions/#replace) shows how, and [extensions.md](https://github.com/crossbind/crossbind/blob/main/docs/api/extensions.md#the-hosts-own-extensions) what a replacement answers.
|
|
32
|
+
|
|
33
|
+
[app.md](https://github.com/crossbind/crossbind/blob/main/docs/api/app.md#updates) has the manifest and where to put it.
|
|
34
|
+
|
|
35
|
+
It carries Monocypher 4.0.3 (BSD-2-Clause or CC0-1.0), whose Ed25519 and SHA-512 check an update, in `native/monocypher/`;
|
|
36
|
+
provenance in its README.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
UPDATER_KEY, appUpdater, checkUpdate, makeUpdate, newUpdaterKey,
|
|
3
|
+
} from './src/update.js';
|
|
4
|
+
|
|
5
|
+
export default function updater() {
|
|
6
|
+
return {
|
|
7
|
+
name: 'updater',
|
|
8
|
+
contract: 1,
|
|
9
|
+
root: import.meta.dirname,
|
|
10
|
+
reads: ['updater'],
|
|
11
|
+
// A phone's store updates it. An update's signature covers the app's id and version.
|
|
12
|
+
fromApp(api) {
|
|
13
|
+
const updater = ['macos', 'linux', 'windows'].includes(api.platform) ? appUpdater(api) : null;
|
|
14
|
+
return updater && { ...updater, id: api.app.id };
|
|
15
|
+
},
|
|
16
|
+
app: {
|
|
17
|
+
sources: ['native/updater.cpp', 'native/monocypher.cpp', 'native/monocypher-ed25519.cpp'],
|
|
18
|
+
macos: { sources: ['native/darwin.mm'], frameworks: ['Security'] },
|
|
19
|
+
linux: { sources: ['native/linux.cpp'] },
|
|
20
|
+
windows: { sources: ['native/windows.cpp'], libraries: ['winhttp', 'wintrust', 'crypt32'] },
|
|
21
|
+
licenses: [{
|
|
22
|
+
name: 'monocypher',
|
|
23
|
+
version: '4.0.3',
|
|
24
|
+
license: 'BSD-2-Clause OR CC0-1.0',
|
|
25
|
+
file: 'native/monocypher/LICENCE.md',
|
|
26
|
+
source: 'https://monocypher.org/download/monocypher-4.0.3.tar.gz',
|
|
27
|
+
sha256: '8cc9bc341a66249016db9bd70e9142d8d0aef9945973744b1ac05dbc55d8ee66',
|
|
28
|
+
}],
|
|
29
|
+
},
|
|
30
|
+
// An update is made last, of what the app's installers made.
|
|
31
|
+
installer: {
|
|
32
|
+
platform: 'desktop',
|
|
33
|
+
isLast: true,
|
|
34
|
+
check: checkUpdate,
|
|
35
|
+
make: makeUpdate,
|
|
36
|
+
},
|
|
37
|
+
commands: {
|
|
38
|
+
'updater-key': {
|
|
39
|
+
help: "make the key pair that signs a desktop app's updates",
|
|
40
|
+
run(api) {
|
|
41
|
+
const { publicKey, privateKey } = newUpdaterKey();
|
|
42
|
+
api.log(`crossbind: app.updater.publicKey in crossbind.config.js: ${publicKey}`);
|
|
43
|
+
api.log(`crossbind: ${UPDATER_KEY}, kept secret where the app is built: ${privateKey}`);
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
package/native/darwin.mm
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
#import <Security/Security.h>
|
|
3
|
+
|
|
4
|
+
#include "updater.h"
|
|
5
|
+
|
|
6
|
+
#include <stdexcept>
|
|
7
|
+
|
|
8
|
+
namespace crossbind::updater {
|
|
9
|
+
namespace {
|
|
10
|
+
|
|
11
|
+
// How often the wait looks at what the download has received.
|
|
12
|
+
constexpr int64_t CHECK_NSEC = NSEC_PER_SEC / 4;
|
|
13
|
+
|
|
14
|
+
std::string describe(OSStatus status) {
|
|
15
|
+
NSString *message = CFBridgingRelease(SecCopyErrorMessageString(status, nullptr));
|
|
16
|
+
return message ? std::string(message.UTF8String) : "error " + std::to_string(status);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
} // namespace
|
|
20
|
+
|
|
21
|
+
std::filesystem::path bundlePath() { return NSBundle.mainBundle.bundlePath.fileSystemRepresentation; }
|
|
22
|
+
|
|
23
|
+
// As Sparkle holds an update: the app it unpacked to meets the requirement this app's own signature states, which for a
|
|
24
|
+
// Developer ID names the app's identifier and its team. An ad hoc signature names no signer to hold it to.
|
|
25
|
+
void checkSigner(const std::filesystem::path &update) {
|
|
26
|
+
@autoreleasepool {
|
|
27
|
+
SecCodeRef running = nullptr;
|
|
28
|
+
if (SecCodeCopySelf(kSecCSDefaultFlags, &running) != errSecSuccess) return;
|
|
29
|
+
CFDictionaryRef signing = nullptr;
|
|
30
|
+
const bool hasSigner = SecCodeCopySigningInformation(running, kSecCSSigningInformation, &signing) == errSecSuccess &&
|
|
31
|
+
CFDictionaryGetValue(signing, kSecCodeInfoCertificates) != nullptr;
|
|
32
|
+
if (signing) CFRelease(signing);
|
|
33
|
+
SecRequirementRef requirement = nullptr;
|
|
34
|
+
OSStatus status = hasSigner ? SecCodeCopyDesignatedRequirement(running, kSecCSDefaultFlags, &requirement) : errSecSuccess;
|
|
35
|
+
CFRelease(running);
|
|
36
|
+
if (!hasSigner) return;
|
|
37
|
+
SecStaticCodeRef code = nullptr;
|
|
38
|
+
if (status == errSecSuccess) {
|
|
39
|
+
NSURL *app = [NSURL fileURLWithPath:@(update.c_str()) isDirectory:YES];
|
|
40
|
+
status = SecStaticCodeCreateWithPath((__bridge CFURLRef)app, kSecCSDefaultFlags, &code);
|
|
41
|
+
}
|
|
42
|
+
if (status == errSecSuccess) {
|
|
43
|
+
status = SecStaticCodeCheckValidity(code, kSecCSCheckAllArchitectures | kSecCSCheckNestedCode | kSecCSStrictValidate, requirement);
|
|
44
|
+
}
|
|
45
|
+
if (code) CFRelease(code);
|
|
46
|
+
if (requirement) CFRelease(requirement);
|
|
47
|
+
if (status != errSecSuccess) {
|
|
48
|
+
throw std::runtime_error("crossbind: cannot install the update: " + update.filename().string() + " is not signed as this app is: " +
|
|
49
|
+
describe(status));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// A session that keeps nothing, so that every check asks the server anew.
|
|
55
|
+
void download(const std::string &url, const std::filesystem::path &file, std::uintmax_t maxBytes) {
|
|
56
|
+
@autoreleasepool {
|
|
57
|
+
NSString *address = [NSString stringWithUTF8String:url.c_str()];
|
|
58
|
+
NSURL *source = address ? [NSURL URLWithString:address] : nil;
|
|
59
|
+
if (!source) throw std::runtime_error("crossbind: " + url + " is no address");
|
|
60
|
+
NSString *path = [NSString stringWithUTF8String:file.c_str()];
|
|
61
|
+
if (!path) throw std::runtime_error("crossbind: cannot download to " + file.string());
|
|
62
|
+
NSURL *target = [NSURL fileURLWithPath:path];
|
|
63
|
+
NSURLSessionConfiguration *configuration = NSURLSessionConfiguration.ephemeralSessionConfiguration;
|
|
64
|
+
configuration.requestCachePolicy = NSURLRequestReloadIgnoringLocalCacheData;
|
|
65
|
+
NSURLSession *session = [NSURLSession sessionWithConfiguration:configuration];
|
|
66
|
+
dispatch_semaphore_t finished = dispatch_semaphore_create(0);
|
|
67
|
+
__block std::string failure;
|
|
68
|
+
NSURLSessionDownloadTask *task = [session downloadTaskWithURL:source
|
|
69
|
+
completionHandler:^(NSURL *location, NSURLResponse *response, NSError *error) {
|
|
70
|
+
const NSInteger status = [response isKindOfClass:NSHTTPURLResponse.class]
|
|
71
|
+
? ((NSHTTPURLResponse *)response).statusCode
|
|
72
|
+
: 0;
|
|
73
|
+
NSError *moved = nil;
|
|
74
|
+
if (error) {
|
|
75
|
+
failure = "crossbind: cannot download " + url + ": " +
|
|
76
|
+
(error.localizedDescription.UTF8String ?: "no reason given");
|
|
77
|
+
} else if (status != 200) {
|
|
78
|
+
failure = "crossbind: " + url + " answered " + std::to_string(status);
|
|
79
|
+
} else {
|
|
80
|
+
// The task deletes its file once this returns.
|
|
81
|
+
[NSFileManager.defaultManager removeItemAtURL:target error:nil];
|
|
82
|
+
if (![NSFileManager.defaultManager moveItemAtURL:location toURL:target error:&moved]) {
|
|
83
|
+
failure = "crossbind: cannot keep the download of " + url + ": " +
|
|
84
|
+
(moved.localizedDescription.UTF8String ?: "no reason given");
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
dispatch_semaphore_signal(finished);
|
|
88
|
+
}];
|
|
89
|
+
[task resume];
|
|
90
|
+
const auto isTooLarge = [&] { return static_cast<std::uintmax_t>(task.countOfBytesReceived) > maxBytes; };
|
|
91
|
+
while (dispatch_semaphore_wait(finished, dispatch_time(DISPATCH_TIME_NOW, CHECK_NSEC)) != 0) {
|
|
92
|
+
if (isTooLarge()) [task cancel];
|
|
93
|
+
}
|
|
94
|
+
[session finishTasksAndInvalidate];
|
|
95
|
+
if (isTooLarge()) throw std::runtime_error("crossbind: " + url + " answered more than " + std::to_string(maxBytes) + " bytes");
|
|
96
|
+
if (!failure.empty()) throw std::runtime_error(failure);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
} // namespace crossbind::updater
|
package/native/linux.cpp
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#include "updater.h"
|
|
2
|
+
|
|
3
|
+
#include <libsoup/soup.h>
|
|
4
|
+
|
|
5
|
+
#include <stdexcept>
|
|
6
|
+
#include <vector>
|
|
7
|
+
|
|
8
|
+
namespace crossbind::updater {
|
|
9
|
+
namespace {
|
|
10
|
+
|
|
11
|
+
constexpr gsize READ_CHUNK = 64 * 1024;
|
|
12
|
+
// Seconds a connection may stay silent.
|
|
13
|
+
constexpr guint IDLE_TIMEOUT = 60;
|
|
14
|
+
|
|
15
|
+
} // namespace
|
|
16
|
+
|
|
17
|
+
// Linux signs no apps, so an update is the app's when app.updater's key signed it.
|
|
18
|
+
void checkSigner(const std::filesystem::path &) {}
|
|
19
|
+
|
|
20
|
+
// libsoup, which WebKitGTK loads anyway. Its blocking calls run off the main thread in a context of their own, and
|
|
21
|
+
// without the decoder that would unpack a .tar.gz a server labels gzip-encoded.
|
|
22
|
+
void download(const std::string &url, const std::filesystem::path &file, std::uintmax_t maxBytes) {
|
|
23
|
+
GMainContext *context = g_main_context_new();
|
|
24
|
+
g_main_context_push_thread_default(context);
|
|
25
|
+
SoupSession *session = soup_session_new();
|
|
26
|
+
soup_session_set_timeout(session, IDLE_TIMEOUT);
|
|
27
|
+
soup_session_remove_feature_by_type(session, SOUP_TYPE_CONTENT_DECODER);
|
|
28
|
+
SoupMessage *message = soup_message_new(SOUP_METHOD_GET, url.c_str());
|
|
29
|
+
GError *error = nullptr;
|
|
30
|
+
GInputStream *body = message ? soup_session_send(session, message, nullptr, &error) : nullptr;
|
|
31
|
+
std::string failure;
|
|
32
|
+
if (!message) {
|
|
33
|
+
failure = "crossbind: " + url + " is no address";
|
|
34
|
+
} else if (!body) {
|
|
35
|
+
failure = "crossbind: cannot download " + url + ": " + (error ? error->message : "no reason given");
|
|
36
|
+
} else if (const unsigned status = soup_message_get_status(message); status != SOUP_STATUS_OK) {
|
|
37
|
+
failure = "crossbind: " + url + " answered " + std::to_string(status);
|
|
38
|
+
} else {
|
|
39
|
+
GFile *target = g_file_new_for_path(file.c_str());
|
|
40
|
+
GFileOutputStream *out = g_file_replace(target, nullptr, FALSE, G_FILE_CREATE_NONE, nullptr, &error);
|
|
41
|
+
std::vector<char> chunk(READ_CHUNK);
|
|
42
|
+
std::uintmax_t total = 0;
|
|
43
|
+
gssize read = out ? 0 : -1;
|
|
44
|
+
while (out && (read = g_input_stream_read(body, chunk.data(), chunk.size(), nullptr, &error)) > 0) {
|
|
45
|
+
total += static_cast<std::uintmax_t>(read);
|
|
46
|
+
if (total > maxBytes) break;
|
|
47
|
+
if (!g_output_stream_write_all(G_OUTPUT_STREAM(out), chunk.data(), static_cast<gsize>(read), nullptr, nullptr, &error)) {
|
|
48
|
+
read = -1;
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (total > maxBytes) {
|
|
53
|
+
failure = "crossbind: " + url + " answered more than " + std::to_string(maxBytes) + " bytes";
|
|
54
|
+
} else if (read < 0 || !g_output_stream_close(G_OUTPUT_STREAM(out), nullptr, &error)) {
|
|
55
|
+
failure = "crossbind: cannot keep the download of " + url + ": " + (error ? error->message : "no reason given");
|
|
56
|
+
}
|
|
57
|
+
if (out) g_object_unref(out);
|
|
58
|
+
g_object_unref(target);
|
|
59
|
+
}
|
|
60
|
+
g_clear_error(&error);
|
|
61
|
+
if (body) g_object_unref(body);
|
|
62
|
+
if (message) g_object_unref(message);
|
|
63
|
+
g_object_unref(session);
|
|
64
|
+
g_main_context_pop_thread_default(context);
|
|
65
|
+
g_main_context_unref(context);
|
|
66
|
+
if (!failure.empty()) throw std::runtime_error(failure);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
} // namespace crossbind::updater
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
Monocypher as a whole is dual-licensed. Choose whichever licence you
|
|
2
|
+
want from the two licences listed below.
|
|
3
|
+
|
|
4
|
+
The first licence is a regular 2-clause BSD licence. The second licence
|
|
5
|
+
is the CC-0 from Creative Commons. It is intended to release Monocypher
|
|
6
|
+
to the public domain. The BSD licence serves as a fallback option.
|
|
7
|
+
|
|
8
|
+
See the individual files for specific information about who contributed
|
|
9
|
+
to what file during which years. See below for special notes.
|
|
10
|
+
|
|
11
|
+
Licence 1 (2-clause BSD)
|
|
12
|
+
------------------------
|
|
13
|
+
|
|
14
|
+
Copyright (c) 2017-2023, Loup Vaillant
|
|
15
|
+
Copyright (c) 2017-2019, Michael Savage
|
|
16
|
+
Copyright (c) 2017-2023, Fabio Scotoni
|
|
17
|
+
All rights reserved.
|
|
18
|
+
|
|
19
|
+
Redistribution and use in source and binary forms, with or without
|
|
20
|
+
modification, are permitted provided that the following conditions are
|
|
21
|
+
met:
|
|
22
|
+
|
|
23
|
+
1. Redistributions of source code must retain the above copyright
|
|
24
|
+
notice, this list of conditions and the following disclaimer.
|
|
25
|
+
|
|
26
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
27
|
+
notice, this list of conditions and the following disclaimer in the
|
|
28
|
+
documentation and/or other materials provided with the
|
|
29
|
+
distribution.
|
|
30
|
+
|
|
31
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
32
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
33
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
34
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
35
|
+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
36
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
37
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
38
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
39
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
40
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
41
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
Licence 2 (CC-0)
|
|
45
|
+
----------------
|
|
46
|
+
|
|
47
|
+
> CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
|
48
|
+
> LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
|
49
|
+
> ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
|
50
|
+
> INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
|
51
|
+
> REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
|
52
|
+
> PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
|
53
|
+
> THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
|
54
|
+
> HEREUNDER.
|
|
55
|
+
|
|
56
|
+
### Statement of Purpose
|
|
57
|
+
|
|
58
|
+
The laws of most jurisdictions throughout the world automatically confer
|
|
59
|
+
exclusive Copyright and Related Rights (defined below) upon the creator
|
|
60
|
+
and subsequent owner(s) (each and all, an "owner") of an original work
|
|
61
|
+
of authorship and/or a database (each, a "Work").
|
|
62
|
+
|
|
63
|
+
Certain owners wish to permanently relinquish those rights to a Work for
|
|
64
|
+
the purpose of contributing to a commons of creative, cultural and
|
|
65
|
+
scientific works ("Commons") that the public can reliably and without
|
|
66
|
+
fear of later claims of infringement build upon, modify, incorporate in
|
|
67
|
+
other works, reuse and redistribute as freely as possible in any form
|
|
68
|
+
whatsoever and for any purposes, including without limitation commercial
|
|
69
|
+
purposes. These owners may contribute to the Commons to promote the
|
|
70
|
+
ideal of a free culture and the further production of creative, cultural
|
|
71
|
+
and scientific works, or to gain reputation or greater distribution for
|
|
72
|
+
their Work in part through the use and efforts of others.
|
|
73
|
+
|
|
74
|
+
For these and/or other purposes and motivations, and without any
|
|
75
|
+
expectation of additional consideration or compensation, the person
|
|
76
|
+
associating CC0 with a Work (the "Affirmer"), to the extent that he or
|
|
77
|
+
she is an owner of Copyright and Related Rights in the Work, voluntarily
|
|
78
|
+
elects to apply CC0 to the Work and publicly distribute the Work under
|
|
79
|
+
its terms, with knowledge of his or her Copyright and Related Rights in
|
|
80
|
+
the Work and the meaning and intended legal effect of CC0 on those
|
|
81
|
+
rights.
|
|
82
|
+
|
|
83
|
+
1. **Copyright and Related Rights.** A Work made available under CC0 may
|
|
84
|
+
be protected by copyright and related or neighboring rights
|
|
85
|
+
("Copyright and Related Rights"). Copyright and Related Rights
|
|
86
|
+
include, but are not limited to, the following:
|
|
87
|
+
|
|
88
|
+
- the right to reproduce, adapt, distribute, perform, display,
|
|
89
|
+
communicate, and translate a Work;
|
|
90
|
+
- moral rights retained by the original author(s) and/or
|
|
91
|
+
performer(s); publicity and privacy rights pertaining to a person's
|
|
92
|
+
image or likeness depicted in a Work;
|
|
93
|
+
- rights protecting against unfair competition in regards to a Work,
|
|
94
|
+
subject to the limitations in paragraph 4(a), below;
|
|
95
|
+
- rights protecting the extraction, dissemination, use and reuse of
|
|
96
|
+
data in a Work;
|
|
97
|
+
- database rights (such as those arising under Directive 96/9/EC of
|
|
98
|
+
the European Parliament and of the Council of 11 March 1996 on the
|
|
99
|
+
legal protection of databases, and under any national
|
|
100
|
+
implementation thereof, including any amended or successor version
|
|
101
|
+
of such directive); and
|
|
102
|
+
- other similar, equivalent or corresponding rights throughout the
|
|
103
|
+
world based on applicable law or treaty, and any national
|
|
104
|
+
implementations thereof.
|
|
105
|
+
|
|
106
|
+
2. **Waiver.** To the greatest extent permitted by, but not in
|
|
107
|
+
contravention of, applicable law, Affirmer hereby overtly, fully,
|
|
108
|
+
permanently, irrevocably and unconditionally waives, abandons, and
|
|
109
|
+
surrenders all of Affirmer's Copyright and Related Rights and
|
|
110
|
+
associated claims and causes of action, whether now known or unknown
|
|
111
|
+
(including existing as well as future claims and causes of action),
|
|
112
|
+
in the Work (i) in all territories worldwide, (ii) for the maximum
|
|
113
|
+
duration provided by applicable law or treaty (including future time
|
|
114
|
+
extensions), (iii) in any current or future medium and for any number
|
|
115
|
+
of copies, and (iv) for any purpose whatsoever, including without
|
|
116
|
+
limitation commercial, advertising or promotional purposes (the
|
|
117
|
+
"Waiver"). Affirmer makes the Waiver for the benefit of each member
|
|
118
|
+
of the public at large and to the detriment of Affirmer's heirs and
|
|
119
|
+
successors, fully intending that such Waiver shall not be subject to
|
|
120
|
+
revocation, rescission, cancellation, termination, or any other legal
|
|
121
|
+
or equitable action to disrupt the quiet enjoyment of the Work by the
|
|
122
|
+
public as contemplated by Affirmer's express Statement of Purpose.
|
|
123
|
+
|
|
124
|
+
3. **Public License Fallback.** Should any part of the Waiver for any
|
|
125
|
+
reason be judged legally invalid or ineffective under applicable law,
|
|
126
|
+
then the Waiver shall be preserved to the maximum extent permitted
|
|
127
|
+
taking into account Affirmer's express Statement of Purpose. In
|
|
128
|
+
addition, to the extent the Waiver is so judged Affirmer hereby
|
|
129
|
+
grants to each affected person a royalty-free, non transferable, non
|
|
130
|
+
sublicensable, non exclusive, irrevocable and unconditional license
|
|
131
|
+
to exercise Affirmer's Copyright and Related Rights in the Work (i)
|
|
132
|
+
in all territories worldwide, (ii) for the maximum duration provided
|
|
133
|
+
by applicable law or treaty (including future time extensions), (iii)
|
|
134
|
+
in any current or future medium and for any number of copies, and
|
|
135
|
+
(iv) for any purpose whatsoever, including without limitation
|
|
136
|
+
commercial, advertising or promotional purposes (the "License"). The
|
|
137
|
+
License shall be deemed effective as of the date CC0 was applied by
|
|
138
|
+
Affirmer to the Work. Should any part of the License for any reason
|
|
139
|
+
be judged legally invalid or ineffective under applicable law, such
|
|
140
|
+
partial invalidity or ineffectiveness shall not invalidate the
|
|
141
|
+
remainder of the License, and in such case Affirmer hereby affirms
|
|
142
|
+
that he or she will not (i) exercise any of his or her remaining
|
|
143
|
+
Copyright and Related Rights in the Work or (ii) assert any
|
|
144
|
+
associated claims and causes of action with respect to the Work, in
|
|
145
|
+
either case contrary to Affirmer's express Statement of Purpose.
|
|
146
|
+
|
|
147
|
+
4. **Limitations and Disclaimers.**
|
|
148
|
+
|
|
149
|
+
- No trademark or patent rights held by Affirmer are waived,
|
|
150
|
+
abandoned, surrendered, licensed or otherwise affected by this
|
|
151
|
+
document.
|
|
152
|
+
- Affirmer offers the Work as-is and makes no representations or
|
|
153
|
+
warranties of any kind concerning the Work, express, implied,
|
|
154
|
+
statutory or otherwise, including without limitation warranties of
|
|
155
|
+
title, merchantability, fitness for a particular purpose, non
|
|
156
|
+
infringement, or the absence of latent or other defects, accuracy,
|
|
157
|
+
or the present or absence of errors, whether or not discoverable,
|
|
158
|
+
all to the greatest extent permissible under applicable law.
|
|
159
|
+
- Affirmer disclaims responsibility for clearing rights of other
|
|
160
|
+
persons that may apply to the Work or any use thereof, including
|
|
161
|
+
without limitation any person's Copyright and Related Rights in the
|
|
162
|
+
Work. Further, Affirmer disclaims responsibility for obtaining any
|
|
163
|
+
necessary consents, permissions or other rights required for any
|
|
164
|
+
use of the Work.
|
|
165
|
+
- Affirmer understands and acknowledges that Creative Commons is not
|
|
166
|
+
a party to this document and has no duty or obligation with respect
|
|
167
|
+
to this CC0 or use of the Work.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Monocypher (vendored)
|
|
2
|
+
|
|
3
|
+
The host's updater checks a desktop app's update's Ed25519 signature, and hashes the update with SHA-512, with
|
|
4
|
+
Monocypher, which it compiles as C++ through `../monocypher.cpp` and `../monocypher-ed25519.cpp`: `monocypher.c` and
|
|
5
|
+
`monocypher.h`, and `monocypher-ed25519.c` and `monocypher-ed25519.h` from the release's `src/optional/`, unchanged.
|
|
6
|
+
|
|
7
|
+
- Upstream: https://monocypher.org
|
|
8
|
+
- Version: `4.0.3`, `https://monocypher.org/download/monocypher-4.0.3.tar.gz`, sha256
|
|
9
|
+
`8cc9bc341a66249016db9bd70e9142d8d0aef9945973744b1ac05dbc55d8ee66`, which matches the release's published SHA-512
|
|
10
|
+
- License: BSD-2-Clause or CC0-1.0, whichever one picks; see `LICENCE.md`, the release's own
|