@@ -202,8 +202,8 @@ CTL_ERL_ARGS="-pa $ERL_SSL_PATH \
202
202
commands will look like these:</p >
203
203
204
204
<pre class =" sourcecode bash" >
205
- echo erts-6.1/bin/ erl -boot releases/3.4.3/start_clean \
206
- -eval 'io:format("~p ", [code:lib_dir(ssl, ebin)]),halt(). ' -noshell
205
+ erl -boot releases/3.4.3/start_clean \
206
+ -eval 'io:format("ERL_SSL_PATH=~s~n ", [filename:dirname( code:which(inet_tls_dist))]) ' -s init stop
207
207
"/path/to/erl/lib/ssl-5.3.5/ebin"
208
208
export ERL_SSL_PATH=/path/to/erl/lib/ssl-5.3.5/ebin
209
209
</pre >
@@ -225,9 +225,72 @@ export ERL_SSL_PATH=/path/to/erl/lib/ssl-5.3.5/ebin
225
225
226
226
<doc : section name =" how-to-windows" >
227
227
<doc : heading >Windows</doc : heading >
228
+ <p >There are some minor differences when configuring TLS for distributed Erlang on Windows.
229
+ First, the command to find the location of the <code >inet_tls_dist</code > module is
230
+ different due to shell parsing rules:
231
+ </p >
232
+
233
+ <pre class =" sourcecode bash" >
234
+ erl -noinput -eval "io:format(""ERL_SSL_PATH=~s~n"", [filename:dirname(code:which(inet_tls_dist))])" -s init stop
235
+ </pre >
236
+
237
+ <p >Next, the file containing the custom environment variables is named <code >rabbitmq-env-conf.bat</code > on Windows.
238
+ This file <em >must</em > be saved to the <code >%AppData%\RabbitMQ</code > directory of the administrative
239
+ user that installed RabbitMQ.
240
+ </p >
241
+ <p >Here is a complete <code >rabbitmq-env-conf.bat</code > file using the <code >-ssl_dist_opfile</code > setting.
242
+ Note the use of forward-slash directory delimiters.
243
+ </p >
244
+
245
+ <pre class =" sourcecode bash" >
246
+ @echo off
247
+ rem NOTE: If spaces are present in any of these paths,
248
+ rem double quotes must be used.
249
+
250
+ rem NOTE: the following path is **system dependent**.
251
+ set SSL_PATH="C:/Program Files/erl10.0.1/lib/ssl-9.0/ebin"
228
252
229
- <p >TBD.</p >
253
+ rem NOTE: pre-RabbitMQ 3.7.8 variable names:
254
+ set RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-pa %SSL_PATH% ^
255
+ -proto_dist inet_tls ^
256
+ -ssl_dist_optfile C:/Users/rmq_user/AppData/Roaming/RabbitMQ/ssl_dist.config
230
257
258
+ set RABBITMQ_CTL_ERL_ARGS=-pa %SSL_PATH% ^
259
+ -proto_dist inet_tls ^
260
+ -ssl_dist_optfile C:/Users/rmq_user/AppData/Roaming/RabbitMQ/ssl_dist.config
261
+
262
+ rem NOTE: post-RabbitMQ 3.7.8 variable names:
263
+ rem set SERVER_ADDITIONAL_ERL_ARGS=...
264
+ rem set CTL_ERL_ARGS=...
265
+
266
+ rem See this PR for details
267
+ rem https://github.com/rabbitmq/rabbitmq-server/pull/1666
268
+ </pre >
269
+
270
+ <p >Finally, here is an example <code >ssl_dist.config</code > file.
271
+ Note that, as with Unix systems, more ssl options are available
272
+ to be set here if necessary.</p >
273
+
274
+ <pre class =" sourcecode bash" >
275
+ [
276
+ {server, [
277
+ {cacertfile, "C:/Path/To/ca_certificate.pem"},
278
+ {certfile, "C:/Path/To/server_certificate.pem"},
279
+ {keyfile, "C:/Path/To/server_key.pem"},
280
+ {secure_renegotiate, true},
281
+ {verify, verify_peer},
282
+ {fail_if_no_peer_cert, true}
283
+ ]},
284
+ {client, [
285
+ {cacertfile, "C:/Path/To/ca_certificate.pem"},
286
+ {certfile, "C:/Path/To/client_certificate.pem"},
287
+ {keyfile, "C:/Path/To/client_key.pem"},
288
+ {secure_renegotiate, true},
289
+ {verify, verify_peer},
290
+ {fail_if_no_peer_cert, true}
291
+ ]}
292
+ ].
293
+ </pre >
231
294
</doc : section >
232
295
</body >
233
296
</html >
0 commit comments