a license: an X.509 certificate the product's root signed, its attributes private extensions
More...
|
| template<typename satisfied_t> |
| bool | constrained (const uint8_t *value, size_t size, satisfied_t satisfied) noexcept |
| template<typename satisfied_t> |
| type | evaluate (const uint8_t *bytes, size_t size, const char *subject, const uint8_t *root, size_t roots, int64_t now, crypto::rsa &key, satisfied_t satisfied, bool &forged) noexcept |
| | the type a candidate certificate stands for against the root: none when it is no certificate, names another product (its common name does not start with subject), is not the root's (forged says so: a candidate naming the product whose signature fails), has no type, an unsatisfied constraint (satisfied(name, names, value, values) over the terms), or has expired; a perpetual license never expires, the root's own validity does not matter (it is the anchor by construction)
|
| bool | same (const char *a, size_t as, const char *b, size_t bs) noexcept |
| | the same characters, case insensitive
|
| bool | same_mac (const char *a, size_t as, const char *b, size_t bs) noexcept |
| | the same ethernet address: the hex digits, separators (: -) and case aside
|
| type | typed (const uint8_t *value, size_t size) noexcept |
| | the type a DX_OID_LICENSE_TYPE value names (the name within it, case insensitive), none for any other
|
a license: an X.509 certificate the product's root signed, its attributes private extensions
DX_OID_LICENSE_TYPE (UTF8String demo | beta | perpetual) and DX_OID_LICENSE_CONSTRAINTS (SEQUENCE OF UTF8String in disjunctive normal form: entries "NAME=VALUE[&NAME=VALUE].." are OR'ed, the terms of one entry AND'ed); both are required. Beta and demo licenses expire at notAfter, a perpetual one never. The root given is the only trust anchor, the signature is verified here (x509::certificate::signed_by): no chain, no platform.
template<typename satisfied_t>
| type dx::licensing::evaluate |
( |
const uint8_t * | bytes, |
|
|
size_t | size, |
|
|
const char * | subject, |
|
|
const uint8_t * | root, |
|
|
size_t | roots, |
|
|
int64_t | now, |
|
|
crypto::rsa & | key, |
|
|
satisfied_t | satisfied, |
|
|
bool & | forged ) |
|
noexcept |
the type a candidate certificate stands for against the root: none when it is no certificate, names another product (its common name does not start with subject), is not the root's (forged says so: a candidate naming the product whose signature fails), has no type, an unsatisfied constraint (satisfied(name, names, value, values) over the terms), or has expired; a perpetual license never expires, the root's own validity does not matter (it is the anchor by construction)