Skip to main content

Module apple_schema

Module apple_schema 

Source
Expand description

Apple’s keychain schema, as data.

GENERATED by xtask/extract-schema.py from a keychain written by security create-keychain. Do not edit by hand; re-run the script against a newer macOS if its schema ever changes.

kc create replays these rows and index blobs so that a keychain it writes carries the schema macOS expects. tests/keychain_container.rs and tests/keychain_interop.rs check the result against a keychain security created.

Structs§

AttributeRow
One row of CSSM_DL_DB_SCHEMA_ATTRIBUTES.
IndexRow
One row of CSSM_DL_DB_SCHEMA_INDEXES.
OnDemandRelation
A relation macOS does not put in a new keychain, but adds to the schema the first time a record of that type is stored. security import writes exactly these rows, in this order, when it stores the first certificate.
RelationRow
One row of CSSM_DL_DB_SCHEMA_INFO.
TableTemplate
A table as macOS first writes it: its relation, the free-list field it sets while the table is empty, and the index blob that declares its indexes.

Constants§

ATTRIBUTES
INDEXES
ON_DEMAND_RELATIONS
Relations this code knows how to add to a keychain’s schema.
RECORD_VERSION
Record header version field that macOS writes for every record.
RELATIONS
Relations, in the order macOS writes them.
TABLES
X509_CERTIFICATE_ATTRIBUTES
X509_CERTIFICATE_INDEXES
X509_CERTIFICATE_RELATION
CSSM_DL_DB_RECORD_X509_CERTIFICATE, added on the first certificate.