Overview / Security & product

bundle

Licensing of Ethereal itself. One call per application unlocks the library, and another returns the license data.

Always compiled: part of the core build.Include #include <ethereal/cpp/bundle/bundle_inc.hpp>C layer

bundle_inc.hpp

#include <ethereal/cpp/bundle/bundle_inc.hpp>

bundle.hpp

#include <ethereal/cpp/bundle/bundle.hpp>
enum

EBundleTypes

Ethereal::Bundle#
C++
enum EBundleTypes
{
    //------------------------------------------------------------------------------
    //    Bundle_1 : 1 developer
    //------------------------------------------------------------------------------


    /// @brief  Bundle 1  > 1 Developer & 1 year of support (Standard).
    ///
    eBundle0101_Standard    = 0,


    /// @brief  Bundle 1  > 1 Developer & 1 year of support (Full w/UI).
    ///
    eBundle0101_Full        = 1u << 0,


    /// @brief  Bundle 1  > 1 Developer & 2 years of support (Standard).
    ///
    eBundle0102_Standard    = 1u << 1,


    /// @brief  Bundle 1  > 1 Developer & 2 years of support (Full w/UI).
    ///
    eBundle0102_Full        = 1u << 2,


    //------------------------------------------------------------------------------
    //    Bundle_2 : 2-4 developers
    //------------------------------------------------------------------------------


    /// @brief  Bundle 2  > 4 Developers & 1 year of support (Standard).
    ///
    eBundle0401_Standard    = 1u << 3,


    /// @brief    Bundle 2  > 4 Developers & 1 year of support (Full w/UI).
    ///
    eBundle0401_Full        = 1u << 4,


    /// @brief    Bundle 2  > 4 Developers & 2 year of support (Standard).
    ///
    eBundle0402_Standard    = 1u << 5,


    /// @brief    Bundle 2  > 4 Developers & 2 years of support (Full w/UI).
    ///
    eBundle0402_Full        = 1u << 6,


    //------------------------------------------------------------------------------
    //    Bundle_3 : 5+ developers
    //------------------------------------------------------------------------------


    /// @brief    Bundle 3  > 5+ Developers & 1 year of support (Standard).
    ///
    eBundle0801_Standard    = 1u << 7,


    /// @brief    Bundle 3  > 5+ Developers & 1 year of support (Full w/UI).
    ///
    eBundle0801_Full        = 1u << 8,


    /// @brief    Bundle 3  > 5+ Developers & 2 years of support (Standard).
    ///
    eBundle0802_Standard    = 1u << 9,


    /// @brief    Bundle 3  > 5+ Developers & 2 years of support (Full w/UI).
    ///
    eBundle0802_Full        = 1u << 10,


    //------------------------------------------------------------------------------
    //    Bundle : Engine
    //------------------------------------------------------------------------------


    /// @brief  Premium Bundle > Ethereal in Engine mode.
    ///         Includes features for game development.
    ///
    ///         *** Coming soon.
    ///
    eBundleEngine
};
enum

EBundleUnlockStatus

Ethereal::Bundle#
C++
enum EBundleUnlockStatus
{
    /// @brief  Success.
    ///
    eOk = 0,


    /// @brief  Generic error.
    ///
    eErrGeneric,


    /// @brief  License format is invalid.
    ///
    eErrInvalidFormat,


    /// @brief  Checksum calculation is invalid.
    ///
    ///         *** Superseded, kept so that existing code that names it still compiles.
    ///             The v1 format authenticated licenses with a keyed checksum whose key
    ///             shipped inside the client library, so anyone holding the library
    ///             could mint licenses. Signature failures now report
    ///             @ref eErrInvalidSignature.
    ///
    eErrInvalidChecksum,


    /// @brief  Product UID is not valid for the entered license.
    ///
    eErrInvalidProduct,


    /// @brief  The license has expired.
    ///
    eErrExpired,


    /// @brief  The current version is not compatible with the license version.
    ///
    ///         *** Superseded, kept so that existing code that names it still compiles.
    ///             Since format v3 a license carries the end of its support, and a
    ///             build released after it reports @ref eErrSupportEnded.
    ///
    eErrBuildTooNew,


    /// @brief  The signature does not belong to this product's issuer.
    ///
    ///         *** This is the authenticity check. The other statuses are policy.
    ///             A license that fails here was not issued by us: it was forged,
    ///             corrupted in transit, or signed with a different key pair than
    ///             the one this build carries.
    ///
    eErrInvalidSignature,


    /// @brief  The license was produced by a newer format than this build understands.
    ///
    ///         *** The format version is the first byte of the payload, and it is
    ///             checked before anything else is interpreted. A build that guessed
    ///             a layout it does not know could reject valid licenses or accept
    ///             malformed ones.
    ///
    eErrUnsupportedFormat,


    /// @brief  This build carries no issuer public key, so it cannot validate anything.
    ///
    ///         *** The library was built without a real key configured. It is a
    ///             build mistake, not a customer mistake, and it is reported instead
    ///             of silently unlocking.
    ///
    eErrNoPublicKey,


    /// @brief  The serial is in the blocklist compiled into this build.
    ///
    ///         *** A leaked license. Every build released after the block refuses
    ///             it, whatever its support period. Builds released before keep
    ///             accepting it: that is the limit of an offline check.
    ///
    eErrRevoked,


    /// @brief  This build was released after the support of the license ended.
    ///
    ///         *** The license is perpetual and still works with every build
    ///             released up to the end of its support. Use one of those, or
    ///             renew the support.
    ///
    eErrSupportEnded
};
enum

