#include <libxslm.h> xslm_uint32 xslm_basic_request_license( xslm_uuid publisher_id, xslm_uint32 product_id, xslm_uint32 version_id, xslm_uint32 feature_id, xslm_uint32 cert_auth_type xslm_uint32 publisher_key_length, xslm_bin_string * publisher_key, xslm_handle * lic_handle, xslm_uint32 * status );
xslm_basic_request_license()requests a license, using the default number of license units (as specified within a license certificate), for a publisher_id product identified by product_id, version_id, and additionally by the feature_id parameter.
The software publisher identification.
The identification of the product whose license is requested.
The identification of the version of the product whose license is requested.
The product and version's associated feature number; if not used, must be set to 0.
Certificate authorization request type. If this value is XSLM_CERT_AUTH_NONE, the licensing system is not required to perform any specific action to authenticate the license certificate issuer before granting a license. If this value is XSLM_CERT_AUTH_PUB_KEY, the licensing system must use the value provided via the publisher_key parameter to authenticate the license certificate issuer. If this value is XSLM_CERT_AUTH_CA, then the licensing system must perform the authentication using an authentication certificate associated with the license certificate, as described in
License Certificate Authenticity.
Length of publisher_key in bytes. If this value is 0, no certificate authentication will take place, and the certificate is assumed to have been created by the application publisher.
Publisher-specified public key. Used to confirm the authenticity of a license certificate. The value passed must match the value of the publisher's public key contained in the license certificate.
A reference returned by this call. It is used to maintain information about the currently granted license.
Completion status. Detailed error code directly processable by the caller. This value is set to XSLM_STATUS_OK if no error occurred. For other messages, see ERRORS.
Problem with license and/or certificate
Local resources unavailable
The function's return value gives an overall indication of the success or failure of the call. In addition, the status parameter will be set to one of the following values, to further help point to the reason for a failed request.
- In the future, additional values may be defined for the status variable. An application must not rely upon these being the only possible values.
Return Value Status Value Explanation XSLM_OK XSLM_STATUS_OK No errors occurred XSLM_IN_SOFT_STOP License granted due to soft-stop policy XSLM_IN_RECOVERY_MODE License granted due to disaster-recovery mode XSLM_COMM_ERR XSLM_LIC_SYS_NOT_RESP The licensing system does not respond XSLM_NO_SVRS_FOUND No license servers responding XSLM_CERT_ERR XSLM_NO_CERTIFICATES No certificate found for the specified publisher_id, product_id, version_id, and feature_id XSLM_CERT_NOT_STARTED Certificate validity period not yet begun XSLM_NOT_ENOUGH_CAPACITY Capacity requested exceeds that available XSLM_NO_LICS The number of available license units is currently less than the number needed to satisfy the request XSLM_NO_MATCHING_NODE No certificate found for current node XSLM_NO_MATCHING_USERID No certificate found for current userID XSLM_INVALID_PUBLIC_KEY Public keys do not match XSLM_RESRC_UNAVL XSLM_NO_RES Platform dependent. XSLM_PARM_ERR XSLM_BAD_PARM One or more parameters were not correct