Add build check for OpenSSL 1.1.1 requirement

This commit is contained in:
Jan Andre Ikenmeyer 2020-02-11 14:33:27 +01:00
parent 9f4b674fb5
commit 21b2479dc2
No known key found for this signature in database
GPG key ID: 28F9E42748DD95AE
3 changed files with 19 additions and 0 deletions

16
components/net/build.rs Normal file
View file

@ -0,0 +1,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
fn main() {
let version =
std::env::var("DEP_OPENSSL_VERSION_NUMBER").expect("missing DEP_OPENSSL_VERSION_NUMBER");
let actual = u64::from_str_radix(&version, 16).unwrap();
let minimum = 0x10101000;
if actual < minimum {
panic!(
"Your OpenSSL version is older than 1.1.1 ({:x}), you have: {:x}",
minimum, actual
);
}
}