EBundleEdition

Ethereal::Bundle#
C++
enum EBundleEdition
{
    /// @brief  Every module.
    ///
    eEditionStandard = 0,


    /// @brief  Every module and the UI components.
    ///
    eEditionFull = 1
};
struct

SBundleInfo

Ethereal::Bundle#
C++
struct SBundleInfo
{
    /// @brief  Legacy: the type of format v2. Filled from the edition, as
    ///         eBundle0101_Standard or eBundle0101_Full. Read @ref eEdition.
    EBundleTypes    eType;

    /// @brief  Product identifier the license was issued for.
    ETL_UINT32        uProductId;

    /// @brief  Legacy: the minimum build of format v2. Always zero. Read
    ///         @ref uSupportEndDays.
    ETL_UINT32        uBuildMin;

    /// @brief  Legacy: same as @ref uValidUntilDays.
    ETL_UINT32        uExpirationDays;

    /// @brief  Issue date, in days since 1970-01-01.
    ETL_UINT32        uIssuedDays;

    /// @brief  Legacy: the low 32 bits of @ref uSerial64.
    ETL_UINT32        uSerial;

    /// @brief  Tag binding the license to a licensee, or zero when unbound.
    ///
    ///         *** First eight bytes of the SHA-256 of the licensee name, as typed at
    ///             issue time. It is a tag, not a secret: it does not hide the name and
    ///             does not enforce anything. It lets a key found in the wild be traced
    ///             back to the licensee it was sold to.
    ///
    ETL_UINT64        uLicenseeTag;

    /// @brief  Edition: Standard, or Full with the UI components.
    EBundleEdition    eEdition;

    /// @brief  True for a provisional license, issued at payment and replaced by
    ///         the definitive one when the refund window closes.
    bool            bProvisional;

    /// @brief  Last valid day, in days since 1970-01-01. Zero means no validity:
    ///         the license never expires.
    ETL_UINT32        uValidUntilDays;

    /// @brief  End of support, in days since 1970-01-01: the last release day this
    ///         license covers. Builds released up to it work forever.
    ETL_UINT32        uSupportEndDays;

    /// @brief  Release day of this build, in days since 1970-01-01.
    ETL_UINT32        uReleaseDays;

    /// @brief  Serial number of this license. Unique per issuance.
    ///
    ///         *** Identifies a leaked key. Two customers reporting the same serial
    ///             means the same key in two places.
    ///
    ETL_UINT64        uSerial64;
};

Read-only view of the license currently unlocked.

Filled by QueryBundle after a successful UnlockBundle. Lets the host application adapt to what was bought (whether the UI components are included, when support lapses) without parsing the serial itself.

The first six fields are the ones of format v2 and are kept so that existing code still compiles. Read the fields after them.

enum

ELicenseState

Ethereal::Bundle#
C++
enum ELicenseState
{
    /// @brief  A license was accepted. Every module runs.
    ///
    eStateLicensed = 0,


    /// @brief  No license was passed, and the evaluation of this machine is still
    ///         running. Every module runs, Standard edition.
    ///
    eStateEvaluation,


    /// @brief  No license was passed, and the evaluation of this machine has ended.
    ///         The modules refuse with their 'eNotLicensed' value.
    ///
    eStateEvaluationEnded,


    /// @brief  A license was passed and refused. The modules refuse with their
    ///         'eNotLicensed' value, even while the evaluation would still run:
    ///         an application that passes a license meant to run licensed.
    ///
    eStateLicenseRefused
};
struct

SLicenseState

Ethereal::Bundle#
C++
struct SLicenseState
{
    /// @brief  The state.
    ELicenseState        eState;

    /// @brief  Days left in the evaluation, counting today. Zero outside it.
    ETL_UINT32            uEvaluationDaysLeft;

    /// @brief  Why the last license passed was refused. @ref eOk when none was.
    EBundleUnlockStatus    eLastRefusal;
};

Why the library runs, or why it refuses.

function

QueryLicenseState

Ethereal::Bundle#
void QueryLicenseState( SLicenseState & StateOut ) noexcept;

Reads the license state.

Never fails. Outside a license, it resolves the evaluation of this machine the first time it is needed, which reads and writes its records once per process.

StateOut
Receives the state.
function

QueryBundle

Ethereal::Bundle#
bool QueryBundle( SBundleInfo & InfoOut ) noexcept;

Reads back the license currently unlocked.

InfoOut
Receives the active license. Untouched when the call fails.
True when a license is unlocked and InfoOut was filled.
function

UnlockBundle

Ethereal::Bundle#
EBundleUnlockStatus UnlockBundle( const char * BundleSerial ) noexcept;

Unlocks the Ethereal Bundle/Components. Must be executed only once per application.

*** Call this function before interacting with any other Ethereal modules or functions.

*** This is the only way a license reaches the library. It is never read from a file or from the environment: the application passes it here. An application that ships without this call runs on the evaluation of each machine, and stops working when it ends.

Licenses are signed with Ed25519. This library carries only the issuer's public key, which validates a license and cannot produce one. There is no secret in here that a customer could extract to mint keys.

*** The serial is long.

A signature is 64 bytes and cannot be shortened, so the key has 160 characters instead of the 24 of the old format. A key short enough to read aloud would be short enough to forge. Paste it or load it from a file instead of typing it.

Dashes, spaces and letter case are ignored on input, and the letters I, L and O are accepted in place of 1, 1 and 0, so a key read out loud over a phone still works.

BundleSerial
Bundle serial key used for activation.
Unlock result status code.