2015-11-10 03:22:03 +00:00
table_name("signature")
2016-02-21 21:54:16 +00:00
description("File (executable, bundle, installer, disk) code signing status.")
2015-11-10 03:22:03 +00:00
schema([
Column("path", TEXT, "Must provide a path or directory", required=True),
2018-07-02 18:47:18 +00:00
Column("hash_resources", INTEGER, "Set to 1 to also hash resources, or 0 otherwise. Default is 1"),
2018-06-11 21:03:57 +00:00
Column("arch", TEXT, "If applicable, the arch of the signed code"),
2015-11-10 03:22:03 +00:00
Column("signed", INTEGER, "1 If the file is signed else 0"),
Column("identifier", TEXT, "The signing identifier sealed into the signature"),
2018-07-13 19:00:43 +00:00
Column("cdhash", TEXT, "Hash of the application Code Directory"),
2016-03-14 07:37:14 +00:00
Column("team_identifier", TEXT, "The team signing identifier sealed into the signature"),
Column("authority", TEXT, "Certificate Common Name"),
2015-11-10 03:22:03 +00:00
])
implementation("signature@genSignature")
examples([
2018-06-11 21:03:57 +00:00
"SELECT * FROM signature WHERE path = '/bin/ls'",
2018-07-02 18:47:18 +00:00
"SELECT * FROM signature WHERE path = '/Applications/Xcode.app' AND hash_resources=0",
2018-06-11 21:03:57 +00:00
"SELECT * FROM (SELECT path, MIN(signed) AS all_signed, MIN(CASE WHEN authority = 'Software Signing' AND signed = 1 THEN 1 ELSE 0 END) AS all_signed_by_apple FROM signature WHERE path LIKE '/bin/%' GROUP BY path);"
2015-11-10 03:22:03 +00:00
])