Skip to content

Commit

Permalink
feature gate X509_ALGOR_set_md for openssl only
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Maier committed Aug 29, 2024
1 parent 971b7fc commit ef70768
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions openssl-sys/src/handwritten/x509.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ extern "C" {

pub fn X509_ALGOR_new() -> *mut X509_ALGOR;
pub fn X509_ALGOR_free(x: *mut X509_ALGOR);

#[cfg(ossl110)]
pub fn X509_ALGOR_set_md(alg: *mut X509_ALGOR, md: *const EVP_MD);

pub fn X509_ALGOR_cmp(alg0: *const X509_ALGOR, alg1: *const X509_ALGOR) -> c_int;
Expand Down
2 changes: 1 addition & 1 deletion openssl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ pub mod ssl;
pub mod stack;
pub mod string;
pub mod symm;
#[cfg(not(boringssl))]
#[cfg(all(not(boringssl), not(libressl)))]
pub mod ts;
pub mod version;
pub mod x509;
Expand Down
1 change: 1 addition & 0 deletions openssl/src/x509/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2291,6 +2291,7 @@ impl X509AlgorithmRef {
}
}

#[cfg(ossl110)]
#[corresponds(X509_ALGOR_set_md)]
pub fn set_md(&mut self, md: MessageDigest) {
unsafe {
Expand Down

0 comments on commit ef70768

Please sign in to comment.