Collapse All
Parallels Desktop® 10 for Mac — C API Reference Guide
PrlApi_CreateCredentials Function
System Functions See Also

Create credentials (certificate signing request / private key) for user.

Syntax
PRL_HANDLE PrlApi_CreateCredentials(
    PRL_CONST_STR userId, 
    PRL_CONST_STR certRole, 
    PRL_EVENT_HANDLER_PTR handler, 
    PRL_VOID_PTR userData, 
    PRL_UINT32 flags
);
File

PrlApiSecurity.h

Parameters

userId
User id for witch certificate will be created (a UTF-8 encoded, null-terminated string).
certRole
Role for certificate (a UTF-8 encoded, null-terminated string).
handler
Optional. A pointer to a user callback function (event handler) that will be called when operation become complete.
userData
Optional. A pointer to a user data that will be passed to the optional callback function. flags Optional. Reserved for future needs.
Returns

A handle of type PHT_JOB containing the results of this asynchronous operation or PRL_INVALID_HANDLE if there's not enough memory to instantiate the job object.

To get the results from the PHT_JOB object:

  1. Use the PrlJob_GetResult function to obtain a handle to the PHT_RESULT object.
  2. Use the PrlResult_GetParamByIndexAsString function to obtain a string containing user signing certificate request from first param.

3 Use the PrlResult_GetParamByIndexAsString function to obtain a string containing user private key from second param.

See Also

PrlSrv_SignCertificate

Links
Copyright © 1999-2015 Parallels IP Holdings GmbH and its affiliates. All rights reserved.
What do you think about this topic? Send feedback!