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§
- Certificate
Record - The attribute set of a certificate record.
- Item
KeyRecord - The attribute set of the symmetric key that protects one item.
- Password
Record - The attribute set of a password item.
- Private
KeyRecord - The attribute set of a private-key record.
Constants§
- CERT_
ENCODING_ DER CertEncodingfor DER (CSSM_CERT_ENCODING_DER).- CERT_
TYPE_ X509_ V3 CertTypefor an X.509 v3 certificate (CSSM_CERT_X_509v3).- KEY_
CLASS_ PRIVATE KeyClassas stored in a private-key record: the relation id, matching the way a symmetric-key record stores17.- KEY_
CLASS_ SYMMETRIC KeyClassas stored in a symmetric-key record: the relation id.- KEY_
TYPE_ 3DES_ 3KEY CSSM_ALGID_3DES_3KEY_EDE, as stored inKeyType.- KEY_
TYPE_ RSA CSSM_ALGID_RSA, as stored in a private key’sKeyType.