Expand description
Relations and attributes — the schema a keychain carries about itself.
A keychain is a CSSM database: four schema tables describe every other table’s attributes, so a reader does not have to hard-code the layout of password or key records. Only the four schema relations themselves need built-in definitions, to bootstrap.
Two things matter and are not obvious:
- A record’s attribute-offset array follows the order attributes are defined in the schema table, not attribute-id order. Sorting by id silently misreads every password record.
- Password relations name most attributes by four-char code in the
AttributeID(acct,svce,srvr), leavingAttributeNameempty;PrintNameandAliasare the exceptions, named by string.
Structs§
- Attribute
Def - One attribute of a relation.
- Record
Type - A CSSM relation identifier (
CSSM_DB_RECORDTYPE). - Relation
- Schema
- The schema of one keychain.
Enums§
- Attribute
Format CSSM_DB_ATTRIBUTE_FORMAT: how an attribute value is encoded.
Functions§
- four_
char_ code - Four-char code as a big-endian integer, for building attribute ids.