Skip to content

Commit

Permalink
Update X509NamePrintFlags to new bitflags version
Browse files Browse the repository at this point in the history
bitflags no longer derives traits by default, so `Clone, Copy,
PartialEq, Eq` need to be derived outside the macro, per
<https://docs.rs/bitflags/2.5.0/bitflags/#custom-derives>.

Signed-off-by: Ross Williams <ross@ross-williams.net>
  • Loading branch information
overhacked committed May 13, 2024
1 parent b0ae92d commit 6b6d248
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions openssl/src/x509/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@ pub unsafe trait ExtensionType {
type Output: ForeignType;
}

/// Flags used to print an `X509NameRef`
#[derive(Clone, Copy, PartialEq, Eq)]
pub struct X509NamePrintFlags(c_ulong);

bitflags! {
/// Flags used to print an `X509NameRef`
pub struct X509NamePrintFlags: c_ulong {
impl X509NamePrintFlags: c_ulong {
// TODO: by OpenSSL version?
const COMPAT = ffi::XN_FLAG_COMPAT;
const SEP_COMMA_PLUS = ffi::XN_FLAG_SEP_COMMA_PLUS;
Expand Down

0 comments on commit 6b6d248

Please sign in to comment.