blob: 3548f3401ba2da8502ad6cffe6baf8dcd0b2d887 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
From 6e66bf9c38653b3a06fb4efb96e71e9bada25d79 Mon Sep 17 00:00:00 2001
From: Greg V <greg@unrelenting.technology>
Date: Mon, 6 Nov 2017 16:19:16 +0300
Subject: [PATCH] Fix LibreSSL cms.h detection
Patch-Source: https://github.com/sfackler/rust-openssl/commit/6e66bf9c38653b3a06fb4efb96e71e9bada25d79
--- a/openssl/systest/build.rs
+++ b/openssl/systest/build.rs
@@ -5,6 +5,7 @@ use std::env;
fn main() {
let mut cfg = ctest::TestGenerator::new();
let target = env::var("TARGET").unwrap();
+ let mut is_libressl = false;
if let Ok(out) = env::var("DEP_OPENSSL_INCLUDE") {
cfg.include(&out);
@@ -24,6 +25,7 @@ fn main() {
if let Ok(_) = env::var("DEP_OPENSSL_LIBRESSL") {
cfg.cfg("libressl", None);
+ is_libressl = true;
} else if let Ok(version) = env::var("DEP_OPENSSL_VERSION") {
cfg.cfg(&format!("ossl{}", version), None);
}
@@ -41,12 +43,6 @@ fn main() {
}
}
- let has_cms_h = if let Ok(version) = env::var("DEP_OPENSSL_LIBRESSL_VERSION") {
- version != "261" && version != "262"
- } else {
- true
- };
-
cfg.header("openssl/comp.h")
.header("openssl/dh.h")
.header("openssl/ossl_typ.h")
@@ -64,7 +60,7 @@ fn main() {
.header("openssl/aes.h")
.header("openssl/ocsp.h");
- if has_cms_h {
+ if !is_libressl {
cfg.header("openssl/cms.h");
}
|