|
| 1 | +--- vendor/openssl-sys/build/main.rs.orig 2019-12-11 12:22:26 UTC |
| 2 | ++++ vendor/openssl-sys/build/main.rs |
| 3 | +@@ -183,27 +183,32 @@ See rust-openssl README for more informa |
| 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 | ++ let (major, minor, fix) = match (major, minor, fix) { |
| 25 | ++ (2, 5, 0) => ('2', '5', '0'), |
| 26 | ++ (2, 5, 1) => ('2', '5', '1'), |
| 27 | ++ (2, 5, 2) => ('2', '5', '2'), |
| 28 | ++ (2, 5, _) => ('2', '5', 'x'), |
| 29 | ++ (2, 6, 0) => ('2', '6', '0'), |
| 30 | ++ (2, 6, 1) => ('2', '6', '1'), |
| 31 | ++ (2, 6, 2) => ('2', '6', '2'), |
| 32 | ++ (2, 6, _) => ('2', '6', 'x'), |
| 33 | ++ (2, 7, _) => ('2', '7', 'x'), |
| 34 | ++ (2, 8, 0) => ('2', '8', '0'), |
| 35 | ++ (2, 8, 1) => ('2', '8', '1'), |
| 36 | ++ (2, 8, _) => ('2', '8', 'x'), |
| 37 | ++ (2, 9, 0) => ('2', '9', '0'), |
| 38 | ++ (2, 9, _) => ('2', '9', 'x'), |
| 39 | ++ (3, 0, 0) => ('3', '0', '0'), |
| 40 | ++ (3, 0, 1) => ('3', '0', '1'), |
| 41 | ++ (3, 0, _) => ('3', '0', 'x'), |
| 42 | + _ => version_error(), |
| 43 | + }; |
| 44 | + |
| 45 | + println!("cargo:libressl=true"); |
| 46 | +- println!("cargo:libressl_version=2{}{}", minor, fix); |
| 47 | ++ println!("cargo:libressl_version={}{}{}", major, minor, fix); |
| 48 | + println!("cargo:version=101"); |
| 49 | + Version::Libressl |
| 50 | + } else { |
| 51 | +@@ -239,7 +244,7 @@ fn version_error() -> ! { |
| 52 | + " |
| 53 | + |
| 54 | + This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5 |
| 55 | +-through 2.9.0, but a different version of OpenSSL was found. The build is now aborting |
| 56 | ++through 3.0.x, but a different version of OpenSSL was found. The build is now aborting |
| 57 | + due to this version mismatch. |
| 58 | + |
| 59 | + " |
0 commit comments