sec_key_mgmt_gen_rand_key-Generate a new random key of specified key type.
#include <dce/keymgmt.h>
void sec_key_mgmt_gen_rand_key(
sec_key_mgmt_authn_service authn_service,
void *get_key_fn_arg,
idl_char *principal_name,
void *keytype,
unsigned32 key_vno,
void **keydata,
error_status_t *status);
Input
- authn_service
Identifies the authentication service appropriate for the generated key.
- get_key_fn_arg
Key acquisition routine argument (see<dce/keymgmt.h> ).
- principal_name
Name of a principal. (This argument is for future extensibility, and is currently ignored.)
- keytype
Indicates the key type (see<dce/keymgmt.h> ).
- key_vno
Version number of the new key.
Output
- keydata
The generated key data (see<dce/keymgmt.h> ).
- status
The completion status.
The sec_key_mgmt_gen_rand_key() routine generates a new random key for a specified key type. This routine does not actually change any keys, either locally or remotely, though the generated key is suitable for use with sec_key_mgmt_set_key() and sec_key_mgmt_change_key().The storage for keydata is allocated dynamically; this storage may be freed with the sec_key_mgmt_free_key() function.
As an initialisation requirement (to "seed the random number generator"), the caller of this routine must have previously made a successful protected RPC call (where "successful" is to be interpreted in the sense of the caller's security runtime library; that is, it is allowed to have failed "on the network" or "at the server").
sec_key_mgmt_e_not_implemented, sec_s_no_key_seed, sec_s_no_memory, error_status_ok.
Functions: sec_key_mgmt_change_key(), sec_key_mgmt_set_key().
Contents | Next section | Index |