Data Types
The following data types are used in sec_pk calls:
sec_pk_domain_t A UUID of type uuid_t associated with the application domain in which a public or private key is used.
sec_pk_usage_flags_t A 32-bit set of key-usage flags that describe the use of a key or key pair. The flags are:
sec_pk_usage_digitalSignature
sec_pk_usage_nonRepudiation
sec_pk_usage_keyEncipherment
sec_pk_usage_keyAgreement
sec_pk_usage_keyCertSign
sec_pk_usage_offLineCRLSign
These flags are described in the X.509 (1993E) AM 1 standard.
sec_pk_data_t A structure that points to and X.509 or X.511 ASN.1 DER-encoded value. The sec_pk_data_t data type acts as a base for the following data types, which are
aliases for sec_pk_data_t:
sec_pk_gen_data_t
sec_pk_pubkey_t
sec_pk_pvtkey_t
sec_pk_signed_t
sec_pk_encrypted_t
sec_pk_algorithm_id_t
The alias data types indicate the specific information pointed to by sec_pk_data_t. Instead of using sec_pk_data_t directly, use the alias data types.
The sec_pk_data_t data type consists of the following elements:
len The size of data.
data A pointer to a character string.
sec_pk_gen_data_t A structure that acts as an alias to a sec_pk_data_t that contains plain ASCII data.
sec_pk_pubkey_t A structure that acts as an alias to a sec_pk_data_t that contains an X.509 ASN.1 DER-encoded value of type SubjectPublicKeyInfo. This data
type assumes that the public key infrastructure provides functions for generating a public key in this format.
sec_pk_pvtkey_t A structure that contains an X.509 ASN.1 DER-encoded private key value. The key format depends on the public key infrastructure. This
data type assumes that the public key infrastructure provides functions for generating a private key in this format.
sec_pk_signed_t A structure that contains an X.509 ASN.1 DER-encoded value of type SIGNED. This data type assumes that the public key infrastructure provides functions
for generating a public key in this format.
sec_pk_encrypted_t A structure that contains an X.509 ASN.1 DER-encoded value of type ENCRYPTED. This data type assumes that the public key infrastructure provides
functions for generating a public key in this format.
sec_pk_algorithm_id_t A structure that contains an X.509 ASN.1 DER-encoded value of type AlgorithmIdentifier. This data type assumes that the public key infrastructure
provides functions for generating a public key in this format.
|