|
dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
|
#include <dx_license.h>
Classes | |
| struct | types |
Public Types | |
| enum | { none , demo , beta , perpetual } |
| typedef std::pair<::CFStringRef, std::function< bool(::CFTypeRef)> > | check |
Public Member Functions | |
| ::CFStringRef | cn () const |
| ::CFIndex | count () const noexcept |
| dx_catchall_rethrow () const reference &retain() const noexcept | |
| ::CFArrayRef | emails () const |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| CFTypeID | id () noexcept |
| reference & | initialize (::SecCertificateRef cf_object, bool retain=true) try |
| ::CFDataRef | issuers () const noexcept |
| The issuer is a sequence in the format used by SecItemCopyMatching. The content returned is a DER-encoded X.509 distinguished name. For a display version of the issuer, call SecCertificateCopyValues. The caller must CFRelease the value returned. | |
| license (::CFDictionaryRef dictionary, decltype(checks)&&checks, ::SecCertificateRef root=nullptr) | |
| the first keychain certificate matching the query dictionary that satisfies every check, chains to root (the only trust anchor; keychain trust settings otherwise) and, unless perpetual, has not expired | |
| operator bool () const noexcept | |
| operator::CFDataRef () const noexcept | |
| operator::CFDictionaryRef () const noexcept | |
| operator::CFTypeID () const noexcept | |
| operator::SecCertificateRef () const noexcept | |
| operator::SecKeyRef () const noexcept | |
| Retrieves the public key for a given certificate. | |
| ::CFTypeRef | operator[] (::CFArrayRef array) const noexcept |
| ::CFTypeRef | operator[] (::CFStringRef oid) const try |
| reference & | release () noexcept |
| ::CFDataRef | serial () const noexcept |
| Return the content of a DER-encoded integer (without the tag and length fields) for this certificate's serial number. The caller must CFRelease the value returned. | |
| ::CFDataRef | subjects () const noexcept |
| The subject is a sequence in the format used by SecItemCopyMatching. The content returned is a DER-encoded X.509 distinguished name. For a display version of the subject, call SecCertificateCopyValues. The caller must CFRelease the value returned. | |
| ::CFStringRef | summary () const noexcept |
| ::CFDateRef | valid_after () const noexcept |
| Returns the absolute time at which the given certificate becomes valid, or NULL if this value could not be obtained. The caller must CFRelease the value returned. | |
| ::CFDateRef | valid_before () const noexcept |
| Returns the absolute time at which the given certificate becomes valid, or NULL if this value could not be obtained. The caller must CFRelease the value returned. | |
Static Public Member Functions | |
| template<typename satisfied_t> | |
| static bool | constraints (::CFTypeRef value, satisfied_t satisfied) |
| evaluate a constraint list (DX_OID_LICENSE_CONSTRAINTS) in disjunctive normal form: entries "NAME=VALUE[&NAME=VALUE].." are OR'ed, the NAME=VALUE terms of one entry are AND'ed; satisfied(name, value) decides a single term; an absent or empty list is not satisfied: every license is bound | |
| static void | der (::CFDataRef data, std::vector< std::string > &result) noexcept |
| decode DER: a single UTF8String/PrintableString/IA5String, or a SEQUENCE OF such strings | |
| template<typename visit_t> | |
| static bool | each (::CFTypeRef value, visit_t visit) |
| iterate a certificate value: a "section" array of {label, value} dictionaries, or a single item; stops and returns false as soon as visit(label, item) does | |
| static std::vector< std::string > | strings (::CFTypeRef value) |
| collect the strings of a private extension value (DX_OID_LICENSE_*) as reported by SecCertificateCopyValues(): parsed elements labeled "Data" (e.g. each string of a SEQUENCE OF UTF8String), a DER encoded element labeled "Unparsed Data" (a single string or a SEQUENCE OF strings), or a plain string | |
| static std::string | utf8 (::CFTypeRef value) |
| the first string of a private extension value | |
Public Attributes | |
| std::map< check::first_type, check::second_type > | checks {} |
| enum dx::license:: { ... } | type |
Static Public Attributes | |
| static constexpr const char * | name [] {"", "demo", "beta", "perpetual"} |
Protected Attributes | |
| ::SecCertificateRef | cf_object |
| typedef std::pair<::CFStringRef, std::function<bool(::CFTypeRef)> > dx::license::check |
|
inline |
the first keychain certificate matching the query dictionary that satisfies every check, chains to root (the only trust anchor; keychain trust settings otherwise) and, unless perpetual, has not expired
| checks | OID -> satisfied(value): value as reported by SecCertificateCopyValues(), nullptr when absent |
|
inlineinherited |
|
inlinestatic |
evaluate a constraint list (DX_OID_LICENSE_CONSTRAINTS) in disjunctive normal form: entries "NAME=VALUE[&NAME=VALUE].." are OR'ed, the NAME=VALUE terms of one entry are AND'ed; satisfied(name, value) decides a single term; an absent or empty list is not satisfied: every license is bound
|
inlinenoexceptinherited |
|
inlinestaticnoexcept |
decode DER: a single UTF8String/PrintableString/IA5String, or a SEQUENCE OF such strings
|
inlinenoexceptinherited |
|
inlinestatic |
iterate a certificate value: a "section" array of {label, value} dictionaries, or a single item; stops and returns false as soon as visit(label, item) does
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
The issuer is a sequence in the format used by SecItemCopyMatching. The content returned is a DER-encoded X.509 distinguished name. For a display version of the issuer, call SecCertificateCopyValues. The caller must CFRelease the value returned.
|
inlinenoexcept |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlineexplicitnoexceptinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
Retrieves the public key for a given certificate.
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
Return the content of a DER-encoded integer (without the tag and length fields) for this certificate's serial number. The caller must CFRelease the value returned.
|
inlinestatic |
collect the strings of a private extension value (DX_OID_LICENSE_*) as reported by SecCertificateCopyValues(): parsed elements labeled "Data" (e.g. each string of a SEQUENCE OF UTF8String), a DER encoded element labeled "Unparsed Data" (a single string or a SEQUENCE OF strings), or a plain string
|
inlinenoexceptinherited |
The subject is a sequence in the format used by SecItemCopyMatching. The content returned is a DER-encoded X.509 distinguished name. For a display version of the subject, call SecCertificateCopyValues. The caller must CFRelease the value returned.
|
inlinenoexceptinherited |
|
inlinestatic |
the first string of a private extension value
|
inlinenoexceptinherited |
Returns the absolute time at which the given certificate becomes valid, or NULL if this value could not be obtained. The caller must CFRelease the value returned.
|
inlinenoexceptinherited |
Returns the absolute time at which the given certificate becomes valid, or NULL if this value could not be obtained. The caller must CFRelease the value returned.
|
protectedinherited |
| std::map<check::first_type, check::second_type> dx::license::checks {} |
|
staticconstexpr |
| enum { ... } dx::license::type |
| (c) copyright 2009 dynamic acoustics e.U. | generated on |