sec_psm_update_pub_key(3sec) — Subroutines
NAME
sec_psm_update_pub_key — Update a public key in a personal security mechanism. . This routine is not available in the DCE binary code. It is provided in DCE source for use by vendors.
Synopsis
error_status_t sec_psm_update_pub_key(
sec_psm_handle_t psm_handle,
char ∗oldpwd,
char ∗newpwd,
sec_pk_usage_flags_t key_usage,
sec_pk_pubkey_t ∗pubkey,
sec_pk_pvtkey_t ∗pvtkey,
error_status_t ∗status);
Parameters
Input
psm_handle
A pointer to an opaque handle to a personal security mechanism context data. Use sec_psm_open() to obtain the handle.
oldpwdA pointer to the principal’s current password.
newpwdA pointer to the principal’s new password.
key_usageA sec_pk_usage_flags_t that contains the usage flag for the public key in the key pair.
pubkeyA pointer to the ASN.1 DER-encoded public key.
pvtkeyA pointer to the ASN.1 DER-encoded private key.
Output
statusA pointer to the completion status. On successful completion, the routine returns error_status_ok. Otherwise, it returns an error.
Description
The sec_psm_update_pub_key() routine updates a principal’s public key pair or password. The current public key password must be supplied for authentication. Currently, only a single version of a key with a given key usage is maintained. Therefore, any old key versions are overwritten by this routine. Note that there is no routine supplied to delete keys; deletion is assumed to be an internal function initiated by the personal security mechanism.
Files
/usr/include/dce/sec_pk_base.idl
The idl file from which dce/sec_pk_base.h was derived.
Errors
The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.
error_status_ok
sec_psm_not_init
sec_psm_invalid_handle
sec_pk_e_domain_unsupported
sec_pk_e_usage_unsupported
sec_rgy_object_not_found
sec_rgy_not_authorized
sec_attr_unauthorized
sec_pvtkey_invalid_handle
sec_pvtkey_mechanism_not_init
sec_pvtkey_private_key_is_not_supplied
sec_pvtkey_new_password_required
sec_pvtkey_no_more_memory
Related Information
Functions: sec_psm_gen_pub_key(3sec), sec_psm_put_pub_key(3sec).