Skip to content

Commit

Permalink
update cfg flag
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-jq committed Apr 21, 2023
1 parent e073b4d commit e8108cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions openssl-sys/src/handwritten/x509v3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,19 @@ extern "C" {
indent: c_int,
) -> c_int;

#[cfg(ossl110)]
#[cfg(ossl111)]
pub fn X509_get_extension_flags(x: *mut X509) -> u32;
#[cfg(ossl110)]
#[cfg(ossl111)]
pub fn X509_get_key_usage(x: *mut X509) -> u32;
#[cfg(ossl110)]
#[cfg(ossl111)]
pub fn X509_get_extended_key_usage(x: *mut X509) -> u32;
#[cfg(ossl110)]
#[cfg(ossl111)]
pub fn X509_get0_subject_key_id(x: *mut X509) -> *const ASN1_OCTET_STRING;
#[cfg(ossl110)]
#[cfg(ossl111)]
pub fn X509_get0_authority_key_id(x: *mut X509) -> *const ASN1_OCTET_STRING;
#[cfg(ossl110)]
#[cfg(ossl111)]
pub fn X509_get0_authority_issuer(x: *mut X509) -> *const stack_st_GENERAL_NAME;
#[cfg(ossl110)]
#[cfg(ossl111)]
pub fn X509_get0_authority_serial(x: *mut X509) -> *const ASN1_INTEGER;
}

Expand Down
8 changes: 4 additions & 4 deletions openssl/src/x509/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ impl X509Ref {

/// Returns this certificate's subject key id, if it exists.
#[corresponds(X509_get0_subject_key_id)]
#[cfg(ossl110)]
#[cfg(ossl111)]
pub fn subject_key_id(&self) -> Option<&Asn1StringRef> {
unsafe {
let data = ffi::X509_get0_subject_key_id(self.as_ptr());
Expand All @@ -495,7 +495,7 @@ impl X509Ref {

/// Returns this certificate's authority key id, if it exists.
#[corresponds(X509_get0_authority_key_id)]
#[cfg(ossl110)]
#[cfg(ossl111)]
pub fn authority_key_id(&self) -> Option<&Asn1StringRef> {
unsafe {
let data = ffi::X509_get0_authority_key_id(self.as_ptr());
Expand All @@ -505,7 +505,7 @@ impl X509Ref {

/// Returns this certificate's authority issuer name entries, if they exist.
#[corresponds(X509_get0_authority_issuer)]
#[cfg(ossl110)]
#[cfg(ossl111)]
pub fn authority_issuer(&self) -> Option<Stack<GeneralName>> {
unsafe {
let stack = ffi::X509_get0_authority_issuer(self.as_ptr());
Expand All @@ -515,7 +515,7 @@ impl X509Ref {

/// Returns this certificate's authority serial number, if it exists.
#[corresponds(X509_get0_authority_serial)]
#[cfg(ossl110)]
#[cfg(ossl111)]
pub fn authority_serial(&self) -> Option<&Asn1IntegerRef> {
unsafe {
let r = ffi::X509_get0_authority_serial(self.as_ptr());
Expand Down

0 comments on commit e8108cb

Please sign in to comment.