Skip to content

Commit

Permalink
use code signing policy to find certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Dec 15, 2024
1 parent e21f33d commit 9f22268
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cidre/examples/sec-dev-teams/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ mod macos {
use cidre::{arc, cf, sec};

pub(crate) fn main() {
let policy = sec::Policy::with_props(sec::Policy::apple_code_signing(), None).unwrap();
let now = cf::Date::new();
let query = cf::DictionaryOf::with_keys_values(
&[
sec::class_key(),
sec::match_keys::limit(),
sec::match_keys::subject_starts_with(),
sec::match_keys::policy(),
sec::match_keys::valid_on_date(),
],
&[
sec::class::certificate().as_type_ref(),
sec::match_limit::all(),
cf::str!(c"Apple Development:"),
&policy,
&now,
],
);
Expand Down

0 comments on commit 9f22268

Please sign in to comment.