Previous section.

Systems Management: Software License Use Management (XSLM)
Copyright © 1999 The Open Group

NAME

xslm_get_certificate

SYNOPSIS

#include <libxslm.h>

xslm_uint32 xslm_get_certificate(
    xslm_uuid       server_id,
    xslm_uuid       publisher_id,
    xslm_uint32     product_id,
    xslm_uint32     version_id,
    xslm_uint32     feature_id,
    xslm_uint32     cert_serial_number,
    xslm_uint32     cert_update_seq,
    xslm_uint32     * cert_buffer_length,
    xslm_bin_string * cert_buffer,
    xslm_uint32     * status,
    xslm_uint32     auth_token,
    xslm_bin_string * auth_signature,
    xslm_uuid       * auth_lic_sys_id
);


DESCRIPTION

xslm_get_certificate() asks the license server to return the license certificate that matches the input parameters, including licensing system-maintained status information and settings provided by the administrator.

INPUT PARAMETERS

server_id

Identification of server to which this request is being directed.

publisher_id

The Software Publisher UUID of the certificate being requested. It unequivocally identifies the Publisher. A non-zero value must be provided.

product_id

ID number of the products certificate being requested. A non-zero value must be provided.

version_id

The version of the products certificate being requested. A non-zero value must be provided.

feature_id

The feature number of the products certificate being requested.

cert_serial_number

The instance id of the products certificate being requested. A non-zero value must be provided.

auth_token

A 32-bit arbitrary value created by the application and used as part of the licensing system authentication process. See Process Description for more information.

INPUT/OUTPUT PARAMETERS

cert_buffer_length

As an input parameter, the length of the buffer to receive the results of the call. A value of zero on input indicates a request for the size of the buffer required to contain the entire results of the call. No data is returned in the buffer when a value of zero is passed.

As an output parameter, the length of data returned, or the size of the buffer required to contain the entire result if the input value was zero.

Note that the buffer must be large enough to contain the entire certificate data area if it is not, no data is placed in the buffer and the output value of cert_buffer_length contains the buffer length required to contain the entire result (note that because the certificate state data may change at any time, the actual size needed may be different from the returned value).

OUTPUT PARAMETERS

cert_update_seq

The certificate's update counter. This counter is incremented every time the license certificate values are changed via xslm_set_admin_policy(). To avoid concurrent updates from taking place, the license server will only permit an update via xslm_set_admin_policy() if the cert_update_seq value passed on that call matches the current value of the license certificates counter.

cert_buffer

Buffer in which the results will be returned.

status

Completion status. Detailed error code directly addressable by the caller. This value is set to XSLM_STATUS_OK if no error occurred. For other messages, see ERRORS.

auth_signature

An area large enough to contain a 16-byte digital signature created by the licensing system from the input parameters and auth_token. Used as part of the licensing system authentication process.

auth_lic_sys_id

A unique identifier for the particular type of licensing system handling the current license instance. Used as part of the licensing system authentication process.

RETURN VALUE

XSLM_OK

Query completed successfully

XSLM_COMM_ERR

Communications problem

XSLM_CERT_ERR

Problems with the license and/or certificate

XSLM_RESRC_UNAVL

Resources unavailable

XSLM_PARM_ERR

Bad parameters passed

XLSM_AUTH_ERROR

Requester is not authorized

ERRORS

The function 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.
Note:
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_COMM_ERR XSLM_COMM_UNAVAIL Communications problem
XSLM_CERT_ERR XSLM_NO_CERTIFICATES No certificate matched the get request.
XSLM_RESRC_UNAVL XSLM_NO_RES Local platform specific environmental problems
  XSLM_SERVER_ERROR Unrecoverable environmental error was encountered by the license server
XSLM_PARM_ERR XSLM_BAD_PARM One or more parameters were not correct
  XSLM_BAD_BUFFER_LENGTH The non-zero value for the buffer length was too small for the certificate being retrieved
  XSLM_BAD_SERVER_ID The server_id specified does not correspond to a known server
XSLM_AUTH_ERROR XSLM_NOT_AUTHORIZED The requester is not authorized to perform the requested action

PROGRAMMING NOTE

A license certificate key (publisher_id, product_id, version_id, feature_id, and cert_serial_number) needed to get a certificate can, for example, be obtained by combining a call to xslm_query_next_level_cert_names() with a call to xslm_query_cert_ids().

OUTPUT DATA

A data element structure, CERTIFICATE, followed by a data element structure, CERTIFICATE_RELATED_INFORMATION (see Data Elements for details), unless the buffer is not large enough in which case no data is returned.

SEE ALSO

xslm_query_cert_ids().

Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.

Contents Next section Index