Skip to content

Commit

Permalink
Merge pull request #2113 from alex/new-boringssl
Browse files Browse the repository at this point in the history
Handle new const functions in BoringSSL
  • Loading branch information
alex authored Dec 2, 2023
2 parents be93c45 + ed6e1ae commit 8840e53
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ jobs:
- false
library:
- name: boringssl
version: 8d71d244c0debac4079beeb02b5802fde59b94bd
version: f78fe19fc98e0e6f760e05c6b9d48725004700d0
- name: openssl
version: vendored
- name: openssl
Expand Down
8 changes: 6 additions & 2 deletions openssl/src/x509/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ impl X509Lookup<HashDir> {
/// directory.
#[corresponds(X509_LOOKUP_hash_dir)]
pub fn hash_dir() -> &'static X509LookupMethodRef<HashDir> {
unsafe { X509LookupMethodRef::from_ptr(ffi::X509_LOOKUP_hash_dir()) }
// `*mut` cast is needed because BoringSSL returns a `*const`. This is
// ok because we only return an immutable reference.
unsafe { X509LookupMethodRef::from_ptr(ffi::X509_LOOKUP_hash_dir() as *mut _) }
}
}

Expand Down Expand Up @@ -197,7 +199,9 @@ impl X509Lookup<File> {
/// into memory at the time the file is added as a lookup source.
#[corresponds(X509_LOOKUP_file)]
pub fn file() -> &'static X509LookupMethodRef<File> {
unsafe { X509LookupMethodRef::from_ptr(ffi::X509_LOOKUP_file()) }
// `*mut` cast is needed because BoringSSL returns a `*const`. This is
// ok because we only return an immutable reference.
unsafe { X509LookupMethodRef::from_ptr(ffi::X509_LOOKUP_file() as *mut _) }
}
}

Expand Down

0 comments on commit 8840e53

Please sign in to comment.