licentivo-sdk 0.10.0-x86_64-linux-gnu → 0.11.0-x86_64-linux-gnu
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.
- checksums.yaml +4 -4
- data/README.md +57 -62
- data/examples/app.rb +11 -4
- data/examples/quickstart.rb +8 -2
- data/lib/licentivo/native/licentivo_native.so +0 -0
- data/lib/licentivo.rb +32 -4
- data/native/licentivo.c +13 -1
- data/native/licentivo.h +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e50297fc943893a24c84986d540c75d3b8d81173b107640ab012a8b5f58a7eb3
|
|
4
|
+
data.tar.gz: 57a256d0ef0103ff5353f4ceac2b2ba307d0b6c1bf940f55fe00c6f4b63d4935
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1462a8519da67d04fc43e549f4df032d99927a511be2965afee06edcea65f6a9695a1554b227e1b4d4108f1e45a87eaded7a19b2755be7a176d1289ed2370196
|
|
7
|
+
data.tar.gz: 3746e04655bf049edde78934f76071504a937f49b86393a4c103bbdceb7cd407dbb186ab9c80f4711c31755ff6b0ae1302ddc8ec29d32a1703d16431b985fffd
|
data/README.md
CHANGED
|
@@ -1,80 +1,75 @@
|
|
|
1
1
|
# Licentivo Ruby SDK
|
|
2
2
|
|
|
3
|
-
Add
|
|
3
|
+
Add license activation and real feature permissions to your own application.
|
|
4
|
+
The SDK handles requests, machine identity, pinned signatures, private credentials,
|
|
5
|
+
cache and policy heartbeats. Your app supplies activation input and business code.
|
|
4
6
|
|
|
5
|
-
##
|
|
7
|
+
## Install into your project
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
- Verifies pinned signatures, checks expiry and feature access, and protects your business block.
|
|
9
|
-
- Runs policy heartbeats, supports permitted offline use and floating-seat cleanup.
|
|
10
|
-
- Handles metered-feature reserve/commit/cancel and journals pending settlement across restarts.
|
|
11
|
-
- Supports refresh, explicit device deactivation, offline file activation and structured error diagnostics.
|
|
9
|
+
Requirements: Ruby 3.1+, Fiddle, C11 compiler and libcurl development files. Source gems also need make.
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
Install the public SDK package in your existing application project:
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Start with the repository's `QUICKSTART.md`. The application in
|
|
18
|
-
`examples/quickstart.rb` activates/restores a device and actually exports a file.
|
|
19
|
-
It also supports `LICENTIVO_METERED=1` with a stable `LICENTIVO_OPERATION_ID`.
|
|
20
|
-
|
|
21
|
-
Prerequisites: Ruby 3.1+ with Fiddle, a C11 compiler and libcurl development files.
|
|
22
|
-
Linux also needs OpenSSL development files. Installing a source gem requires make
|
|
23
|
-
(RubyInstaller Devkit/MSYS2 on Windows). A matching precompiled platform gem
|
|
24
|
-
includes the core and installs without a C compiler; Windows also includes the
|
|
25
|
-
matching libcurl DLL and its license. The platform gem still requires Fiddle.
|
|
26
|
-
The source launcher builds the bundled
|
|
27
|
-
core automatically. For a source gem, RubyGems builds it during installation.
|
|
28
|
-
Windows uses MinGW and a matching libcurl package; set `LICENTIVO_CURL_ROOT` and add
|
|
29
|
-
its `bin` directory to the process's PATH. Physical macOS acceptance is pending.
|
|
30
|
-
|
|
31
|
-
Install the pinned RubyGems release, or add it to your application's Gemfile:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
gem install licentivo-sdk --version 0.10.0
|
|
13
|
+
```sh
|
|
14
|
+
gem install licentivo-sdk --version 0.11.0
|
|
35
15
|
```
|
|
36
16
|
|
|
37
|
-
|
|
38
|
-
gem 'licentivo-sdk', '= 0.10.0'
|
|
39
|
-
```
|
|
17
|
+
For Bundler, use `gem "licentivo-sdk", "= 0.11.0"` in your Gemfile.
|
|
40
18
|
|
|
41
|
-
|
|
19
|
+
No SDK source download, extraction or local path dependency is required.
|
|
42
20
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
21
|
+
## Initialize from product settings in code
|
|
22
|
+
|
|
23
|
+
In Console > Products, copy your Product ID. Click that product's **Signing public
|
|
24
|
+
keys** and copy every key ID/public key pair into trustedKeys / trusted_keys below.
|
|
25
|
+
Replace the three YOUR_ placeholders. Quick integration can generate the public
|
|
26
|
+
code constants for your own product. No configuration file is needed. The SDK
|
|
27
|
+
defaults to `https://www.licentivo.com`; a software version is optional unless
|
|
28
|
+
your policy uses version/maintenance controls. Each product has its own signing
|
|
29
|
+
keys; customers of the same product share its public verification pins.
|
|
47
30
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
The SDK does not download executable code when you require it.
|
|
31
|
+
Read customerKey / customer_key from your activation form. Accept a customer's
|
|
32
|
+
ordinary license key or temporary transfer code; never use a vendor management key.
|
|
51
33
|
|
|
52
34
|
```ruby
|
|
53
35
|
require 'licentivo'
|
|
54
36
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
37
|
+
trusted_keys = {'YOUR_KEY_ID' => 'YOUR_PUBLIC_KEY'}
|
|
38
|
+
Licentivo::Client.open_product('YOUR_PRODUCT_ID', trusted_keys, customer_key) do |client|
|
|
39
|
+
client.run_feature('export') { File.write('report.csv', "Your report\n") }
|
|
40
|
+
# Real application: keep the owning block alive until shutdown.
|
|
58
41
|
end
|
|
59
42
|
```
|
|
60
43
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
your
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
44
|
+
Place the feature gate in the actual button/shortcut/command business handler.
|
|
45
|
+
Denied operations do not invoke the callback. After first activation, pass an
|
|
46
|
+
empty key to restore the saved credential for this product and user. Ordinary
|
|
47
|
+
close retains device registration; `deactivate` is for explicit device release.
|
|
48
|
+
Floating close attempts to return its seat, with server expiry as fallback.
|
|
49
|
+
Use `refresh_online` to force an online check. Offline behavior follows the signed
|
|
50
|
+
policy and expiry; a confirmed server denial blocks protected features.
|
|
51
|
+
|
|
52
|
+
## Metering and advanced operations
|
|
53
|
+
|
|
54
|
+
Use `run_metered_feature` for a configured usage counter, passing a distinct stable job ID,
|
|
55
|
+
quantity and your business callback. The SDK reserves, executes, commits/cancels
|
|
56
|
+
and records pending settlement. A known successful job retry settles without
|
|
57
|
+
rerunning business. Persist the actual business result; after a crash during a
|
|
58
|
+
callback, inspect its outcome and pass the truth to `resolve_metered_feature`. The SDK does not
|
|
59
|
+
guess or replay an uncertain business action. Metering requires a network.
|
|
60
|
+
|
|
61
|
+
The lower-level reserve/commit/cancel and immediate-consume methods remain
|
|
62
|
+
available. Offline request/response files are a separate disconnected-computer
|
|
63
|
+
workflow. For private deployments, proxy settings or app versions, construct the
|
|
64
|
+
language's SDK configuration object directly in code and use its lower-level
|
|
65
|
+
constructor/start API. TLS and public-key pinning remain enabled.
|
|
66
|
+
|
|
67
|
+
The binding uses the shared C core through Fiddle. Calls are synchronous. open_product returns an owning client when no block is provided; with a block it closes in ensure. No Ruby callback is registered on the native heartbeat thread. Poll local status for UI updates. A metered Execution has value, executed and replay?.
|
|
68
|
+
|
|
69
|
+
Close with `close` at application shutdown. Do not distribute test activation
|
|
70
|
+
keys, machine credentials, cached grants or vendor management API keys.
|
|
71
|
+
See [QUICKSTART.md](https://www.licentivo.com/en/docs.html#quickstart) and the
|
|
72
|
+
[small desktop example](https://www.licentivo.com/en/docs.html#example).
|
|
73
|
+
MIT licensed; bundled dependencies retain their licenses (NOTICE).
|
|
74
|
+
|
|
75
|
+
For advanced in-code Hash settings, use `Client.open_config(config) { |client| ... }`. It starts and closes with the block, without a file.
|
data/examples/app.rb
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
require_relative '../lib/licentivo'
|
|
3
3
|
|
|
4
|
+
# BEGIN LICENTIVO PRODUCT
|
|
5
|
+
# Copy Product ID and all key ID/public key pairs from Console > Products > Signing public keys.
|
|
6
|
+
PRODUCT_ID = 'YOUR_PRODUCT_ID'
|
|
7
|
+
TRUSTED_KEYS = {'YOUR_KEY_ID' => 'YOUR_PUBLIC_KEY'}.freeze
|
|
8
|
+
# END LICENTIVO PRODUCT
|
|
9
|
+
|
|
4
10
|
def ask(label)
|
|
5
11
|
print label
|
|
6
12
|
$stdout.flush
|
|
@@ -12,19 +18,19 @@ def export_report
|
|
|
12
18
|
puts 'Saved licensed-report.txt'
|
|
13
19
|
end
|
|
14
20
|
|
|
15
|
-
|
|
21
|
+
|
|
16
22
|
key = ENV.fetch('LICENTIVO_LICENSE_KEY', '')
|
|
17
23
|
client = nil
|
|
18
24
|
begin
|
|
19
25
|
begin
|
|
20
|
-
client = Licentivo::Client.
|
|
26
|
+
client = Licentivo::Client.open_product(PRODUCT_ID, TRUSTED_KEYS, key)
|
|
21
27
|
rescue Licentivo::Error => error
|
|
22
28
|
warn error.message
|
|
23
29
|
key = ask('Customer activation key (not a management API key): ')
|
|
24
|
-
client = Licentivo::Client.
|
|
30
|
+
client = Licentivo::Client.open_product(PRODUCT_ID, TRUSTED_KEYS, key)
|
|
25
31
|
end
|
|
26
32
|
loop do
|
|
27
|
-
puts "\n1 Status | 2 Export | 3 Metered export | 4 Refresh | 5 Transfer device | 0 Quit"
|
|
33
|
+
puts "\n1 Status | 2 Export | 3 Metered export | 4 Refresh | 5 Transfer device | 6 Pro report | 0 Quit"
|
|
28
34
|
choice = ask('> ')
|
|
29
35
|
break if choice == '0' || choice.empty?
|
|
30
36
|
begin
|
|
@@ -35,6 +41,7 @@ begin
|
|
|
35
41
|
id = ask('Stable job ID (reuse only to recover this same job): ')
|
|
36
42
|
result = client.run_metered_feature('export', 1, id) { export_report }
|
|
37
43
|
puts 'Existing job confirmed; export was not repeated' if result.replay?
|
|
44
|
+
when '6' then client.run_feature('pro') { File.write('pro-report.txt', "Sales total: 40.00\n") }
|
|
38
45
|
when '4' then client.refresh_online
|
|
39
46
|
when '5'
|
|
40
47
|
if ask('Type TRANSFER to explicitly unbind this device: ') == 'TRANSFER'
|
data/examples/quickstart.rb
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
require_relative '../lib/licentivo'
|
|
3
3
|
|
|
4
|
+
# BEGIN LICENTIVO PRODUCT
|
|
5
|
+
# Copy Product ID and all key ID/public key pairs from Console > Products > Signing public keys.
|
|
6
|
+
PRODUCT_ID = 'YOUR_PRODUCT_ID'
|
|
7
|
+
TRUSTED_KEYS = {'YOUR_KEY_ID' => 'YOUR_PUBLIC_KEY'}.freeze
|
|
8
|
+
# END LICENTIVO PRODUCT
|
|
9
|
+
|
|
4
10
|
def setting(name, fallback)
|
|
5
11
|
value = ENV[name]
|
|
6
12
|
value.nil? || value.empty? ? fallback : value
|
|
@@ -13,8 +19,8 @@ end
|
|
|
13
19
|
|
|
14
20
|
begin
|
|
15
21
|
# A GUI supplies the activation input. Later starts use an empty key.
|
|
16
|
-
Licentivo::Client.
|
|
17
|
-
|
|
22
|
+
Licentivo::Client.open_product(
|
|
23
|
+
PRODUCT_ID, TRUSTED_KEYS,
|
|
18
24
|
setting('LICENTIVO_LICENSE_KEY', '')
|
|
19
25
|
) do |client|
|
|
20
26
|
feature = setting('LICENTIVO_FEATURE', 'export')
|
|
Binary file
|
data/lib/licentivo.rb
CHANGED
|
@@ -4,7 +4,7 @@ require 'json'
|
|
|
4
4
|
require 'monitor'
|
|
5
5
|
|
|
6
6
|
module Licentivo
|
|
7
|
-
VERSION = '0.
|
|
7
|
+
VERSION = '0.11.0'
|
|
8
8
|
|
|
9
9
|
class Error < StandardError
|
|
10
10
|
attr_reader :code, :http_status, :request_id, :retryable, :retry_after_seconds
|
|
@@ -58,6 +58,8 @@ module Licentivo
|
|
|
58
58
|
p, i, q = Fiddle::TYPE_VOIDP, Fiddle::TYPE_INT, Fiddle::TYPE_LONG_LONG
|
|
59
59
|
signatures = {
|
|
60
60
|
init: ['ln_init_file_with_license', [p,p], p],
|
|
61
|
+
init_json: ['ln_init', [p], p],
|
|
62
|
+
init_product: ['ln_init_product', [p,p,p], p],
|
|
61
63
|
start: ['ln_start', [p], i], destroy: ['ln_destroy', [p], Fiddle::TYPE_VOID],
|
|
62
64
|
last_error: ['ln_last_error', [p], p], error_info: ['ln_get_error_info', [p,p], i],
|
|
63
65
|
status: ['ln_status', [p], p], feature_status: ['ln_feature_status', [p,p], p],
|
|
@@ -94,6 +96,26 @@ module Licentivo
|
|
|
94
96
|
end
|
|
95
97
|
|
|
96
98
|
class Client
|
|
99
|
+
def self.open_config(config, &block)
|
|
100
|
+
raise ArgumentError, 'Provide an in-code configuration Hash' unless config.is_a?(Hash)
|
|
101
|
+
open_with_license(config, &block)
|
|
102
|
+
end
|
|
103
|
+
def self.open_product(product_id, trusted_keys, customer_key = '')
|
|
104
|
+
client = new(product_id, customer_key, trusted_keys: trusted_keys)
|
|
105
|
+
begin
|
|
106
|
+
client.start
|
|
107
|
+
rescue Exception
|
|
108
|
+
client.close
|
|
109
|
+
raise
|
|
110
|
+
end
|
|
111
|
+
return client unless block_given?
|
|
112
|
+
begin
|
|
113
|
+
yield client
|
|
114
|
+
ensure
|
|
115
|
+
client.close
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
97
119
|
def self.open_with_license(path, customer_key = '')
|
|
98
120
|
client = new(path, customer_key)
|
|
99
121
|
begin
|
|
@@ -110,12 +132,18 @@ module Licentivo
|
|
|
110
132
|
end
|
|
111
133
|
end
|
|
112
134
|
|
|
113
|
-
def initialize(path, customer_key = '')
|
|
135
|
+
def initialize(path, customer_key = '', trusted_keys: nil)
|
|
114
136
|
@lock, @in_callback = Monitor.new, false
|
|
115
|
-
@native =
|
|
137
|
+
@native = if path.is_a?(Hash)
|
|
138
|
+
Native.call(:init_json, Native.input(JSON.generate(path)))
|
|
139
|
+
elsif trusted_keys.nil?
|
|
140
|
+
Native.call(:init, Native.input(path), Native.input(customer_key))
|
|
141
|
+
else
|
|
142
|
+
Native.call(:init_product, Native.input(path), Native.input(JSON.generate(trusted_keys)), Native.input(customer_key.strip))
|
|
143
|
+
end
|
|
116
144
|
if @native.null?
|
|
117
145
|
@native = nil
|
|
118
|
-
raise Error.new('Check product
|
|
146
|
+
raise Error.new('Check product ID, public keys and local storage', code: 'CONFIGURATION_ERROR')
|
|
119
147
|
end
|
|
120
148
|
end
|
|
121
149
|
|
data/native/licentivo.c
CHANGED
|
@@ -231,7 +231,7 @@ char*ln_feature_status(ln_client*c,const char*feature){
|
|
|
231
231
|
}
|
|
232
232
|
void ln_on_status_changed(ln_client*c,ln_status_callback callback,void*data){if(!c)return;view_lock(c);c->callback=callback;c->callback_data=data;view_unlock(c);}
|
|
233
233
|
static void notify(ln_client*c){view_lock(c);ln_status_callback callback=c->callback;void*data=c->callback_data;view_unlock(c);if(callback){char*status=ln_status(c);if(status){callback(status,data);free(status);}}}
|
|
234
|
-
ln_client*ln_init(const char*config){if(!ensure_curl())return NULL;cJSON*cfg=ln_json(config);if(!cfg)return NULL;if(!text(cfg,"license_key"))cJSON_AddStringToObject(cfg,"license_key","");const char*base=text(cfg,"base_url");if(base&&strlen(base)>0&&base[strlen(base)-1]=='/'){char*copy=malloc(strlen(base));if(!copy){cJSON_Delete(cfg);return NULL;}memcpy(copy,base,strlen(base)-1);copy[strlen(base)-1]=0;cJSON_ReplaceItemInObjectCaseSensitive(cfg,"base_url",cJSON_CreateString(copy));free(copy);}const char*cache=text(cfg,"cache_path");if(!cache||!cache[0]){char scope[65],context[512],path[2048];snprintf(context,sizeof(context),"%s\n%s",text(cfg,"base_url")?text(cfg,"base_url"):"",text(cfg,"product_id")?text(cfg,"product_id"):"");if(!hash(context,scope)){cJSON_Delete(cfg);return NULL;}
|
|
234
|
+
ln_client*ln_init(const char*config){if(!ensure_curl())return NULL;cJSON*cfg=ln_json(config);if(!cfg)return NULL;if(!text(cfg,"license_key"))cJSON_AddStringToObject(cfg,"license_key","");const char*base=text(cfg,"base_url");if(!base||!base[0]){cJSON_DeleteItemFromObjectCaseSensitive(cfg,"base_url");cJSON_AddStringToObject(cfg,"base_url","https://www.licentivo.com");base=text(cfg,"base_url");}if(base&&strlen(base)>0&&base[strlen(base)-1]=='/'){char*copy=malloc(strlen(base));if(!copy){cJSON_Delete(cfg);return NULL;}memcpy(copy,base,strlen(base)-1);copy[strlen(base)-1]=0;cJSON_ReplaceItemInObjectCaseSensitive(cfg,"base_url",cJSON_CreateString(copy));free(copy);}const char*cache=text(cfg,"cache_path");if(!cache||!cache[0]){char scope[65],context[512],path[2048];snprintf(context,sizeof(context),"%s\n%s",text(cfg,"base_url")?text(cfg,"base_url"):"",text(cfg,"product_id")?text(cfg,"product_id"):"");if(!hash(context,scope)){cJSON_Delete(cfg);return NULL;}
|
|
235
235
|
#ifdef _WIN32
|
|
236
236
|
const char*root=getenv("LOCALAPPDATA");
|
|
237
237
|
#else
|
|
@@ -246,6 +246,18 @@ ln_client*ln_init(const char*config){if(!ensure_curl())return NULL;cJSON*cfg=ln_
|
|
|
246
246
|
#endif
|
|
247
247
|
load_credential(c);if(!secret[0]&&!c->auth){ln_destroy(c);return NULL;}const char*path=text(cfg,"cache_path");char*b=path&&path[0]?readfile(path,LIMIT):NULL;if(b){cJSON*s=ln_json(b);int64_t version,observed;char h[65];int hash_ok=secret[0]?hash(secret,h):device(text(c->auth,"source_hash"));if(!secret[0]&&hash_ok)strcpy(h,text(c->auth,"source_hash"));if(hash_ok&&s&&num(s,"version",&version)&&version==1&&text(s,"license_hash")&&!strcmp(text(s,"license_hash"),h)&&num(s,"observed_at",&observed)&&time(NULL)+300>=observed&&ln_verify(get(s,"lease"),keys,text(cfg,"product_id"),text(cfg,"device_id"),time(NULL))){int interval=3600,mode=envelope_policy(get(s,"lease"),&interval);if(mode!=1&&client_context(c,get(s,"lease"))){c->cached=cJSON_Duplicate(get(s,"lease"),1);c->wall=observed;c->interval=interval;c->offline=mode;}}cJSON_Delete(s);free(b);}publish(c,0);return c;}
|
|
248
248
|
ln_client*ln_init_file(const char*p){char*b=readfile(p,LIMIT);if(!b)return NULL;ln_client*c=ln_init(b);free(b);return c;}
|
|
249
|
+
ln_client*ln_init_product(const char*product_id,const char*trusted_keys_json,const char*license_key){
|
|
250
|
+
if(!product_id||!trusted_keys_json||!license_key)return NULL;
|
|
251
|
+
const char*start=license_key;while(*start==' '||*start=='\t'||*start=='\r'||*start=='\n')start++;
|
|
252
|
+
const char*end=start+strlen(start);while(end>start&&(end[-1]==' '||end[-1]=='\t'||end[-1]=='\r'||end[-1]=='\n'))end--;
|
|
253
|
+
size_t length=(size_t)(end-start);if(length>50)return NULL;
|
|
254
|
+
char trimmed[51];memcpy(trimmed,start,length);trimmed[length]=0;
|
|
255
|
+
cJSON*keys=ln_json(trusted_keys_json);if(!cJSON_IsObject(keys)){cJSON_Delete(keys);return NULL;}
|
|
256
|
+
cJSON*cfg=cJSON_CreateObject();if(!cfg){cJSON_Delete(keys);return NULL;}
|
|
257
|
+
cJSON_AddStringToObject(cfg,"product_id",product_id);cJSON_AddItemToObject(cfg,"trusted_keys",keys);cJSON_AddStringToObject(cfg,"license_key",trimmed);
|
|
258
|
+
char*json=cJSON_PrintUnformatted(cfg);cJSON_Delete(cfg);if(!json)return NULL;
|
|
259
|
+
ln_client*client=ln_init(json);cJSON_free(json);return client;
|
|
260
|
+
}
|
|
249
261
|
ln_client*ln_init_file_with_license(const char*path,const char*license_key){
|
|
250
262
|
if(!license_key)return NULL;
|
|
251
263
|
const char*start=license_key;while(*start==' '||*start=='\t'||*start=='\r'||*start=='\n')start++;
|
data/native/licentivo.h
CHANGED
|
@@ -32,6 +32,9 @@ char *ln_commit(ln_client*,const char *reservation_id,const char *operation_id);
|
|
|
32
32
|
char *ln_cancel(ln_client*,const char *reservation_id,const char *operation_id);
|
|
33
33
|
/* All runtime operations are serialized. Configuration pins keys and contains a license secret. */
|
|
34
34
|
ln_client *ln_init(const char *config_json);
|
|
35
|
+
/* Product ID and key-id/public-key map from Console > Products > Signing public keys.
|
|
36
|
+
The service URL defaults to https://www.licentivo.com. Call ln_start afterwards. */
|
|
37
|
+
ln_client *ln_init_product(const char *product_id,const char *trusted_keys_json,const char *license_key);
|
|
35
38
|
ln_client *ln_init_file(const char *path);
|
|
36
39
|
/* Shared product config; the application supplies the customer's license key. */
|
|
37
40
|
ln_client *ln_init_file_with_license(const char *path,const char *license_key);
|