PreviousNext

sec_psm_put_pub_key(3sec)

Stores a public key pair. This routine is not available in the DCE binary code. It is provided in DCE source for use by vendors.

Synopsis

#include <dce/sec_pk_base.h>

error_status_t sec_psm_put_pub_key(

sec_psm_handle_t psm_handle,

char *pwd,

sec_pk_usage_flags_t key_usage,

sec_pk_pvtkey_t *pvtkey,

sec_pk_pvtkey_t *pubkey,

error_status_t *status);

Parameters

Input

psm_handle
A pointer to an opaque handle to the personal security mechanism in which to store the key. Use sec_psm_open( ) to obtain the handle.

pwd
A pointer to the password for the principal associated with the personal security mechanism.

key_usage
A sec_pk_usage_flags_t that contains the usage flag for the public key for the key pair specified by pubkey.

pvtkey
A pointer to the ASN.1 DER-encoded private key.

pubkey
A pointer to the ASN.1 DER-encoded public key.

Output

status
A pointer to the completion status. On successful completion, the routine returns error_status_ok. Otherwise, it returns an error.

Description

The sec_psm_put_pub_key( ) routine stores a public key pair. In the reference implementation, the public key is stored in the registry and the private key in a personal security mechanism. Key versions are not currently supported; only a single version of a key with a given key usage is maintained.

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_no_more_memory

sec_pvtkey_internal_error

sec_pvtkey_same_domain_and_usage_key_already_exists

Related Information

Functions:
sec_psm_gen_pub_key(3sec)
sec_psm_update_pub_key(3sec)