//! 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.
/// One row of `CSSM_DL_DB_SCHEMA_INFO`.
pub struct RelationRow {
pub relation_id: u32,
pub name: Option<&'static [u8]>,
}
/// One row of `CSSM_DL_DB_SCHEMA_ATTRIBUTES`.
pub struct AttributeRow {
pub relation_id: u32,
pub attribute_id: u32,
pub name_format: u32,
pub name: Option<&'static [u8]>,
pub name_id: Option<&'static [u8]>,
pub format: u32,
}
/// One row of `CSSM_DL_DB_SCHEMA_INDEXES`.
pub struct IndexRow {
pub relation_id: u32,
pub index_id: u32,
pub attribute_id: u32,
pub index_type: u32,
pub indexed_data_location: u32,
}
/// 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.
pub struct TableTemplate {
pub relation_id: u32,
pub free_list: u32,
pub index_data: &'static [u8],
}
/// Record header version field that macOS writes for every record.
pub const RECORD_VERSION: u32 = 1;
/// Relations, in the order macOS writes them.
pub const RELATIONS: [RelationRow; 11] = [
RelationRow {
relation_id: 0x00000000,
name: Some(b"CSSM_DL_DB_SCHEMA_INFO"),
},
RelationRow {
relation_id: 0x00000002,
name: Some(b"CSSM_DL_DB_SCHEMA_ATTRIBUTES"),
},
RelationRow {
relation_id: 0x00000001,
name: Some(b"CSSM_DL_DB_SCHEMA_INDEXES"),
},
RelationRow {
relation_id: 0x00000003,
name: Some(b"CSSM_DL_DB_SCHEMA_PARSING_MODULE"),
},
RelationRow {
relation_id: 0x80000000,
name: Some(b""),
},
RelationRow {
relation_id: 0x80000002,
name: Some(b""),
},
RelationRow {
relation_id: 0x80000001,
name: Some(b""),
},
RelationRow {
relation_id: 0x80008000,
name: Some(b"DBBlob"),
},
RelationRow {
relation_id: 0x0000000f,
name: Some(b"CSSM_DL_DB_RECORD_PUBLIC_KEY"),
},
RelationRow {
relation_id: 0x00000010,
name: Some(b"CSSM_DL_DB_RECORD_PRIVATE_KEY"),
},
RelationRow {
relation_id: 0x00000011,
name: Some(b"CSSM_DL_DB_RECORD_SYMMETRIC_KEY"),
},
];
pub const ATTRIBUTES: [AttributeRow; 155] = [
AttributeRow {
relation_id: 0x00000000,
attribute_id: 0x00000000,
name_format: 0,
name: Some(b"RelationID"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000000,
attribute_id: 0x00000001,
name_format: 0,
name: Some(b"RelationName"),
name_id: None,
format: 0,
},
AttributeRow {
relation_id: 0x00000002,
attribute_id: 0x00000000,
name_format: 0,
name: Some(b"RelationID"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000002,
attribute_id: 0x00000001,
name_format: 0,
name: Some(b"AttributeID"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000002,
attribute_id: 0x00000002,
name_format: 0,
name: Some(b"AttributeNameFormat"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000002,
attribute_id: 0x00000003,
name_format: 0,
name: Some(b"AttributeName"),
name_id: None,
format: 0,
},
AttributeRow {
relation_id: 0x00000002,
attribute_id: 0x00000004,
name_format: 0,
name: Some(b"AttributeNameID"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x00000002,
attribute_id: 0x00000005,
name_format: 0,
name: Some(b"AttributeFormat"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000001,
attribute_id: 0x00000000,
name_format: 0,
name: Some(b"RelationID"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000001,
attribute_id: 0x00000001,
name_format: 0,
name: Some(b"IndexID"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000001,
attribute_id: 0x00000002,
name_format: 0,
name: Some(b"AttributeID"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000001,
attribute_id: 0x00000003,
name_format: 0,
name: Some(b"IndexType"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000001,
attribute_id: 0x00000004,
name_format: 0,
name: Some(b"IndexedDataLocation"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000003,
attribute_id: 0x00000000,
name_format: 0,
name: Some(b"RelationID"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000003,
attribute_id: 0x00000001,
name_format: 0,
name: Some(b"AttributeID"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000003,
attribute_id: 0x00000002,
name_format: 0,
name: Some(b"ModuleID"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x00000003,
attribute_id: 0x00000003,
name_format: 0,
name: Some(b"AddinVersion"),
name_id: None,
format: 0,
},
AttributeRow {
relation_id: 0x00000003,
attribute_id: 0x00000004,
name_format: 0,
name: Some(b"SSID"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000003,
attribute_id: 0x00000005,
name_format: 0,
name: Some(b"SubserviceType"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x80000000,
attribute_id: 0x63646174,
name_format: 2,
name: None,
name_id: None,
format: 5,
},
AttributeRow {
relation_id: 0x80000000,
attribute_id: 0x6d646174,
name_format: 2,
name: None,
name_id: None,
format: 5,
},
AttributeRow {
relation_id: 0x80000000,
attribute_id: 0x64657363,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000000,
attribute_id: 0x69636d74,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000000,
attribute_id: 0x63727472,
name_format: 2,
name: None,
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x80000000,
attribute_id: 0x74797065,
name_format: 2,
name: None,
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x80000000,
attribute_id: 0x73637270,
name_format: 2,
name: None,
name_id: None,
format: 1,
},
AttributeRow {
relation_id: 0x80000000,
attribute_id: 0x00000007,
name_format: 0,
name: Some(b"PrintName"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000000,
attribute_id: 0x00000008,
name_format: 0,
name: Some(b"Alias"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000000,
attribute_id: 0x696e7669,
name_format: 2,
name: None,
name_id: None,
format: 1,
},
AttributeRow {
relation_id: 0x80000000,
attribute_id: 0x6e656761,
name_format: 2,
name: None,
name_id: None,
format: 1,
},
AttributeRow {
relation_id: 0x80000000,
attribute_id: 0x63757369,
name_format: 2,
name: None,
name_id: None,
format: 1,
},
AttributeRow {
relation_id: 0x80000000,
attribute_id: 0x70726f74,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000000,
attribute_id: 0x61636374,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000000,
attribute_id: 0x73766365,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000000,
attribute_id: 0x67656e61,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x63646174,
name_format: 2,
name: None,
name_id: None,
format: 5,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x6d646174,
name_format: 2,
name: None,
name_id: None,
format: 5,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x64657363,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x69636d74,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x63727472,
name_format: 2,
name: None,
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x74797065,
name_format: 2,
name: None,
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x73637270,
name_format: 2,
name: None,
name_id: None,
format: 1,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x00000007,
name_format: 0,
name: Some(b"PrintName"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x00000008,
name_format: 0,
name: Some(b"Alias"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x696e7669,
name_format: 2,
name: None,
name_id: None,
format: 1,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x6e656761,
name_format: 2,
name: None,
name_id: None,
format: 1,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x63757369,
name_format: 2,
name: None,
name_id: None,
format: 1,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x70726f74,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x61636374,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x766c6d65,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x73727672,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x7074636c,
name_format: 2,
name: None,
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x61646472,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000002,
attribute_id: 0x73736967,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x63646174,
name_format: 2,
name: None,
name_id: None,
format: 5,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x6d646174,
name_format: 2,
name: None,
name_id: None,
format: 5,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x64657363,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x69636d74,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x63727472,
name_format: 2,
name: None,
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x74797065,
name_format: 2,
name: None,
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x73637270,
name_format: 2,
name: None,
name_id: None,
format: 1,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x00000007,
name_format: 0,
name: Some(b"PrintName"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x00000008,
name_format: 0,
name: Some(b"Alias"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x696e7669,
name_format: 2,
name: None,
name_id: None,
format: 1,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x6e656761,
name_format: 2,
name: None,
name_id: None,
format: 1,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x63757369,
name_format: 2,
name: None,
name_id: None,
format: 1,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x70726f74,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x61636374,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x73646d6e,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x73727672,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x7074636c,
name_format: 2,
name: None,
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x61747970,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x706f7274,
name_format: 2,
name: None,
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x80000001,
attribute_id: 0x70617468,
name_format: 2,
name: None,
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000000,
name_format: 2,
name: Some(b"KeyClass"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000001,
name_format: 2,
name: Some(b"PrintName"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000002,
name_format: 2,
name: Some(b"Alias"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000003,
name_format: 2,
name: Some(b"Permanent"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000004,
name_format: 2,
name: Some(b"Private"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000005,
name_format: 2,
name: Some(b"Modifiable"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000006,
name_format: 2,
name: Some(b"Label"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000007,
name_format: 2,
name: Some(b"ApplicationTag"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000008,
name_format: 2,
name: Some(b"KeyCreator"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000009,
name_format: 2,
name: Some(b"KeyType"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x0000000a,
name_format: 2,
name: Some(b"KeySizeInBits"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x0000000b,
name_format: 2,
name: Some(b"EffectiveKeySize"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x0000000c,
name_format: 2,
name: Some(b"StartDate"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x0000000d,
name_format: 2,
name: Some(b"EndDate"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x0000000e,
name_format: 2,
name: Some(b"Sensitive"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x0000000f,
name_format: 2,
name: Some(b"AlwaysSensitive"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000010,
name_format: 2,
name: Some(b"Extractable"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000011,
name_format: 2,
name: Some(b"NeverExtractable"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000012,
name_format: 2,
name: Some(b"Encrypt"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000013,
name_format: 2,
name: Some(b"Decrypt"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000014,
name_format: 2,
name: Some(b"Derive"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000015,
name_format: 2,
name: Some(b"Sign"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000016,
name_format: 2,
name: Some(b"Verify"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000017,
name_format: 2,
name: Some(b"SignRecover"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000018,
name_format: 2,
name: Some(b"VerifyRecover"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x00000019,
name_format: 2,
name: Some(b"Wrap"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x0000000f,
attribute_id: 0x0000001a,
name_format: 2,
name: Some(b"Unwrap"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000000,
name_format: 2,
name: Some(b"KeyClass"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000001,
name_format: 2,
name: Some(b"PrintName"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000002,
name_format: 2,
name: Some(b"Alias"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000003,
name_format: 2,
name: Some(b"Permanent"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000004,
name_format: 2,
name: Some(b"Private"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000005,
name_format: 2,
name: Some(b"Modifiable"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000006,
name_format: 2,
name: Some(b"Label"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000007,
name_format: 2,
name: Some(b"ApplicationTag"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000008,
name_format: 2,
name: Some(b"KeyCreator"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000009,
name_format: 2,
name: Some(b"KeyType"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x0000000a,
name_format: 2,
name: Some(b"KeySizeInBits"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x0000000b,
name_format: 2,
name: Some(b"EffectiveKeySize"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x0000000c,
name_format: 2,
name: Some(b"StartDate"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x0000000d,
name_format: 2,
name: Some(b"EndDate"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x0000000e,
name_format: 2,
name: Some(b"Sensitive"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x0000000f,
name_format: 2,
name: Some(b"AlwaysSensitive"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000010,
name_format: 2,
name: Some(b"Extractable"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000011,
name_format: 2,
name: Some(b"NeverExtractable"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000012,
name_format: 2,
name: Some(b"Encrypt"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000013,
name_format: 2,
name: Some(b"Decrypt"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000014,
name_format: 2,
name: Some(b"Derive"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000015,
name_format: 2,
name: Some(b"Sign"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000016,
name_format: 2,
name: Some(b"Verify"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000017,
name_format: 2,
name: Some(b"SignRecover"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000018,
name_format: 2,
name: Some(b"VerifyRecover"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x00000019,
name_format: 2,
name: Some(b"Wrap"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000010,
attribute_id: 0x0000001a,
name_format: 2,
name: Some(b"Unwrap"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000000,
name_format: 2,
name: Some(b"KeyClass"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000001,
name_format: 2,
name: Some(b"PrintName"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000002,
name_format: 2,
name: Some(b"Alias"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000003,
name_format: 2,
name: Some(b"Permanent"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000004,
name_format: 2,
name: Some(b"Private"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000005,
name_format: 2,
name: Some(b"Modifiable"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000006,
name_format: 2,
name: Some(b"Label"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000007,
name_format: 2,
name: Some(b"ApplicationTag"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000008,
name_format: 2,
name: Some(b"KeyCreator"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000009,
name_format: 2,
name: Some(b"KeyType"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x0000000a,
name_format: 2,
name: Some(b"KeySizeInBits"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x0000000b,
name_format: 2,
name: Some(b"EffectiveKeySize"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x0000000c,
name_format: 2,
name: Some(b"StartDate"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x0000000d,
name_format: 2,
name: Some(b"EndDate"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x0000000e,
name_format: 2,
name: Some(b"Sensitive"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x0000000f,
name_format: 2,
name: Some(b"AlwaysSensitive"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000010,
name_format: 2,
name: Some(b"Extractable"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000011,
name_format: 2,
name: Some(b"NeverExtractable"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000012,
name_format: 2,
name: Some(b"Encrypt"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000013,
name_format: 2,
name: Some(b"Decrypt"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000014,
name_format: 2,
name: Some(b"Derive"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000015,
name_format: 2,
name: Some(b"Sign"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000016,
name_format: 2,
name: Some(b"Verify"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000017,
name_format: 2,
name: Some(b"SignRecover"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000018,
name_format: 2,
name: Some(b"VerifyRecover"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x00000019,
name_format: 2,
name: Some(b"Wrap"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x00000011,
attribute_id: 0x0000001a,
name_format: 2,
name: Some(b"Unwrap"),
name_id: None,
format: 2,
},
];
pub const INDEXES: [IndexRow; 80] = [
IndexRow {
relation_id: 0x80000000,
index_id: 0,
attribute_id: 0x61636374,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000000,
index_id: 0,
attribute_id: 0x73766365,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000000,
index_id: 3,
attribute_id: 0x61636374,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000000,
index_id: 4,
attribute_id: 0x73766365,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000002,
index_id: 0,
attribute_id: 0x61636374,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000002,
index_id: 0,
attribute_id: 0x766c6d65,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000002,
index_id: 0,
attribute_id: 0x61646472,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000002,
index_id: 0,
attribute_id: 0x73736967,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000002,
index_id: 5,
attribute_id: 0x61636374,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000002,
index_id: 6,
attribute_id: 0x766c6d65,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000002,
index_id: 7,
attribute_id: 0x61646472,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000002,
index_id: 8,
attribute_id: 0x73736967,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000001,
index_id: 0,
attribute_id: 0x61636374,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000001,
index_id: 0,
attribute_id: 0x73646d6e,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000001,
index_id: 0,
attribute_id: 0x73727672,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000001,
index_id: 0,
attribute_id: 0x7074636c,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000001,
index_id: 0,
attribute_id: 0x61747970,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000001,
index_id: 0,
attribute_id: 0x706f7274,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000001,
index_id: 0,
attribute_id: 0x70617468,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000001,
index_id: 8,
attribute_id: 0x61636374,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000001,
index_id: 9,
attribute_id: 0x73646d6e,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000001,
index_id: 10,
attribute_id: 0x73727672,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000001,
index_id: 11,
attribute_id: 0x7074636c,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000001,
index_id: 12,
attribute_id: 0x61747970,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000001,
index_id: 13,
attribute_id: 0x706f7274,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80000001,
index_id: 14,
attribute_id: 0x70617468,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 0,
attribute_id: 0x00000006,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 0,
attribute_id: 0x00000007,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 0,
attribute_id: 0x00000008,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 0,
attribute_id: 0x00000009,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 0,
attribute_id: 0x0000000a,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 0,
attribute_id: 0x0000000b,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 0,
attribute_id: 0x0000000c,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 0,
attribute_id: 0x0000000d,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 1,
attribute_id: 0x00000006,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 2,
attribute_id: 0x00000012,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 3,
attribute_id: 0x00000013,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 4,
attribute_id: 0x00000014,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 5,
attribute_id: 0x00000015,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 6,
attribute_id: 0x00000016,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 7,
attribute_id: 0x00000017,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 8,
attribute_id: 0x00000018,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 9,
attribute_id: 0x00000019,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x0000000f,
index_id: 10,
attribute_id: 0x0000001a,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 0,
attribute_id: 0x00000006,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 0,
attribute_id: 0x00000007,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 0,
attribute_id: 0x00000008,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 0,
attribute_id: 0x00000009,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 0,
attribute_id: 0x0000000a,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 0,
attribute_id: 0x0000000b,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 0,
attribute_id: 0x0000000c,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 0,
attribute_id: 0x0000000d,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 1,
attribute_id: 0x00000006,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 2,
attribute_id: 0x00000012,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 3,
attribute_id: 0x00000013,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 4,
attribute_id: 0x00000014,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 5,
attribute_id: 0x00000015,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 6,
attribute_id: 0x00000016,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 7,
attribute_id: 0x00000017,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 8,
attribute_id: 0x00000018,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 9,
attribute_id: 0x00000019,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000010,
index_id: 10,
attribute_id: 0x0000001a,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 0,
attribute_id: 0x00000006,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 0,
attribute_id: 0x00000007,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 0,
attribute_id: 0x00000008,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 0,
attribute_id: 0x00000009,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 0,
attribute_id: 0x0000000a,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 0,
attribute_id: 0x0000000b,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 0,
attribute_id: 0x0000000c,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 0,
attribute_id: 0x0000000d,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 1,
attribute_id: 0x00000006,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 2,
attribute_id: 0x00000012,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 3,
attribute_id: 0x00000013,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 4,
attribute_id: 0x00000014,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 5,
attribute_id: 0x00000015,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 6,
attribute_id: 0x00000016,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 7,
attribute_id: 0x00000017,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 8,
attribute_id: 0x00000018,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 9,
attribute_id: 0x00000019,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x00000011,
index_id: 10,
attribute_id: 0x0000001a,
index_type: 1,
indexed_data_location: 1,
},
];
pub const TABLES: [TableTemplate; 11] = [
TableTemplate { relation_id: 0x00000000, free_list: 0x00000000, index_data: b"\x00\x00\x00\x08\x00\x00\x00\x00" },
TableTemplate { relation_id: 0x00000001, free_list: 0x00000000, index_data: b"\x00\x00\x00\x08\x00\x00\x00\x00" },
TableTemplate { relation_id: 0x00000002, free_list: 0x00000000, index_data: b"\x00\x00\x00\x08\x00\x00\x00\x00" },
TableTemplate { relation_id: 0x00000003, free_list: 0x0000001d, index_data: b"\x00\x00\x00\x08\x00\x00\x00\x00" },
TableTemplate { relation_id: 0x0000000f, free_list: 0x0000001d, index_data: b"\x00\x00\x01\x58\x00\x00\x00\x0b\x00\x00\x00\x54\x00\x00\x00\x88\x00\x00\x00\xa0\x00\x00\x00\xb8\x00\x00\x00\xd0\x00\x00\x00\xe8\x00\x00\x01\x00\x00\x00\x01\x18\x00\x00\x01\x30\x00\x00\x01\x48\x00\x00\x01\x60\x00\x00\x00\x34\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x08\x00\x00\x00\x06\x00\x00\x00\x07\x00\x00\x00\x08\x00\x00\x00\x09\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x00\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x16\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x1a\x00\x00\x00\x00" },
TableTemplate { relation_id: 0x00000010, free_list: 0x0000001d, index_data: b"\x00\x00\x01\x58\x00\x00\x00\x0b\x00\x00\x00\x54\x00\x00\x00\x88\x00\x00\x00\xa0\x00\x00\x00\xb8\x00\x00\x00\xd0\x00\x00\x00\xe8\x00\x00\x01\x00\x00\x00\x01\x18\x00\x00\x01\x30\x00\x00\x01\x48\x00\x00\x01\x60\x00\x00\x00\x34\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x08\x00\x00\x00\x06\x00\x00\x00\x07\x00\x00\x00\x08\x00\x00\x00\x09\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x00\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x16\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x1a\x00\x00\x00\x00" },
TableTemplate { relation_id: 0x00000011, free_list: 0x0000001d, index_data: b"\x00\x00\x01\x58\x00\x00\x00\x0b\x00\x00\x00\x54\x00\x00\x00\x88\x00\x00\x00\xa0\x00\x00\x00\xb8\x00\x00\x00\xd0\x00\x00\x00\xe8\x00\x00\x01\x00\x00\x00\x01\x18\x00\x00\x01\x30\x00\x00\x01\x48\x00\x00\x01\x60\x00\x00\x00\x34\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x08\x00\x00\x00\x06\x00\x00\x00\x07\x00\x00\x00\x08\x00\x00\x00\x09\x00\x00\x00\x0a\x00\x00\x00\x0b\x00\x00\x00\x0c\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x12\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x16\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x1a\x00\x00\x00\x00" },
TableTemplate { relation_id: 0x80000000, free_list: 0x0000001d, index_data: b"\x00\x00\x00\x60\x00\x00\x00\x03\x00\x00\x00\x34\x00\x00\x00\x50\x00\x00\x00\x68\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02\x61\x63\x63\x74\x73\x76\x63\x65\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x01\x61\x63\x63\x74\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x01\x73\x76\x63\x65\x00\x00\x00\x00" },
TableTemplate { relation_id: 0x80000001, free_list: 0x0000001d, index_data: b"\x00\x00\x01\x00\x00\x00\x00\x08\x00\x00\x00\x48\x00\x00\x00\x78\x00\x00\x00\x90\x00\x00\x00\xa8\x00\x00\x00\xc0\x00\x00\x00\xd8\x00\x00\x00\xf0\x00\x00\x01\x08\x00\x00\x00\x30\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x07\x61\x63\x63\x74\x73\x64\x6d\x6e\x73\x72\x76\x72\x70\x74\x63\x6c\x61\x74\x79\x70\x70\x6f\x72\x74\x70\x61\x74\x68\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x01\x61\x63\x63\x74\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00\x01\x73\x64\x6d\x6e\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x01\x73\x72\x76\x72\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x01\x70\x74\x63\x6c\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x01\x61\x74\x79\x70\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x0d\x00\x00\x00\x00\x00\x00\x00\x01\x70\x6f\x72\x74\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x01\x70\x61\x74\x68\x00\x00\x00\x00" },
TableTemplate { relation_id: 0x80000002, free_list: 0x0000001d, index_data: b"\x00\x00\x00\xa0\x00\x00\x00\x05\x00\x00\x00\x3c\x00\x00\x00\x60\x00\x00\x00\x78\x00\x00\x00\x90\x00\x00\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x04\x61\x63\x63\x74\x76\x6c\x6d\x65\x61\x64\x64\x72\x73\x73\x69\x67\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00\x01\x61\x63\x63\x74\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x01\x76\x6c\x6d\x65\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x01\x61\x64\x64\x72\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x01\x73\x73\x69\x67\x00\x00\x00\x00" },
TableTemplate { relation_id: 0x80008000, free_list: 0x00000000, index_data: b"\x00\x00\x00\x08\x00\x00\x00\x00" },
];
/// 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.
pub struct OnDemandRelation {
pub relation: RelationRow,
pub attributes: &'static [AttributeRow],
pub indexes: &'static [IndexRow],
/// The free-list field of the new, still-empty table.
pub free_list: u32,
}
/// `CSSM_DL_DB_RECORD_X509_CERTIFICATE`, added on the first certificate.
pub const X509_CERTIFICATE_RELATION: OnDemandRelation = OnDemandRelation {
relation: RelationRow {
relation_id: 0x80001000,
name: Some(b"CSSM_DL_DB_RECORD_X509_CERTIFICATE"),
},
attributes: &X509_CERTIFICATE_ATTRIBUTES,
indexes: &X509_CERTIFICATE_INDEXES,
free_list: 0x0000001d,
};
/// Relations this code knows how to add to a keychain's schema.
pub const ON_DEMAND_RELATIONS: [&OnDemandRelation; 1] = [&X509_CERTIFICATE_RELATION];
pub const X509_CERTIFICATE_ATTRIBUTES: [AttributeRow; 9] = [
AttributeRow {
relation_id: 0x80001000,
attribute_id: 0x63747970,
name_format: 2,
name: Some(b"CertType"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x80001000,
attribute_id: 0x63656e63,
name_format: 2,
name: Some(b"CertEncoding"),
name_id: None,
format: 2,
},
AttributeRow {
relation_id: 0x80001000,
attribute_id: 0x6c61626c,
name_format: 2,
name: Some(b"PrintName"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80001000,
attribute_id: 0x616c6973,
name_format: 2,
name: Some(b"Alias"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80001000,
attribute_id: 0x7375626a,
name_format: 2,
name: Some(b"Subject"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80001000,
attribute_id: 0x69737375,
name_format: 2,
name: Some(b"Issuer"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80001000,
attribute_id: 0x736e6272,
name_format: 2,
name: Some(b"SerialNumber"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80001000,
attribute_id: 0x736b6964,
name_format: 2,
name: Some(b"SubjectKeyIdentifier"),
name_id: None,
format: 6,
},
AttributeRow {
relation_id: 0x80001000,
attribute_id: 0x68706b79,
name_format: 2,
name: Some(b"PublicKeyHash"),
name_id: None,
format: 6,
},
];
pub const X509_CERTIFICATE_INDEXES: [IndexRow; 10] = [
IndexRow {
relation_id: 0x80001000,
index_id: 0,
attribute_id: 0x63747970,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80001000,
index_id: 0,
attribute_id: 0x69737375,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80001000,
index_id: 0,
attribute_id: 0x736e6272,
index_type: 0,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80001000,
index_id: 1,
attribute_id: 0x63747970,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80001000,
index_id: 2,
attribute_id: 0x616c6973,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80001000,
index_id: 3,
attribute_id: 0x7375626a,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80001000,
index_id: 4,
attribute_id: 0x69737375,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80001000,
index_id: 5,
attribute_id: 0x736e6272,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80001000,
index_id: 6,
attribute_id: 0x736b6964,
index_type: 1,
indexed_data_location: 1,
},
IndexRow {
relation_id: 0x80001000,
index_id: 7,
attribute_id: 0x68706b79,
index_type: 1,
indexed_data_location: 1,
},
];