Skip to content

Commit

Permalink
Upgrade to bitflags 2
Browse files Browse the repository at this point in the history
  • Loading branch information
alex authored and kornelski committed Apr 24, 2024
1 parent fedc8dc commit 8c89e67
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion security-framework/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ rust-version = "1.60"
security-framework-sys = { version = "2.10.0", default-features = false, path = "../security-framework-sys" }
core-foundation = "0.9.3"
core-foundation-sys = "0.8.3"
bitflags = "1.3.2"
bitflags = "2"
libc = "0.2.139"
log = { version = "0.4.17", optional = true }
num-bigint = { version = "0.4.3", optional = true }
Expand Down
1 change: 1 addition & 0 deletions security-framework/src/authorization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ macro_rules! cstring_or_err {

bitflags::bitflags! {
/// The flags used to specify authorization options.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Flags: sys::AuthorizationFlags {
/// An empty flag set that you use as a placeholder when you don't want
/// any of the other flags.
Expand Down
1 change: 1 addition & 0 deletions security-framework/src/os/macos/code_signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ bitflags::bitflags! {

/// Values that can be used in the flags parameter to most code signing
/// functions.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Flags: u32 {
/// Use the default behaviour.
const NONE = 0;
Expand Down
1 change: 1 addition & 0 deletions security-framework/src/passwords_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub struct PasswordOptions {

bitflags::bitflags! {
/// The option flags used to configure the evaluation of a `SecAccessControl`.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct AccessControlOptions: CFOptionFlags {
/** Constraint to access an item with either biometry or passcode. */
const USER_PRESENCE = kSecAccessControlUserPresence;
Expand Down
1 change: 1 addition & 0 deletions security-framework/src/policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ impl fmt::Debug for SecPolicy {
#[cfg(any(feature = "OSX_10_9", target_os = "ios", target_os = "tvos", target_os = "watchos"))]
bitflags::bitflags! {
/// The flags used to specify revocation policy options.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct RevocationPolicy: CFOptionFlags {
/// Perform revocation checking using OCSP (Online Certificate Status Protocol).
const OCSP_METHOD = kSecRevocationOCSPMethod;
Expand Down
1 change: 1 addition & 0 deletions security-framework/src/trust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ unsafe impl Send for SecTrust {}
#[cfg(target_os = "macos")]
bitflags::bitflags! {
/// The option flags used to configure the evaluation of a `SecTrust`.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct TrustOptions: SecTrustOptionFlags {
/// Allow expired certificates (except for the root certificate).
const ALLOW_EXPIRED = kSecTrustOptionAllowExpired;
Expand Down

0 comments on commit 8c89e67

Please sign in to comment.