Skip to content

Commit

Permalink
Merge pull request #2276 from botovq/lookup-methods
Browse files Browse the repository at this point in the history
libressl 4.0: const correctness for X509_LOOKUP_METHOD
  • Loading branch information
alex authored Aug 16, 2024
2 parents 499722f + 47862ea commit e77c849
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions openssl-sys/src/handwritten/x509_vfy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ extern "C" {
pub fn X509_LOOKUP_meth_free(method: *mut X509_LOOKUP_METHOD);
}

const_ptr_api! {
extern "C" {
pub fn X509_LOOKUP_hash_dir() -> #[const_ptr_if(libressl400)] X509_LOOKUP_METHOD;
pub fn X509_LOOKUP_file() -> #[const_ptr_if(libressl400)] X509_LOOKUP_METHOD;
}
}
extern "C" {
pub fn X509_LOOKUP_free(ctx: *mut X509_LOOKUP);
pub fn X509_LOOKUP_hash_dir() -> *mut X509_LOOKUP_METHOD;
pub fn X509_LOOKUP_file() -> *mut X509_LOOKUP_METHOD;
pub fn X509_LOOKUP_ctrl(
ctx: *mut X509_LOOKUP,
cmd: c_int,
Expand Down Expand Up @@ -41,11 +45,6 @@ extern "C" {

pub fn X509_STORE_add_cert(store: *mut X509_STORE, x: *mut X509) -> c_int;

pub fn X509_STORE_add_lookup(
store: *mut X509_STORE,
meth: *mut X509_LOOKUP_METHOD,
) -> *mut X509_LOOKUP;

pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> c_int;
pub fn X509_STORE_set_flags(store: *mut X509_STORE, flags: c_ulong) -> c_int;
pub fn X509_STORE_set_purpose(ctx: *mut X509_STORE, purpose: c_int) -> c_int;
Expand All @@ -55,6 +54,10 @@ extern "C" {

const_ptr_api! {
extern "C" {
pub fn X509_STORE_add_lookup(
store: *mut X509_STORE,
meth: #[const_ptr_if(libressl400)] X509_LOOKUP_METHOD,
) -> *mut X509_LOOKUP;
pub fn X509_STORE_set1_param(store: *mut X509_STORE, pm: #[const_ptr_if(ossl300)] X509_VERIFY_PARAM) -> c_int;
}
}
Expand Down

0 comments on commit e77c849

Please sign in to comment.