bssl-sys: Remove unsupported_inline_wrappers We require the bindgen inline support now. I believe Android is no longer relying on this. Bug: 42290467 Change-Id: Ie6c1a2db9fd39c55769d44dacaa256a8245c368a Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/87009 Auto-Submit: David Benjamin <davidben@google.com> Commit-Queue: Xiangfei Ding <xfding@google.com> Reviewed-by: Xiangfei Ding <xfding@google.com>
diff --git a/rust/bssl-sys/Cargo.toml b/rust/bssl-sys/Cargo.toml index ec1e0c3..06cac9e 100644 --- a/rust/bssl-sys/Cargo.toml +++ b/rust/bssl-sys/Cargo.toml
@@ -10,4 +10,4 @@ links = "bssl" [lints.rust] -unexpected_cfgs = { level = "warn", check-cfg = ['cfg(unsupported_inline_wrappers)', 'cfg(bindgen_rs_file)'] } +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(bindgen_rs_file)'] }
diff --git a/rust/bssl-sys/rust_wrapper.c b/rust/bssl-sys/rust_wrapper.c deleted file mode 100644 index e7ff1a2..0000000 --- a/rust/bssl-sys/rust_wrapper.c +++ /dev/null
@@ -1,36 +0,0 @@ -// Copyright 2022 The BoringSSL Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "rust_wrapper.h" - - -int ERR_GET_LIB_RUST(uint32_t packed_error) { - return ERR_GET_LIB(packed_error); -} - -int ERR_GET_REASON_RUST(uint32_t packed_error) { - return ERR_GET_REASON(packed_error); -} - -int ERR_GET_FUNC_RUST(uint32_t packed_error) { - return ERR_GET_FUNC(packed_error); -} - -void CBS_init_RUST(CBS *cbs, const uint8_t *data, size_t len) { - CBS_init(cbs, data, len); -} - -size_t CBS_len_RUST(const CBS *cbs) { - return CBS_len(cbs); -}
diff --git a/rust/bssl-sys/rust_wrapper.h b/rust/bssl-sys/rust_wrapper.h deleted file mode 100644 index c894bd7..0000000 --- a/rust/bssl-sys/rust_wrapper.h +++ /dev/null
@@ -1,41 +0,0 @@ -// Copyright 2022 The BoringSSL Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef OPENSSL_HEADER_RUST_WRAPPER_H -#define OPENSSL_HEADER_RUST_WRAPPER_H - -#include <openssl/err.h> -#include <openssl/bytestring.h> - -#if defined(__cplusplus) -extern "C" { -#endif - - -// The following functions are wrappers over inline functions and macros in -// BoringSSL. These are not necessary, as bindgen has long supported -// --wrap-static-fns, however Android is still missing support for this. (See -// b/290347127.) These manual wrappers are, temporarily, retained for Android, -// but this codepath is no longer tested or supported by BoringSSL. -int ERR_GET_LIB_RUST(uint32_t packed_error); -int ERR_GET_REASON_RUST(uint32_t packed_error); -int ERR_GET_FUNC_RUST(uint32_t packed_error); -void CBS_init_RUST(CBS *cbs, const uint8_t *data, size_t len); -size_t CBS_len_RUST(const CBS *cbs); - -#if defined(__cplusplus) -} // extern C -#endif - -#endif // OPENSSL_HEADER_RUST_WRAPPER_H
diff --git a/rust/bssl-sys/src/lib.rs b/rust/bssl-sys/src/lib.rs index a1f79db..b940ba6 100644 --- a/rust/bssl-sys/src/lib.rs +++ b/rust/bssl-sys/src/lib.rs
@@ -56,14 +56,6 @@ pub const XN_FLAG_RFC2253: c_ulong = bindgen::XN_FLAG_RFC2253 as c_ulong; pub const XN_FLAG_ONELINE: c_ulong = bindgen::XN_FLAG_ONELINE as c_ulong; -// TODO(crbug.com/boringssl/596): Remove these wrappers. -#[cfg(unsupported_inline_wrappers)] -pub use { ERR_GET_LIB_RUST as ERR_GET_LIB, - ERR_GET_REASON_RUST as ERR_GET_REASON, - ERR_GET_FUNC_RUST as ERR_GET_FUNC, - CBS_init_RUST as CBS_init, - CBS_len_RUST as CBS_len }; - pub fn init() { // This function does nothing. // TODO(davidben): Remove rust-openssl's dependency on this and remove this.
diff --git a/rust/bssl-sys/wrapper.h b/rust/bssl-sys/wrapper.h index baf4788..593fb4f 100644 --- a/rust/bssl-sys/wrapper.h +++ b/rust/bssl-sys/wrapper.h
@@ -79,5 +79,3 @@ #include <openssl/x509.h> #include <openssl/x509_vfy.h> #include <openssl/x509v3.h> - -#include "rust_wrapper.h"