View | Details | Raw Unified | Return to bug 233389 | Differences between
and this patch

Collapse All | Expand All

(-)b/databases/puppetdb-cli/Makefile (-3 / +8 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	puppetdb-cli
3
PORTNAME=	puppetdb-cli
4
PORTVERSION=	1.2.5
4
PORTVERSION=	1.2.5
5
PORTREVISION=	3
5
PORTREVISION=	4
6
CATEGORIES=	databases
6
CATEGORIES=	databases
7
7
8
MAINTAINER=	puppet@FreeBSD.org
8
MAINTAINER=	puppet@FreeBSD.org
Lines 41-46 CARGO_CRATES= advapi32-sys-0.2.0 \ Link Here
41
		ktmw32-sys-0.1.0 \
41
		ktmw32-sys-0.1.0 \
42
		language-tags-0.2.2 \
42
		language-tags-0.2.2 \
43
		lazy_static-0.2.11 \
43
		lazy_static-0.2.11 \
44
		lazy_static-1.2.0 \
44
		libc-0.2.34 \
45
		libc-0.2.34 \
45
		log-0.3.8 \
46
		log-0.3.8 \
46
		matches-0.1.6 \
47
		matches-0.1.6 \
Lines 51-58 CARGO_CRATES= advapi32-sys-0.2.0 \ Link Here
51
		num-traits-0.1.41 \
52
		num-traits-0.1.41 \
52
		num_cpus-1.7.0 \
53
		num_cpus-1.7.0 \
53
		ole32-sys-0.2.0 \
54
		ole32-sys-0.2.0 \
54
		openssl-0.9.22 \
55
		openssl-0.9.24 \
55
		openssl-sys-0.9.22 \
56
		openssl-sys-0.9.39 \
56
		percent-encoding-1.0.1 \
57
		percent-encoding-1.0.1 \
57
		phf-0.7.21 \
58
		phf-0.7.21 \
58
		phf_codegen-0.7.21 \
59
		phf_codegen-0.7.21 \
Lines 97-102 PLIST_FILES= bin/puppet-db \ Link Here
97
		man/man8/puppetdb_conf.8.gz
98
		man/man8/puppetdb_conf.8.gz
98
99
99
post-patch:
100
post-patch:
101
	if [ ${SSL_DEFAULT} = openssl111 -o \( ${OPSYS} = FreeBSD -a ${OSREL:R} -ge 12 \) ]; then \
102
		${REINPLACE_CMD} -e 's/TLSv1_2_method/TLS_method/' \
103
			${WRKSRC}/cargo-crates/kitchensink-0.4.2/src/net.rs; \
104
	fi
100
	${REINPLACE_CMD} -e 's|/etc/puppetlabs|/usr/local/etc|' \
105
	${REINPLACE_CMD} -e 's|/etc/puppetlabs|/usr/local/etc|' \
101
		${WRKSRC}/cargo-crates/kitchensink-0.4.2/src/utils.rs \
106
		${WRKSRC}/cargo-crates/kitchensink-0.4.2/src/utils.rs \
102
		${WRKSRC}/man/puppetdb_conf.pod
107
		${WRKSRC}/man/puppetdb_conf.pod
(-)b/databases/puppetdb-cli/distinfo (-4 / +6 lines)
Lines 47-52 SHA256 (rust/crates/language-tags-0.2.2.tar.gz) = a91d884b6667cd606bb5a69aa0c99b Link Here
47
SIZE (rust/crates/language-tags-0.2.2.tar.gz) = 12754
47
SIZE (rust/crates/language-tags-0.2.2.tar.gz) = 12754
48
SHA256 (rust/crates/lazy_static-0.2.11.tar.gz) = 76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73
48
SHA256 (rust/crates/lazy_static-0.2.11.tar.gz) = 76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73
49
SIZE (rust/crates/lazy_static-0.2.11.tar.gz) = 12361
49
SIZE (rust/crates/lazy_static-0.2.11.tar.gz) = 12361
50
SHA256 (rust/crates/lazy_static-1.2.0.tar.gz) = a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1
51
SIZE (rust/crates/lazy_static-1.2.0.tar.gz) = 10840
50
SHA256 (rust/crates/libc-0.2.34.tar.gz) = 36fbc8a8929c632868295d0178dd8f63fc423fd7537ad0738372bd010b3ac9b0
52
SHA256 (rust/crates/libc-0.2.34.tar.gz) = 36fbc8a8929c632868295d0178dd8f63fc423fd7537ad0738372bd010b3ac9b0
51
SIZE (rust/crates/libc-0.2.34.tar.gz) = 304756
53
SIZE (rust/crates/libc-0.2.34.tar.gz) = 304756
52
SHA256 (rust/crates/log-0.3.8.tar.gz) = 880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b
54
SHA256 (rust/crates/log-0.3.8.tar.gz) = 880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b
Lines 67-76 SHA256 (rust/crates/num_cpus-1.7.0.tar.gz) = 514f0d73e64be53ff320680ca671b64fe3f Link Here
67
SIZE (rust/crates/num_cpus-1.7.0.tar.gz) = 9626
69
SIZE (rust/crates/num_cpus-1.7.0.tar.gz) = 9626
68
SHA256 (rust/crates/ole32-sys-0.2.0.tar.gz) = 5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c
70
SHA256 (rust/crates/ole32-sys-0.2.0.tar.gz) = 5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c
69
SIZE (rust/crates/ole32-sys-0.2.0.tar.gz) = 4227
71
SIZE (rust/crates/ole32-sys-0.2.0.tar.gz) = 4227
70
SHA256 (rust/crates/openssl-0.9.22.tar.gz) = 419ef26bb651d72b6c5a603bcc4e4856a362460e62352dfffa53de91d2e81181
72
SHA256 (rust/crates/openssl-0.9.24.tar.gz) = a3605c298474a3aa69de92d21139fb5e2a81688d308262359d85cdd0d12a7985
71
SIZE (rust/crates/openssl-0.9.22.tar.gz) = 144569
73
SIZE (rust/crates/openssl-0.9.24.tar.gz) = 149235
72
SHA256 (rust/crates/openssl-sys-0.9.22.tar.gz) = 5483bdc56756041ba6aa37c9cb59cc2219f012a2a1377d97ad35556ac6676ee7
74
SHA256 (rust/crates/openssl-sys-0.9.39.tar.gz) = 278c1ad40a89aa1e741a1eed089a2f60b18fab8089c3139b542140fc7d674106
73
SIZE (rust/crates/openssl-sys-0.9.22.tar.gz) = 37944
75
SIZE (rust/crates/openssl-sys-0.9.39.tar.gz) = 43147
74
SHA256 (rust/crates/percent-encoding-1.0.1.tar.gz) = 31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831
76
SHA256 (rust/crates/percent-encoding-1.0.1.tar.gz) = 31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831
75
SIZE (rust/crates/percent-encoding-1.0.1.tar.gz) = 10057
77
SIZE (rust/crates/percent-encoding-1.0.1.tar.gz) = 10057
76
SHA256 (rust/crates/phf-0.7.21.tar.gz) = cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc
78
SHA256 (rust/crates/phf-0.7.21.tar.gz) = cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc
(-)b/databases/puppetdb-cli/files/patch-openssl-1.1.1 (+1166 lines)
Added Link Here
1
https://github.com/sfackler/rust-openssl/commit/276577553501
2
3
--- Cargo.lock.orig	2018-09-28 19:47:40 UTC
4
+++ Cargo.lock
5
@@ -124,7 +124,7 @@ source = "registry+https://github.com/rust-lang/crates
6
 dependencies = [
7
  "antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
8
  "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)",
9
- "openssl 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)",
10
+ "openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)",
11
 ]
12
 
13
 [[package]]
14
@@ -162,8 +162,8 @@ dependencies = [
15
  "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
16
  "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
17
  "ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
18
- "openssl 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)",
19
- "openssl-sys 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)",
20
+ "openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)",
21
+ "openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)",
22
  "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
23
  "shell32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
24
  "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
25
@@ -192,6 +192,11 @@ version = "0.2.11"
26
 source = "registry+https://github.com/rust-lang/crates.io-index"
27
 
28
 [[package]]
29
+name = "lazy_static"
30
+version = "1.2.0"
31
+source = "registry+https://github.com/rust-lang/crates.io-index"
32
+
33
+[[package]]
34
 name = "libc"
35
 version = "0.2.34"
36
 source = "registry+https://github.com/rust-lang/crates.io-index"
37
@@ -270,19 +275,19 @@ dependencies = [
38
 
39
 [[package]]
40
 name = "openssl"
41
-version = "0.9.22"
42
+version = "0.9.24"
43
 source = "registry+https://github.com/rust-lang/crates.io-index"
44
 dependencies = [
45
  "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
46
  "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
47
- "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
48
+ "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
49
  "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
50
- "openssl-sys 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)",
51
+ "openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)",
52
 ]
53
 
54
 [[package]]
55
 name = "openssl-sys"
56
-version = "0.9.22"
57
+version = "0.9.39"
58
 source = "registry+https://github.com/rust-lang/crates.io-index"
59
 dependencies = [
60
  "cc 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
61
@@ -589,6 +594,7 @@ dependencies = [
62
 "checksum ktmw32-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f9313a869ff779ae08dd990b75a92dc06aa16d771f41305f7286649cd39a0ee"
63
 "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a"
64
 "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
65
+"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1"
66
 "checksum libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)" = "36fbc8a8929c632868295d0178dd8f63fc423fd7537ad0738372bd010b3ac9b0"
67
 "checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b"
68
 "checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
69
@@ -599,8 +605,8 @@ dependencies = [
70
 "checksum num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "cacfcab5eb48250ee7d0c7896b51a2c5eec99c1feea5f32025635f5ae4b00070"
71
 "checksum num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "514f0d73e64be53ff320680ca671b64fe3fb91da01e1ae2ddc99eb51d453b20d"
72
 "checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c"
73
-"checksum openssl 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)" = "419ef26bb651d72b6c5a603bcc4e4856a362460e62352dfffa53de91d2e81181"
74
-"checksum openssl-sys 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5483bdc56756041ba6aa37c9cb59cc2219f012a2a1377d97ad35556ac6676ee7"
75
+"checksum openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)" = "a3605c298474a3aa69de92d21139fb5e2a81688d308262359d85cdd0d12a7985"
76
+"checksum openssl-sys 0.9.39 (registry+https://github.com/rust-lang/crates.io-index)" = "278c1ad40a89aa1e741a1eed089a2f60b18fab8089c3139b542140fc7d674106"
77
 "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831"
78
 "checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc"
79
 "checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f"
80
--- cargo-crates/openssl-0.9.24/Cargo.toml.orig	1970-01-01 00:00:00 UTC
81
+++ cargo-crates/openssl-0.9.24/Cargo.toml
82
@@ -56,3 +56,4 @@ version = "0.2"
83
 v101 = []
84
 v102 = []
85
 v110 = []
86
+v111 = ["v110"]
87
--- cargo-crates/openssl-0.9.24/build.rs.orig	2018-02-12 17:30:05 UTC
88
+++ cargo-crates/openssl-0.9.24/build.rs
89
@@ -13,6 +13,10 @@ fn main() {
90
         Ok(ref v) if v == "110" => {
91
             println!("cargo:rustc-cfg=ossl110");
92
         }
93
+        Ok(ref v) if v == "111" => {
94
+            println!("cargo:rustc-cfg=ossl110");
95
+            println!("cargo:rustc-cfg=ossl111");
96
+        }
97
         _ => panic!("Unable to detect OpenSSL version"),
98
     }
99
 
100
--- cargo-crates/openssl-0.9.24/src/dh.rs.orig	2018-02-12 19:02:00 UTC
101
+++ cargo-crates/openssl-0.9.24/src/dh.rs
102
@@ -39,7 +39,7 @@ impl Dh {
103
     from_pem!(Dh, ffi::PEM_read_bio_DHparams);
104
     from_der!(Dh, ffi::d2i_DHparams);
105
 
106
-    /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
107
+    /// Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature.
108
     #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
109
     pub fn get_1024_160() -> Result<Dh, ErrorStack> {
110
         unsafe {
111
@@ -48,7 +48,7 @@ impl Dh {
112
         }
113
     }
114
 
115
-    /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
116
+    /// Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature.
117
     #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
118
     pub fn get_2048_224() -> Result<Dh, ErrorStack> {
119
         unsafe {
120
@@ -57,7 +57,7 @@ impl Dh {
121
         }
122
     }
123
 
124
-    /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
125
+    /// Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature.
126
     #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
127
     pub fn get_2048_256() -> Result<Dh, ErrorStack> {
128
         unsafe {
129
--- cargo-crates/openssl-0.9.24/src/pkcs5.rs.orig	2018-02-12 19:02:00 UTC
130
+++ cargo-crates/openssl-0.9.24/src/pkcs5.rs
131
@@ -59,9 +59,9 @@ pub fn bytes_to_key(
132
         ))?;
133
 
134
         let mut key = vec![0; len as usize];
135
-        let iv_ptr = iv.as_mut().map(|v| v.as_mut_ptr()).unwrap_or(
136
-            ptr::null_mut(),
137
-        );
138
+        let iv_ptr = iv.as_mut()
139
+            .map(|v| v.as_mut_ptr())
140
+            .unwrap_or(ptr::null_mut());
141
 
142
         cvt(ffi::EVP_BytesToKey(
143
             cipher,
144
@@ -107,7 +107,7 @@ pub fn pbkdf2_hmac(
145
 
146
 /// Derives a key from a password and salt using the scrypt algorithm.
147
 ///
148
-/// Requires the `v110` feature and OpenSSL 1.1.0.
149
+/// Requires OpenSSL 1.1.0 or 1.1.1 and the corresponding Cargo feature.
150
 #[cfg(all(feature = "v110", ossl110))]
151
 pub fn scrypt(
152
     pass: &[u8],
153
@@ -150,24 +150,9 @@ mod tests {
154
         assert_eq!(
155
             buf,
156
             &[
157
-                0x55_u8,
158
-                0xac_u8,
159
-                0x04_u8,
160
-                0x6e_u8,
161
-                0x56_u8,
162
-                0xe3_u8,
163
-                0x08_u8,
164
-                0x9f_u8,
165
-                0xec_u8,
166
-                0x16_u8,
167
-                0x91_u8,
168
-                0xc2_u8,
169
-                0x25_u8,
170
-                0x44_u8,
171
-                0xb6_u8,
172
-                0x05_u8,
173
-            ]
174
-                [..]
175
+                0x55_u8, 0xac_u8, 0x04_u8, 0x6e_u8, 0x56_u8, 0xe3_u8, 0x08_u8, 0x9f_u8, 0xec_u8,
176
+                0x16_u8, 0x91_u8, 0xc2_u8, 0x25_u8, 0x44_u8, 0xb6_u8, 0x05_u8,
177
+            ][..]
178
         );
179
 
180
         super::pbkdf2_hmac(
181
@@ -180,24 +165,9 @@ mod tests {
182
         assert_eq!(
183
             buf,
184
             &[
185
-                0x4d_u8,
186
-                0xdc_u8,
187
-                0xd8_u8,
188
-                0xf6_u8,
189
-                0x0b_u8,
190
-                0x98_u8,
191
-                0xbe_u8,
192
-                0x21_u8,
193
-                0x83_u8,
194
-                0x0c_u8,
195
-                0xee_u8,
196
-                0x5e_u8,
197
-                0xf2_u8,
198
-                0x27_u8,
199
-                0x01_u8,
200
-                0xf9_u8,
201
-            ]
202
-                [..]
203
+                0x4d_u8, 0xdc_u8, 0xd8_u8, 0xf6_u8, 0x0b_u8, 0x98_u8, 0xbe_u8, 0x21_u8, 0x83_u8,
204
+                0x0c_u8, 0xee_u8, 0x5e_u8, 0xf2_u8, 0x27_u8, 0x01_u8, 0xf9_u8,
205
+            ][..]
206
         );
207
     }
208
 
209
@@ -211,72 +181,15 @@ mod tests {
210
         assert_eq!(
211
             &buf[..],
212
             &[
213
-                0x73_u8,
214
-                0xde_u8,
215
-                0xcf_u8,
216
-                0xa5_u8,
217
-                0x8a_u8,
218
-                0xa2_u8,
219
-                0xe8_u8,
220
-                0x4f_u8,
221
-                0x94_u8,
222
-                0x77_u8,
223
-                0x1a_u8,
224
-                0x75_u8,
225
-                0x73_u8,
226
-                0x6b_u8,
227
-                0xb8_u8,
228
-                0x8b_u8,
229
-                0xd3_u8,
230
-                0xc7_u8,
231
-                0xb3_u8,
232
-                0x82_u8,
233
-                0x70_u8,
234
-                0xcf_u8,
235
-                0xb5_u8,
236
-                0x0c_u8,
237
-                0xb3_u8,
238
-                0x90_u8,
239
-                0xed_u8,
240
-                0x78_u8,
241
-                0xb3_u8,
242
-                0x05_u8,
243
-                0x65_u8,
244
-                0x6a_u8,
245
-                0xf8_u8,
246
-                0x14_u8,
247
-                0x8e_u8,
248
-                0x52_u8,
249
-                0x45_u8,
250
-                0x2b_u8,
251
-                0x22_u8,
252
-                0x16_u8,
253
-                0xb2_u8,
254
-                0xb8_u8,
255
-                0x09_u8,
256
-                0x8b_u8,
257
-                0x76_u8,
258
-                0x1f_u8,
259
-                0xc6_u8,
260
-                0x33_u8,
261
-                0x60_u8,
262
-                0x60_u8,
263
-                0xa0_u8,
264
-                0x9f_u8,
265
-                0x76_u8,
266
-                0x41_u8,
267
-                0x5e_u8,
268
-                0x9f_u8,
269
-                0x71_u8,
270
-                0xea_u8,
271
-                0x47_u8,
272
-                0xf9_u8,
273
-                0xe9_u8,
274
+                0x73_u8, 0xde_u8, 0xcf_u8, 0xa5_u8, 0x8a_u8, 0xa2_u8, 0xe8_u8, 0x4f_u8, 0x94_u8,
275
+                0x77_u8, 0x1a_u8, 0x75_u8, 0x73_u8, 0x6b_u8, 0xb8_u8, 0x8b_u8, 0xd3_u8, 0xc7_u8,
276
+                0xb3_u8, 0x82_u8, 0x70_u8, 0xcf_u8, 0xb5_u8, 0x0c_u8, 0xb3_u8, 0x90_u8, 0xed_u8,
277
+                0x78_u8, 0xb3_u8, 0x05_u8, 0x65_u8, 0x6a_u8, 0xf8_u8, 0x14_u8, 0x8e_u8, 0x52_u8,
278
+                0x45_u8, 0x2b_u8, 0x22_u8, 0x16_u8, 0xb2_u8, 0xb8_u8, 0x09_u8, 0x8b_u8, 0x76_u8,
279
+                0x1f_u8, 0xc6_u8, 0x33_u8, 0x60_u8, 0x60_u8, 0xa0_u8, 0x9f_u8, 0x76_u8, 0x41_u8,
280
+                0x5e_u8, 0x9f_u8, 0x71_u8, 0xea_u8, 0x47_u8, 0xf9_u8, 0xe9_u8, 0x06_u8, 0x43_u8,
281
                 0x06_u8,
282
-                0x43_u8,
283
-                0x06_u8,
284
-            ]
285
-                [..]
286
+            ][..]
287
         );
288
 
289
         super::pbkdf2_hmac(
290
@@ -289,72 +202,15 @@ mod tests {
291
         assert_eq!(
292
             &buf[..],
293
             &[
294
-                0x71_u8,
295
-                0xa0_u8,
296
-                0xec_u8,
297
-                0x84_u8,
298
-                0x2a_u8,
299
-                0xbd_u8,
300
-                0x5c_u8,
301
-                0x67_u8,
302
-                0x8b_u8,
303
-                0xcf_u8,
304
-                0xd1_u8,
305
-                0x45_u8,
306
-                0xf0_u8,
307
-                0x9d_u8,
308
-                0x83_u8,
309
-                0x52_u8,
310
-                0x2f_u8,
311
-                0x93_u8,
312
-                0x36_u8,
313
-                0x15_u8,
314
-                0x60_u8,
315
-                0x56_u8,
316
-                0x3c_u8,
317
-                0x4d_u8,
318
-                0x0d_u8,
319
-                0x63_u8,
320
-                0xb8_u8,
321
-                0x83_u8,
322
-                0x29_u8,
323
-                0x87_u8,
324
-                0x10_u8,
325
-                0x90_u8,
326
-                0xe7_u8,
327
-                0x66_u8,
328
-                0x04_u8,
329
-                0xa4_u8,
330
-                0x9a_u8,
331
-                0xf0_u8,
332
-                0x8f_u8,
333
-                0xe7_u8,
334
-                0xc9_u8,
335
-                0xf5_u8,
336
-                0x71_u8,
337
-                0x56_u8,
338
-                0xc8_u8,
339
-                0x79_u8,
340
-                0x09_u8,
341
-                0x96_u8,
342
-                0xb2_u8,
343
-                0x0f_u8,
344
-                0x06_u8,
345
-                0xbc_u8,
346
-                0x53_u8,
347
-                0x5e_u8,
348
-                0x5a_u8,
349
-                0xb5_u8,
350
-                0x44_u8,
351
-                0x0d_u8,
352
-                0xf7_u8,
353
-                0xe8_u8,
354
-                0x78_u8,
355
-                0x29_u8,
356
-                0x6f_u8,
357
+                0x71_u8, 0xa0_u8, 0xec_u8, 0x84_u8, 0x2a_u8, 0xbd_u8, 0x5c_u8, 0x67_u8, 0x8b_u8,
358
+                0xcf_u8, 0xd1_u8, 0x45_u8, 0xf0_u8, 0x9d_u8, 0x83_u8, 0x52_u8, 0x2f_u8, 0x93_u8,
359
+                0x36_u8, 0x15_u8, 0x60_u8, 0x56_u8, 0x3c_u8, 0x4d_u8, 0x0d_u8, 0x63_u8, 0xb8_u8,
360
+                0x83_u8, 0x29_u8, 0x87_u8, 0x10_u8, 0x90_u8, 0xe7_u8, 0x66_u8, 0x04_u8, 0xa4_u8,
361
+                0x9a_u8, 0xf0_u8, 0x8f_u8, 0xe7_u8, 0xc9_u8, 0xf5_u8, 0x71_u8, 0x56_u8, 0xc8_u8,
362
+                0x79_u8, 0x09_u8, 0x96_u8, 0xb2_u8, 0x0f_u8, 0x06_u8, 0xbc_u8, 0x53_u8, 0x5e_u8,
363
+                0x5a_u8, 0xb5_u8, 0x44_u8, 0x0d_u8, 0xf7_u8, 0xe8_u8, 0x78_u8, 0x29_u8, 0x6f_u8,
364
                 0xa7_u8,
365
-            ]
366
-                [..]
367
+            ][..]
368
         );
369
 
370
         super::pbkdf2_hmac(
371
@@ -367,72 +223,15 @@ mod tests {
372
         assert_eq!(
373
             &buf[..],
374
             &[
375
-                0x01_u8,
376
-                0x68_u8,
377
-                0x71_u8,
378
-                0xa4_u8,
379
-                0xc4_u8,
380
-                0xb7_u8,
381
-                0x5f_u8,
382
-                0x96_u8,
383
-                0x85_u8,
384
-                0x7f_u8,
385
-                0xd2_u8,
386
-                0xb9_u8,
387
-                0xf8_u8,
388
-                0xca_u8,
389
-                0x28_u8,
390
-                0x02_u8,
391
-                0x3b_u8,
392
-                0x30_u8,
393
-                0xee_u8,
394
-                0x2a_u8,
395
+                0x01_u8, 0x68_u8, 0x71_u8, 0xa4_u8, 0xc4_u8, 0xb7_u8, 0x5f_u8, 0x96_u8, 0x85_u8,
396
+                0x7f_u8, 0xd2_u8, 0xb9_u8, 0xf8_u8, 0xca_u8, 0x28_u8, 0x02_u8, 0x3b_u8, 0x30_u8,
397
+                0xee_u8, 0x2a_u8, 0x39_u8, 0xf5_u8, 0xad_u8, 0xca_u8, 0xc8_u8, 0xc9_u8, 0x37_u8,
398
+                0x5f_u8, 0x9b_u8, 0xda_u8, 0x1c_u8, 0xcd_u8, 0x1b_u8, 0x6f_u8, 0x0b_u8, 0x2f_u8,
399
+                0xc3_u8, 0xad_u8, 0xda_u8, 0x50_u8, 0x54_u8, 0x12_u8, 0xe7_u8, 0x9d_u8, 0x89_u8,
400
+                0x00_u8, 0x56_u8, 0xc6_u8, 0x2e_u8, 0x52_u8, 0x4c_u8, 0x7d_u8, 0x51_u8, 0x15_u8,
401
+                0x4b_u8, 0x1a_u8, 0x85_u8, 0x34_u8, 0x57_u8, 0x5b_u8, 0xd0_u8, 0x2d_u8, 0xee_u8,
402
                 0x39_u8,
403
-                0xf5_u8,
404
-                0xad_u8,
405
-                0xca_u8,
406
-                0xc8_u8,
407
-                0xc9_u8,
408
-                0x37_u8,
409
-                0x5f_u8,
410
-                0x9b_u8,
411
-                0xda_u8,
412
-                0x1c_u8,
413
-                0xcd_u8,
414
-                0x1b_u8,
415
-                0x6f_u8,
416
-                0x0b_u8,
417
-                0x2f_u8,
418
-                0xc3_u8,
419
-                0xad_u8,
420
-                0xda_u8,
421
-                0x50_u8,
422
-                0x54_u8,
423
-                0x12_u8,
424
-                0xe7_u8,
425
-                0x9d_u8,
426
-                0x89_u8,
427
-                0x00_u8,
428
-                0x56_u8,
429
-                0xc6_u8,
430
-                0x2e_u8,
431
-                0x52_u8,
432
-                0x4c_u8,
433
-                0x7d_u8,
434
-                0x51_u8,
435
-                0x15_u8,
436
-                0x4b_u8,
437
-                0x1a_u8,
438
-                0x85_u8,
439
-                0x34_u8,
440
-                0x57_u8,
441
-                0x5b_u8,
442
-                0xd0_u8,
443
-                0x2d_u8,
444
-                0xee_u8,
445
-                0x39_u8,
446
-            ]
447
-                [..]
448
+            ][..]
449
         );
450
     }
451
 
452
@@ -441,93 +240,19 @@ mod tests {
453
         let salt = [16_u8, 34_u8, 19_u8, 23_u8, 141_u8, 4_u8, 207_u8, 221_u8];
454
 
455
         let data = [
456
-            143_u8,
457
-            210_u8,
458
-            75_u8,
459
-            63_u8,
460
-            214_u8,
461
-            179_u8,
462
-            155_u8,
463
-            241_u8,
464
-            242_u8,
465
-            31_u8,
466
-            154_u8,
467
-            56_u8,
468
-            198_u8,
469
-            145_u8,
470
-            192_u8,
471
-            64_u8,
472
-            2_u8,
473
-            245_u8,
474
-            167_u8,
475
-            220_u8,
476
-            55_u8,
477
-            119_u8,
478
-            233_u8,
479
-            136_u8,
480
-            139_u8,
481
-            27_u8,
482
-            71_u8,
483
-            242_u8,
484
-            119_u8,
485
-            175_u8,
486
-            65_u8,
487
-            207_u8,
488
+            143_u8, 210_u8, 75_u8, 63_u8, 214_u8, 179_u8, 155_u8, 241_u8, 242_u8, 31_u8, 154_u8,
489
+            56_u8, 198_u8, 145_u8, 192_u8, 64_u8, 2_u8, 245_u8, 167_u8, 220_u8, 55_u8, 119_u8,
490
+            233_u8, 136_u8, 139_u8, 27_u8, 71_u8, 242_u8, 119_u8, 175_u8, 65_u8, 207_u8,
491
         ];
492
 
493
-
494
-
495
         let expected_key = vec![
496
-            249_u8,
497
-            115_u8,
498
-            114_u8,
499
-            97_u8,
500
-            32_u8,
501
-            213_u8,
502
-            165_u8,
503
-            146_u8,
504
-            58_u8,
505
-            87_u8,
506
-            234_u8,
507
-            3_u8,
508
-            43_u8,
509
-            250_u8,
510
-            97_u8,
511
-            114_u8,
512
-            26_u8,
513
-            98_u8,
514
-            245_u8,
515
-            246_u8,
516
-            238_u8,
517
-            177_u8,
518
-            229_u8,
519
-            161_u8,
520
-            183_u8,
521
-            224_u8,
522
-            174_u8,
523
-            3_u8,
524
-            6_u8,
525
-            244_u8,
526
-            236_u8,
527
-            255_u8,
528
+            249_u8, 115_u8, 114_u8, 97_u8, 32_u8, 213_u8, 165_u8, 146_u8, 58_u8, 87_u8, 234_u8,
529
+            3_u8, 43_u8, 250_u8, 97_u8, 114_u8, 26_u8, 98_u8, 245_u8, 246_u8, 238_u8, 177_u8,
530
+            229_u8, 161_u8, 183_u8, 224_u8, 174_u8, 3_u8, 6_u8, 244_u8, 236_u8, 255_u8,
531
         ];
532
         let expected_iv = vec![
533
-            4_u8,
534
-            223_u8,
535
-            153_u8,
536
-            219_u8,
537
-            28_u8,
538
-            142_u8,
539
-            234_u8,
540
-            68_u8,
541
-            227_u8,
542
-            69_u8,
543
-            98_u8,
544
-            107_u8,
545
-            208_u8,
546
-            14_u8,
547
-            236_u8,
548
-            60_u8,
549
+            4_u8, 223_u8, 153_u8, 219_u8, 28_u8, 142_u8, 234_u8, 68_u8, 227_u8, 69_u8, 98_u8,
550
+            107_u8, 208_u8, 14_u8, 236_u8, 60_u8,
551
         ];
552
 
553
         assert_eq!(
554
@@ -552,8 +277,9 @@ mod tests {
555
 
556
         let pass = "pleaseletmein";
557
         let salt = "SodiumChloride";
558
-        let expected = "7023bdcb3afd7348461c06cd81fd38ebfda8fbba904f8e3ea9b543f6545da1f2d5432955613\
559
-                        f0fcf62d49705242a9af9e61e85dc0d651e40dfcf017b45575887";
560
+        let expected =
561
+            "7023bdcb3afd7348461c06cd81fd38ebfda8fbba904f8e3ea9b543f6545da1f2d5432955613\
562
+             f0fcf62d49705242a9af9e61e85dc0d651e40dfcf017b45575887";
563
 
564
         let mut actual = [0; 64];
565
         super::scrypt(
566
--- cargo-crates/openssl-0.9.24/src/ssl/connector.rs.orig	2018-02-12 19:02:00 UTC
567
+++ cargo-crates/openssl-0.9.24/src/ssl/connector.rs
568
@@ -3,6 +3,8 @@ use std::ops::{Deref, DerefMut};
569
 
570
 use dh::Dh;
571
 use error::ErrorStack;
572
+#[cfg(ossl111)]
573
+use ssl::SslOption;
574
 use ssl::{self, HandshakeError, Ssl, SslRef, SslContext, SslContextBuilder, SslMethod, SslStream,
575
           SSL_VERIFY_PEER};
576
 use pkey::PKeyRef;
577
@@ -271,6 +273,12 @@ impl SslAcceptorBuilder {
578
     /// Like `mozilla_intermediate`, but does not load the certificate chain and private key.
579
     pub fn mozilla_intermediate_raw(method: SslMethod) -> Result<SslAcceptorBuilder, ErrorStack> {
580
         let mut ctx = ctx(method)?;
581
+        #[cfg(ossl111)]
582
+        {
583
+            ctx.set_options(SslOption {
584
+                bits: ::ffi::SSL_OP_NO_TLSv1_3,
585
+            });
586
+        }
587
         let dh = Dh::from_pem(DHPARAM_PEM.as_bytes())?;
588
         ctx.set_tmp_dh(&dh)?;
589
         setup_curves(&mut ctx)?;
590
@@ -292,6 +300,13 @@ impl SslAcceptorBuilder {
591
     /// Like `mozilla_modern`, but does not load the certificate chain and private key.
592
     pub fn mozilla_modern_raw(method: SslMethod) -> Result<SslAcceptorBuilder, ErrorStack> {
593
         let mut ctx = ctx(method)?;
594
+        ctx.set_options(ssl::SSL_OP_NO_TLSV1 | ssl::SSL_OP_NO_TLSV1_1);
595
+        #[cfg(ossl111)]
596
+        {
597
+            ctx.set_options(SslOption {
598
+                bits: ::ffi::SSL_OP_NO_TLSv1_3,
599
+            });
600
+        }
601
         setup_curves(&mut ctx)?;
602
         ctx.set_cipher_list(
603
             "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:\
604
--- cargo-crates/openssl-0.9.24/src/ssl/mod.rs.orig	2018-02-12 19:02:00 UTC
605
+++ cargo-crates/openssl-0.9.24/src/ssl/mod.rs
606
@@ -211,14 +211,20 @@ bitflags! {
607
         /// Disables the use of TLSv1.2.
608
         const SSL_OP_NO_TLSV1_2 = ffi::SSL_OP_NO_TLSv1_2;
609
 
610
+        /// Disables the use of TLSv1.3.
611
+        ///
612
+        /// Requires the `v111` feature and OpenSSL 1.1.1.
613
+        #[cfg(all(feature = "v111", ossl111))]
614
+        const NO_TLSV1_3 = ffi::SSL_OP_NO_TLSv1_3;
615
+
616
         /// Disables the use of DTLSv1.0
617
         ///
618
-        /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
619
+        /// Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature.
620
         #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
621
         const SSL_OP_NO_DTLSV1 = ffi::SSL_OP_NO_DTLSv1;
622
 
623
         /// Disables the use of DTLSv1.2.
624
-        /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
625
+        /// Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature.
626
         #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
627
         const SSL_OP_NO_DTLSV1_2 = ffi::SSL_OP_NO_DTLSv1_2;
628
 
629
@@ -226,7 +232,7 @@ bitflags! {
630
         ///
631
         /// This can be used as a mask when whitelisting protocol versions.
632
         ///
633
-        /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
634
+        /// Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature.
635
         ///
636
         /// # Examples
637
         ///
638
@@ -573,7 +579,7 @@ impl SslContextBuilder {
639
 
640
     /// Sets a custom certificate store for verifying peer certificates.
641
     ///
642
-    /// Requires the `v102` feature and OpenSSL 1.0.2, or the `v110` feature and OpenSSL 1.1.0.
643
+    /// Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature.
644
     ///
645
     /// This corresponds to [`SSL_CTX_set0_verify_cert_store`].
646
     ///
647
@@ -582,8 +588,7 @@ impl SslContextBuilder {
648
     pub fn set_verify_cert_store(&mut self, cert_store: X509Store) -> Result<(), ErrorStack> {
649
         unsafe {
650
             let ptr = cert_store.as_ptr();
651
-            cvt(ffi::SSL_CTX_set0_verify_cert_store(self.as_ptr(), ptr)
652
-                as c_int)?;
653
+            cvt(ffi::SSL_CTX_set0_verify_cert_store(self.as_ptr(), ptr) as c_int)?;
654
             mem::forget(cert_store);
655
 
656
             Ok(())
657
@@ -613,8 +618,8 @@ impl SslContextBuilder {
658
     /// [`SSL_CTX_set_mode`]: https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_mode.html
659
     pub fn set_mode(&mut self, mode: SslMode) -> SslMode {
660
         unsafe {
661
-            let mode = ffi::SSL_CTX_set_mode(self.as_ptr(), mode.bits());
662
-            SslMode::from_bits(mode).unwrap()
663
+            let bits = ffi::SSL_CTX_set_mode(self.as_ptr(), mode.bits());
664
+            SslMode { bits }
665
         }
666
     }
667
 
668
@@ -657,11 +662,7 @@ impl SslContextBuilder {
669
     ///
670
     /// This corresponds to `SSL_CTX_set_tmp_ecdh`.
671
     pub fn set_tmp_ecdh(&mut self, key: &EcKeyRef) -> Result<(), ErrorStack> {
672
-        unsafe {
673
-            cvt(ffi::SSL_CTX_set_tmp_ecdh(self.as_ptr(), key.as_ptr())
674
-                as c_int)
675
-                .map(|_| ())
676
-        }
677
+        unsafe { cvt(ffi::SSL_CTX_set_tmp_ecdh(self.as_ptr(), key.as_ptr()) as c_int).map(|_| ()) }
678
     }
679
 
680
     /// Sets the callback which will generate parameters to be used during ephemeral elliptic curve
681
@@ -901,8 +902,8 @@ impl SslContextBuilder {
682
     ///
683
     /// [`SSL_CTX_set_options`]: https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html
684
     pub fn set_options(&mut self, option: SslOption) -> SslOption {
685
-        let ret = unsafe { compat::SSL_CTX_set_options(self.as_ptr(), option.bits()) };
686
-        SslOption::from_bits(ret).unwrap()
687
+        let bits = unsafe { compat::SSL_CTX_set_options(self.as_ptr(), option.bits()) };
688
+        SslOption { bits }
689
     }
690
 
691
     /// Returns the options used by the context.
692
@@ -911,8 +912,8 @@ impl SslContextBuilder {
693
     ///
694
     /// [`SSL_CTX_get_options`]: https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html
695
     pub fn options(&self) -> SslOption {
696
-        let ret = unsafe { compat::SSL_CTX_get_options(self.as_ptr()) };
697
-        SslOption::from_bits(ret).unwrap()
698
+        let bits = unsafe { compat::SSL_CTX_get_options(self.as_ptr()) };
699
+        SslOption { bits }
700
     }
701
 
702
     /// Clears the options used by the context, returning the old set.
703
@@ -921,8 +922,8 @@ impl SslContextBuilder {
704
     ///
705
     /// [`SSL_CTX_clear_options`]: https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html
706
     pub fn clear_options(&mut self, option: SslOption) -> SslOption {
707
-        let ret = unsafe { compat::SSL_CTX_clear_options(self.as_ptr(), option.bits()) };
708
-        SslOption::from_bits(ret).unwrap()
709
+        let bits = unsafe { compat::SSL_CTX_clear_options(self.as_ptr(), option.bits()) };
710
+        SslOption { bits }
711
     }
712
 
713
     /// Set the protocols to be used during Next Protocol Negotiation (the protocols
714
@@ -968,7 +969,7 @@ impl SslContextBuilder {
715
     ///
716
     /// Note that ordering of the protocols controls the priority with which they are chosen.
717
     ///
718
-    /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
719
+    /// Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature.
720
     // FIXME overhaul
721
     #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
722
     pub fn set_alpn_protocols(&mut self, protocols: &[&[u8]]) -> Result<(), ErrorStack> {
723
@@ -1059,9 +1060,7 @@ impl SslContextBuilder {
724
                 Box::into_raw(callback) as *mut c_void,
725
             );
726
             let f: unsafe extern "C" fn(_, _) -> _ = raw_tlsext_status::<F>;
727
-            cvt(ffi::SSL_CTX_set_tlsext_status_cb(self.as_ptr(), Some(f))
728
-                as c_int)
729
-                .map(|_| ())
730
+            cvt(ffi::SSL_CTX_set_tlsext_status_cb(self.as_ptr(), Some(f)) as c_int).map(|_| ())
731
         }
732
     }
733
 
734
@@ -1185,7 +1184,7 @@ impl SslContext {
735
 impl SslContextRef {
736
     /// Returns the certificate associated with this `SslContext`, if present.
737
     ///
738
-    /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
739
+    /// Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature.
740
     ///
741
     /// This corresponds to [`SSL_CTX_get0_certificate`].
742
     ///
743
@@ -1204,7 +1203,7 @@ impl SslContextRef {
744
 
745
     /// Returns the private key associated with this `SslContext`, if present.
746
     ///
747
-    /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
748
+    /// Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature.
749
     ///
750
     /// This corresponds to [`SSL_CTX_get0_privatekey`].
751
     ///
752
@@ -1789,7 +1788,7 @@ impl SslRef {
753
     /// The protocol's name is returned is an opaque sequence of bytes. It is up to the client
754
     /// to interpret it.
755
     ///
756
-    /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
757
+    /// Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature.
758
     ///
759
     /// This corresponds to [`SSL_get0_alpn_selected`].
760
     ///
761
@@ -1889,7 +1888,7 @@ impl SslRef {
762
 
763
     /// Returns a mutable reference to the X509 verification configuration.
764
     ///
765
-    /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or 1.1.0.
766
+    /// Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature.
767
     ///
768
     /// This corresponds to [`SSL_get0_param`].
769
     ///
770
--- cargo-crates/openssl-0.9.24/src/ssl/tests/mod.rs.orig	2018-02-12 19:02:00 UTC
771
+++ cargo-crates/openssl-0.9.24/src/ssl/tests/mod.rs
772
@@ -1084,7 +1084,7 @@ fn connector_no_hostname_can_disable_verify() {
773
 
774
 #[test]
775
 fn connector_client_server_mozilla_intermediate() {
776
-    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
777
+    let listener = TcpListener::bind("127.0.0.1:1234").unwrap();
778
     let port = listener.local_addr().unwrap().port();
779
 
780
     let t = thread::spawn(move || {
781
@@ -1231,6 +1231,13 @@ fn tmp_dh_callback() {
782
 
783
     let stream = TcpStream::connect(("127.0.0.1", port)).unwrap();
784
     let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
785
+    // TLS 1.3 has no DH suites, and openssl isn't happy if the max version has no suites :(
786
+    #[cfg(ossl111)]
787
+    {
788
+        ctx.set_options(super::SslOption {
789
+            bits: ::ffi::SSL_OP_NO_TLSv1_3,
790
+        });
791
+    }
792
     ctx.set_cipher_list("EDH").unwrap();
793
     let ssl = Ssl::new(&ctx.build()).unwrap();
794
     ssl.connect(stream).unwrap();
795
@@ -1298,6 +1305,13 @@ fn tmp_dh_callback_ssl() {
796
 
797
     let stream = TcpStream::connect(("127.0.0.1", port)).unwrap();
798
     let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
799
+    // TLS 1.3 has no DH suites, and openssl isn't happy if the max version has no suites :(
800
+    #[cfg(ossl111)]
801
+    {
802
+        ctx.set_options(super::SslOption {
803
+            bits: ::ffi::SSL_OP_NO_TLSv1_3,
804
+        });
805
+    }
806
     ctx.set_cipher_list("EDH").unwrap();
807
     let ssl = Ssl::new(&ctx.build()).unwrap();
808
     ssl.connect(stream).unwrap();
809
--- cargo-crates/openssl-0.9.24/src/symm.rs.orig	2018-02-12 19:02:00 UTC
810
+++ cargo-crates/openssl-0.9.24/src/symm.rs
811
@@ -137,13 +137,13 @@ impl Cipher {
812
         unsafe { Cipher(ffi::EVP_rc4()) }
813
     }
814
 
815
-    /// Requires the `v110` feature and OpenSSL 1.1.0.
816
+    /// Requires OpenSSL 1.1.0 or 1.1.1 and the corresponding Cargo feature.
817
     #[cfg(all(ossl110, feature = "v110"))]
818
     pub fn chacha20() -> Cipher {
819
         unsafe { Cipher(ffi::EVP_chacha20()) }
820
     }
821
 
822
-    /// Requires the `v110` feature and OpenSSL 1.1.0.
823
+    /// Requires OpenSSL 1.1.0 or 1.1.1 and the corresponding Cargo feature.
824
     #[cfg(all(ossl110, feature = "v110"))]
825
     pub fn chacha20_poly1305() -> Cipher {
826
         unsafe { Cipher(ffi::EVP_chacha20_poly1305()) }
827
@@ -167,7 +167,11 @@ impl Cipher {
828
     pub fn iv_len(&self) -> Option<usize> {
829
         unsafe {
830
             let len = EVP_CIPHER_iv_length(self.0) as usize;
831
-            if len == 0 { None } else { Some(len) }
832
+            if len == 0 {
833
+                None
834
+            } else {
835
+                Some(len)
836
+            }
837
         }
838
     }
839
 
840
@@ -590,7 +594,7 @@ pub fn decrypt_aead(
841
 }
842
 
843
 #[cfg(ossl110)]
844
-use ffi::{EVP_CIPHER_iv_length, EVP_CIPHER_block_size, EVP_CIPHER_key_length};
845
+use ffi::{EVP_CIPHER_block_size, EVP_CIPHER_iv_length, EVP_CIPHER_key_length};
846
 
847
 #[cfg(ossl10x)]
848
 #[allow(bad_style)]
849
@@ -623,74 +627,17 @@ mod tests {
850
     #[test]
851
     fn test_aes_256_ecb() {
852
         let k0 = [
853
-            0x00u8,
854
-            0x01u8,
855
-            0x02u8,
856
-            0x03u8,
857
-            0x04u8,
858
-            0x05u8,
859
-            0x06u8,
860
-            0x07u8,
861
-            0x08u8,
862
-            0x09u8,
863
-            0x0au8,
864
-            0x0bu8,
865
-            0x0cu8,
866
-            0x0du8,
867
-            0x0eu8,
868
-            0x0fu8,
869
-            0x10u8,
870
-            0x11u8,
871
-            0x12u8,
872
-            0x13u8,
873
-            0x14u8,
874
-            0x15u8,
875
-            0x16u8,
876
-            0x17u8,
877
-            0x18u8,
878
-            0x19u8,
879
-            0x1au8,
880
-            0x1bu8,
881
-            0x1cu8,
882
-            0x1du8,
883
-            0x1eu8,
884
-            0x1fu8,
885
+            0x00u8, 0x01u8, 0x02u8, 0x03u8, 0x04u8, 0x05u8, 0x06u8, 0x07u8, 0x08u8, 0x09u8, 0x0au8,
886
+            0x0bu8, 0x0cu8, 0x0du8, 0x0eu8, 0x0fu8, 0x10u8, 0x11u8, 0x12u8, 0x13u8, 0x14u8, 0x15u8,
887
+            0x16u8, 0x17u8, 0x18u8, 0x19u8, 0x1au8, 0x1bu8, 0x1cu8, 0x1du8, 0x1eu8, 0x1fu8,
888
         ];
889
         let p0 = [
890
-            0x00u8,
891
-            0x11u8,
892
-            0x22u8,
893
-            0x33u8,
894
-            0x44u8,
895
-            0x55u8,
896
-            0x66u8,
897
-            0x77u8,
898
-            0x88u8,
899
-            0x99u8,
900
-            0xaau8,
901
-            0xbbu8,
902
-            0xccu8,
903
-            0xddu8,
904
-            0xeeu8,
905
-            0xffu8,
906
+            0x00u8, 0x11u8, 0x22u8, 0x33u8, 0x44u8, 0x55u8, 0x66u8, 0x77u8, 0x88u8, 0x99u8, 0xaau8,
907
+            0xbbu8, 0xccu8, 0xddu8, 0xeeu8, 0xffu8,
908
         ];
909
         let c0 = [
910
-            0x8eu8,
911
-            0xa2u8,
912
-            0xb7u8,
913
-            0xcau8,
914
-            0x51u8,
915
-            0x67u8,
916
-            0x45u8,
917
-            0xbfu8,
918
-            0xeau8,
919
-            0xfcu8,
920
-            0x49u8,
921
-            0x90u8,
922
-            0x4bu8,
923
-            0x49u8,
924
-            0x60u8,
925
-            0x89u8,
926
+            0x8eu8, 0xa2u8, 0xb7u8, 0xcau8, 0x51u8, 0x67u8, 0x45u8, 0xbfu8, 0xeau8, 0xfcu8, 0x49u8,
927
+            0x90u8, 0x4bu8, 0x49u8, 0x60u8, 0x89u8,
928
         ];
929
         let mut c = super::Crypter::new(
930
             super::Cipher::aes_256_ecb(),
931
@@ -722,74 +669,17 @@ mod tests {
932
     #[test]
933
     fn test_aes_256_cbc_decrypt() {
934
         let iv = [
935
-            4_u8,
936
-            223_u8,
937
-            153_u8,
938
-            219_u8,
939
-            28_u8,
940
-            142_u8,
941
-            234_u8,
942
-            68_u8,
943
-            227_u8,
944
-            69_u8,
945
-            98_u8,
946
-            107_u8,
947
-            208_u8,
948
-            14_u8,
949
-            236_u8,
950
-            60_u8,
951
+            4_u8, 223_u8, 153_u8, 219_u8, 28_u8, 142_u8, 234_u8, 68_u8, 227_u8, 69_u8, 98_u8,
952
+            107_u8, 208_u8, 14_u8, 236_u8, 60_u8,
953
         ];
954
         let data = [
955
-            143_u8,
956
-            210_u8,
957
-            75_u8,
958
-            63_u8,
959
-            214_u8,
960
-            179_u8,
961
-            155_u8,
962
-            241_u8,
963
-            242_u8,
964
-            31_u8,
965
-            154_u8,
966
-            56_u8,
967
-            198_u8,
968
-            145_u8,
969
-            192_u8,
970
-            64_u8,
971
-            2_u8,
972
-            245_u8,
973
-            167_u8,
974
-            220_u8,
975
-            55_u8,
976
-            119_u8,
977
-            233_u8,
978
-            136_u8,
979
-            139_u8,
980
-            27_u8,
981
-            71_u8,
982
-            242_u8,
983
-            119_u8,
984
-            175_u8,
985
-            65_u8,
986
-            207_u8,
987
+            143_u8, 210_u8, 75_u8, 63_u8, 214_u8, 179_u8, 155_u8, 241_u8, 242_u8, 31_u8, 154_u8,
988
+            56_u8, 198_u8, 145_u8, 192_u8, 64_u8, 2_u8, 245_u8, 167_u8, 220_u8, 55_u8, 119_u8,
989
+            233_u8, 136_u8, 139_u8, 27_u8, 71_u8, 242_u8, 119_u8, 175_u8, 65_u8, 207_u8,
990
         ];
991
         let ciphered_data = [
992
-            0x4a_u8,
993
-            0x2e_u8,
994
-            0xe5_u8,
995
-            0x6_u8,
996
-            0xbf_u8,
997
-            0xcf_u8,
998
-            0xf2_u8,
999
-            0xd7_u8,
1000
-            0xea_u8,
1001
-            0x2d_u8,
1002
-            0xb1_u8,
1003
-            0x85_u8,
1004
-            0x6c_u8,
1005
-            0x93_u8,
1006
-            0x65_u8,
1007
-            0x6f_u8,
1008
+            0x4a_u8, 0x2e_u8, 0xe5_u8, 0x6_u8, 0xbf_u8, 0xcf_u8, 0xf2_u8, 0xd7_u8, 0xea_u8,
1009
+            0x2d_u8, 0xb1_u8, 0x85_u8, 0x6c_u8, 0x93_u8, 0x65_u8, 0x6f_u8,
1010
         ];
1011
         let mut cr = super::Crypter::new(
1012
             super::Cipher::aes_256_cbc(),
1013
@@ -864,7 +754,6 @@ mod tests {
1014
 
1015
     #[test]
1016
     fn test_rc4() {
1017
-
1018
         let pt = "0000000000000000000000000000000000000000000000000000000000000000000000000000";
1019
         let ct = "A68686B04D686AA107BD8D4CAB191A3EEC0A6294BC78B60F65C25CB47BD7BB3A48EFC4D26BE4";
1020
         let key = "97CD440324DA5FD1F7955C1C13B6B466";
1021
@@ -890,7 +779,6 @@ mod tests {
1022
 
1023
     #[test]
1024
     fn test_aes128_ctr() {
1025
-
1026
         let pt = "6BC1BEE22E409F96E93D7E117393172AAE2D8A571E03AC9C9EB76FAC45AF8E5130C81C46A35CE411\
1027
                   E5FBC1191A0A52EFF69F2445DF4F9B17AD2B417BE66C3710";
1028
         let ct = "874D6191B620E3261BEF6864990DB6CE9806F66B7970FDFF8617187BB9FFFDFF5AE4DF3EDBD5D35E\
1029
@@ -915,7 +803,6 @@ mod tests {
1030
 
1031
     #[test]
1032
     fn test_aes128_cfb128() {
1033
-
1034
         let pt = "6bc1bee22e409f96e93d7e117393172a";
1035
         let ct = "3b3fd92eb72dad20333449f8e83cfb4a";
1036
         let key = "2b7e151628aed2a6abf7158809cf4f3c";
1037
@@ -926,7 +813,6 @@ mod tests {
1038
 
1039
     #[test]
1040
     fn test_aes128_cfb8() {
1041
-
1042
         let pt = "6bc1bee22e409f96e93d7e117393172aae2d";
1043
         let ct = "3b79424c9c0dd436bace9e0ed4586a4f32b9";
1044
         let key = "2b7e151628aed2a6abf7158809cf4f3c";
1045
@@ -937,7 +823,6 @@ mod tests {
1046
 
1047
     #[test]
1048
     fn test_aes256_cfb1() {
1049
-
1050
         let pt = "6bc1";
1051
         let ct = "9029";
1052
         let key = "603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4";
1053
@@ -948,7 +833,6 @@ mod tests {
1054
 
1055
     #[test]
1056
     fn test_aes256_cfb128() {
1057
-
1058
         let pt = "6bc1bee22e409f96e93d7e117393172a";
1059
         let ct = "dc7e84bfda79164b7ecd8486985d3860";
1060
         let key = "603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4";
1061
@@ -959,7 +843,6 @@ mod tests {
1062
 
1063
     #[test]
1064
     fn test_aes256_cfb8() {
1065
-
1066
         let pt = "6bc1bee22e409f96e93d7e117393172aae2d";
1067
         let ct = "dc1f1a8520a64db55fcc8ac554844e889700";
1068
         let key = "603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4";
1069
@@ -982,7 +865,6 @@ mod tests {
1070
 
1071
     #[test]
1072
     fn test_bf_ecb() {
1073
-
1074
         let pt = "5CD54CA83DEF57DA";
1075
         let ct = "B1B8CC0B250F09A0";
1076
         let key = "0131D9619DC1376E";
1077
@@ -993,7 +875,6 @@ mod tests {
1078
 
1079
     #[test]
1080
     fn test_bf_cfb64() {
1081
-
1082
         let pt = "37363534333231204E6F77206973207468652074696D6520666F722000";
1083
         let ct = "E73214A2822139CAF26ECF6D2EB9E76E3DA3DE04D1517200519D57A6C3";
1084
         let key = "0123456789ABCDEFF0E1D2C3B4A59687";
1085
@@ -1004,7 +885,6 @@ mod tests {
1086
 
1087
     #[test]
1088
     fn test_bf_ofb() {
1089
-
1090
         let pt = "37363534333231204E6F77206973207468652074696D6520666F722000";
1091
         let ct = "E73214A2822139CA62B343CC5B65587310DD908D0C241B2263C2CF80DA";
1092
         let key = "0123456789ABCDEFF0E1D2C3B4A59687";
1093
@@ -1015,7 +895,6 @@ mod tests {
1094
 
1095
     #[test]
1096
     fn test_des_cbc() {
1097
-
1098
         let pt = "54686973206973206120746573742e";
1099
         let ct = "6f2867cfefda048a4046ef7e556c7132";
1100
         let key = "7cb66337f3d3c0fe";
1101
@@ -1026,7 +905,6 @@ mod tests {
1102
 
1103
     #[test]
1104
     fn test_des_ecb() {
1105
-
1106
         let pt = "54686973206973206120746573742e";
1107
         let ct = "0050ab8aecec758843fe157b4dde938c";
1108
         let key = "7cb66337f3d3c0fe";
1109
@@ -1080,10 +958,12 @@ mod tests {
1110
     fn test_chacha20() {
1111
         let key = "0000000000000000000000000000000000000000000000000000000000000000";
1112
         let iv = "00000000000000000000000000000000";
1113
-        let pt = "000000000000000000000000000000000000000000000000000000000000000000000000000000000\
1114
-                  00000000000000000000000000000000000000000000000";
1115
-        let ct = "76b8e0ada0f13d90405d6ae55386bd28bdd219b8a08ded1aa836efcc8b770dc7da41597c5157488d7\
1116
-                  724e03fb8d84a376a43b8f41518a11cc387b669b2ee6586";
1117
+        let pt =
1118
+            "000000000000000000000000000000000000000000000000000000000000000000000000000000000\
1119
+             00000000000000000000000000000000000000000000000";
1120
+        let ct =
1121
+            "76b8e0ada0f13d90405d6ae55386bd28bdd219b8a08ded1aa836efcc8b770dc7da41597c5157488d7\
1122
+             724e03fb8d84a376a43b8f41518a11cc387b669b2ee6586";
1123
 
1124
         cipher_test(Cipher::chacha20(), pt, ct, key, iv);
1125
     }
1126
@@ -1094,12 +974,14 @@ mod tests {
1127
         let key = "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f";
1128
         let iv = "070000004041424344454647";
1129
         let aad = "50515253c0c1c2c3c4c5c6c7";
1130
-        let pt = "4c616469657320616e642047656e746c656d656e206f662074686520636c617373206f66202739393\
1131
-                  a204966204920636f756c64206f6666657220796f75206f6e6c79206f6e652074697020666f722074\
1132
-                  6865206675747572652c2073756e73637265656e20776f756c642062652069742e";
1133
-        let ct = "d31a8d34648e60db7b86afbc53ef7ec2a4aded51296e08fea9e2b5a736ee62d63dbea45e8ca967128\
1134
-                  2fafb69da92728b1a71de0a9e060b2905d6a5b67ecd3b3692ddbd7f2d778b8c9803aee328091b58fa\
1135
-                  b324e4fad675945585808b4831d7bc3ff4def08e4b7a9de576d26586cec64b6116";
1136
+        let pt =
1137
+            "4c616469657320616e642047656e746c656d656e206f662074686520636c617373206f66202739393\
1138
+             a204966204920636f756c64206f6666657220796f75206f6e6c79206f6e652074697020666f722074\
1139
+             6865206675747572652c2073756e73637265656e20776f756c642062652069742e";
1140
+        let ct =
1141
+            "d31a8d34648e60db7b86afbc53ef7ec2a4aded51296e08fea9e2b5a736ee62d63dbea45e8ca967128\
1142
+             2fafb69da92728b1a71de0a9e060b2905d6a5b67ecd3b3692ddbd7f2d778b8c9803aee328091b58fa\
1143
+             b324e4fad675945585808b4831d7bc3ff4def08e4b7a9de576d26586cec64b6116";
1144
         let tag = "1ae10b594f09e26a7e902ecbd0600691";
1145
 
1146
         let mut actual_tag = [0; 16];
1147
--- cargo-crates/openssl-0.9.24/src/verify.rs.orig	2018-02-12 19:02:00 UTC
1148
+++ cargo-crates/openssl-0.9.24/src/verify.rs
1149
@@ -14,7 +14,7 @@ bitflags! {
1150
         const X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS = ffi::X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS;
1151
         const X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS
1152
             = ffi::X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS;
1153
-        /// Requires the `v110` feature and OpenSSL 1.1.0.
1154
+        /// Requires OpenSSL 1.1.0 or 1.1.1 and the corresponding Cargo feature.
1155
         #[cfg(all(feature = "v110", ossl110))]
1156
         const X509_CHECK_FLAG_NEVER_CHECK_SUBJECT = ffi::X509_CHECK_FLAG_NEVER_CHECK_SUBJECT;
1157
     }
1158
--- cargo-crates/openssl-0.9.24/src/x509/verify.rs.orig	2018-02-12 17:30:05 UTC
1159
+++ cargo-crates/openssl-0.9.24/src/x509/verify.rs
1160
@@ -1,5 +1,5 @@
1161
 //! X509 certificate verification
1162
 //!
1163
-//! Requires the `v102` or `v110` features and OpenSSL 1.0.2 or 1.1.0.
1164
+//! Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature.
1165
 
1166
 pub use verify::*;

Return to bug 233389