Skip to main content

Module records

Module records 

Source
Expand description

Typed records: the attribute sets stored for an item and for its key.

Attribute values reach the file as a positional list ordered by the relation’s schema, which is easy to get subtly wrong and impossible to read. These structs name every field, carry the values macOS writes, and lower themselves into the relation’s order at the end.

The values are not invented. securityd queries a key record for attributes such as KeyCreator and Alias, and returns errSecNoSuchAttr when one is absent — so a key record has to carry the whole set, empty values included. tests/keychain_records.rs checks each field against a key record written by macOS.

Structs§

CertificateRecord
The attribute set of a certificate record.
ItemKeyRecord
The attribute set of the symmetric key that protects one item.
PasswordRecord
The attribute set of a password item.
PrivateKeyRecord
The attribute set of a private-key record.

Constants§

CERT_ENCODING_DER
CertEncoding for DER (CSSM_CERT_ENCODING_DER).
CERT_TYPE_X509_V3
CertType for an X.509 v3 certificate (CSSM_CERT_X_509v3).
KEY_CLASS_PRIVATE
KeyClass as stored in a private-key record: the relation id, matching the way a symmetric-key record stores 17.
KEY_CLASS_SYMMETRIC
KeyClass as stored in a symmetric-key record: the relation id.
KEY_TYPE_3DES_3KEY
CSSM_ALGID_3DES_3KEY_EDE, as stored in KeyType.
KEY_TYPE_RSA
CSSM_ALGID_RSA, as stored in a private key’s KeyType.