dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::licensing Namespace Reference

a license: an X.509 certificate the product's root signed, its attributes private extensions More...

Enumerations

enum  type { none , demo , beta , perpetual }

Functions

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

Detailed Description

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.

Enumeration Type Documentation

◆ type

Enumerator
none 
demo 
beta 
perpetual 

Function Documentation

◆ constrained()

template<typename satisfied_t>
bool dx::licensing::constrained ( const uint8_t * value,
size_t size,
satisfied_t satisfied )
noexcept

a DX_OID_LICENSE_CONSTRAINTS value is satisfied when one entry's terms all are: satisfied(name, name length, value, value length) decides a term; an absent or empty list is not satisfied - every license is bound

Here is the call graph for this function:
Here is the caller graph for this function:

◆ evaluate()

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)

Here is the call graph for this function:
Here is the caller graph for this function:

◆ same()

bool dx::licensing::same ( const char * a,
size_t as,
const char * b,
size_t bs )
inlinenoexcept

the same characters, case insensitive

Here is the caller graph for this function:

◆ same_mac()

bool dx::licensing::same_mac ( const char * a,
size_t as,
const char * b,
size_t bs )
inlinenoexcept

the same ethernet address: the hex digits, separators (: -) and case aside

Here is the caller graph for this function:

◆ typed()

type dx::licensing::typed ( const uint8_t * value,
size_t size )
inlinenoexcept

the type a DX_OID_LICENSE_TYPE value names (the name within it, case insensitive), none for any other

Here is the call graph for this function:
Here is the caller graph for this function:

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.