Skip to content

Commit 47862ea

Browse files
committed
libressl 4.0: const correctness for X509_LOOKUP_METHOD
1 parent 499722f commit 47862ea

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

openssl-sys/src/handwritten/x509_vfy.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@ extern "C" {
99
pub fn X509_LOOKUP_meth_free(method: *mut X509_LOOKUP_METHOD);
1010
}
1111

12+
const_ptr_api! {
13+
extern "C" {
14+
pub fn X509_LOOKUP_hash_dir() -> #[const_ptr_if(libressl400)] X509_LOOKUP_METHOD;
15+
pub fn X509_LOOKUP_file() -> #[const_ptr_if(libressl400)] X509_LOOKUP_METHOD;
16+
}
17+
}
1218
extern "C" {
1319
pub fn X509_LOOKUP_free(ctx: *mut X509_LOOKUP);
14-
pub fn X509_LOOKUP_hash_dir() -> *mut X509_LOOKUP_METHOD;
15-
pub fn X509_LOOKUP_file() -> *mut X509_LOOKUP_METHOD;
1620
pub fn X509_LOOKUP_ctrl(
1721
ctx: *mut X509_LOOKUP,
1822
cmd: c_int,
@@ -41,11 +45,6 @@ extern "C" {
4145

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

44-
pub fn X509_STORE_add_lookup(
45-
store: *mut X509_STORE,
46-
meth: *mut X509_LOOKUP_METHOD,
47-
) -> *mut X509_LOOKUP;
48-
4948
pub fn X509_STORE_set_default_paths(store: *mut X509_STORE) -> c_int;
5049
pub fn X509_STORE_set_flags(store: *mut X509_STORE, flags: c_ulong) -> c_int;
5150
pub fn X509_STORE_set_purpose(ctx: *mut X509_STORE, purpose: c_int) -> c_int;
@@ -55,6 +54,10 @@ extern "C" {
5554

5655
const_ptr_api! {
5756
extern "C" {
57+
pub fn X509_STORE_add_lookup(
58+
store: *mut X509_STORE,
59+
meth: #[const_ptr_if(libressl400)] X509_LOOKUP_METHOD,
60+
) -> *mut X509_LOOKUP;
5861
pub fn X509_STORE_set1_param(store: *mut X509_STORE, pm: #[const_ptr_if(ossl300)] X509_VERIFY_PARAM) -> c_int;
5962
}
6063
}

0 commit comments

Comments
 (0)