Unverified Commit 8840e53b authored by Alex Gaynor's avatar Alex Gaynor Committed by GitHub
Browse files

Merge pull request #2113 from alex/new-boringssl

Handle new const functions in BoringSSL
parents be93c453 ed6e1ae8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ jobs:
            - false
          library:
            - name: boringssl
              version: 8d71d244c0debac4079beeb02b5802fde59b94bd
              version: f78fe19fc98e0e6f760e05c6b9d48725004700d0
            - name: openssl
              version: vendored
            - name: openssl
+6 −2
Original line number Diff line number Diff line
@@ -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 _) }
    }
}

@@ -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 _) }
    }
}