|
Added
Link Here
|
| 1 |
--- vendor/openssl-sys/build/main.rs.orig 2019-11-30 10:09:17 UTC |
| 2 |
+++ vendor/openssl-sys/build/main.rs |
| 3 |
@@ -183,28 +183,32 @@ See rust-openssl README for more information: |
| 4 |
if let Some(libressl_version) = libressl_version { |
| 5 |
println!("cargo:libressl_version_number={:x}", libressl_version); |
| 6 |
|
| 7 |
+ let major = (libressl_version >> 28) as u8; |
| 8 |
let minor = (libressl_version >> 20) as u8; |
| 9 |
let fix = (libressl_version >> 12) as u8; |
| 10 |
- let (minor, fix) = match (minor, fix) { |
| 11 |
- (5, 0) => ('5', '0'), |
| 12 |
- (5, 1) => ('5', '1'), |
| 13 |
- (5, 2) => ('5', '2'), |
| 14 |
- (5, _) => ('5', 'x'), |
| 15 |
- (6, 0) => ('6', '0'), |
| 16 |
- (6, 1) => ('6', '1'), |
| 17 |
- (6, 2) => ('6', '2'), |
| 18 |
- (6, _) => ('6', 'x'), |
| 19 |
- (7, _) => ('7', 'x'), |
| 20 |
- (8, 0) => ('8', '0'), |
| 21 |
- (8, 1) => ('8', '1'), |
| 22 |
- (8, _) => ('8', 'x'), |
| 23 |
- (9, 0) => ('9', '0'), |
| 24 |
- (9, _) => ('9', 'x'), |
| 25 |
+ let (major, minor, fix) = match (major, minor, fix) { |
| 26 |
+ (2, 5, 0) => ('2', '5', '0'), |
| 27 |
+ (2, 5, 1) => ('2', '5', '1'), |
| 28 |
+ (2, 5, 2) => ('2', '5', '2'), |
| 29 |
+ (2, 5, _) => ('2', '5', 'x'), |
| 30 |
+ (2, 6, 0) => ('2', '6', '0'), |
| 31 |
+ (2, 6, 1) => ('2', '6', '1'), |
| 32 |
+ (2, 6, 2) => ('2', '6', '2'), |
| 33 |
+ (2, 6, _) => ('2', '6', 'x'), |
| 34 |
+ (2, 7, _) => ('2', '7', 'x'), |
| 35 |
+ (2, 8, 0) => ('2', '8', '0'), |
| 36 |
+ (2, 8, 1) => ('2', '8', '1'), |
| 37 |
+ (2, 8, _) => ('2', '8', 'x'), |
| 38 |
+ (2, 9, 0) => ('2', '9', '0'), |
| 39 |
+ (2, 9, _) => ('2', '9', 'x'), |
| 40 |
+ (3, 0, 0) => ('3', '0', '0'), |
| 41 |
+ (3, 0, 1) => ('3', '0', '1'), |
| 42 |
+ (3, 0, _) => ('3', '0', 'x'), |
| 43 |
_ => version_error(), |
| 44 |
}; |
| 45 |
|
| 46 |
println!("cargo:libressl=true"); |
| 47 |
- println!("cargo:libressl_version=2{}{}", minor, fix); |
| 48 |
+ println!("cargo:libressl_version={}{}{}", major, minor, fix); |
| 49 |
println!("cargo:version=101"); |
| 50 |
Version::Libressl |
| 51 |
} else { |
| 52 |
@@ -240,7 +244,7 @@ fn version_error() -> ! { |
| 53 |
" |
| 54 |
|
| 55 |
This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5 |
| 56 |
-through 2.9.x, but a different version of OpenSSL was found. The build is now aborting |
| 57 |
+through 3.0.x, but a different version of OpenSSL was found. The build is now aborting |
| 58 |
due to this version mismatch. |
| 59 |
|
| 60 |
" |
| 61 |
@@ -256,7 +260,7 @@ fn parse_version(version: &str) -> u64 { |
| 62 |
|
| 63 |
// and the type specifier suffix |
| 64 |
let version = version.trim_right_matches(|c: char| match c { |
| 65 |
- '0'...'9' | 'a'...'f' | 'A'...'F' => false, |
| 66 |
+ '0'..='9' | 'a'..='f' | 'A'..='F' => false, |
| 67 |
_ => true, |
| 68 |
}); |
| 69 |
|