@@ -271,11 +271,6 @@ handling decoding errors and directly verifying signatures.
271271For more details see ` {verify_fun, Verify} ` [ in common_option_cert] ( `t:ssl:common_option_cert/0` )
272272
273273
274- > #### Note {: .info }
275- > The legacy command line format for ` verify_fun ` cannot be used
276- > in a ` -ssl_dist_optfile ` file as described below in
277- > [ Specifying TLS Options (Legacy)] ( #specifying-tls-options-legacy ) .
278-
279274## Using TLS distribution over IPv6
280275
281276It is possible to use TLS distribution over IPv6 instead of IPv4. To do this,
@@ -295,99 +290,3 @@ A node started in this way will only be able to communicate with other nodes
295290using TLS distribution over IPv6.
296291
297292
298- ## Specifying TLS Options (Legacy)
299-
300- > #### Note {: .info }
301- > The following section describes TLS Option handling prior to OTP 20.2
302- > and can only handle a small subset of the actual available options.
303- > It is here only for the sake of backwards compatibility .
304-
305- As in the previous section the PEM file ` "/home/me/ssl/erlserver.pem" ` contains
306- both the server certificate and its private key.
307-
308- On the ` erl ` command line you can specify options that the TLS distribution adds
309- when creating a socket.
310-
311- The simplest TLS options in the following list can be specified by adding the
312- prefix ` server_ ` or ` client_ ` to the option name:
313-
314- - ` certfile `
315- - ` keyfile `
316- - ` password `
317- - ` cacertfile `
318- - ` verify `
319- - ` verify_fun ` (write as ` {Module, Function, InitialUserState} ` )
320- - ` crl_check `
321- - ` crl_cache ` (write as Erlang term)
322- - ` reuse_sessions `
323- - ` secure_renegotiate `
324- - ` depth `
325- - ` hibernate_after `
326- - ` ciphers ` (use old string format)
327-
328- Note that ` verify_fun ` needs to be written in a different form than the
329- corresponding TLS option, since funs are not accepted on the command line.
330-
331- The server can also take the options ` dhfile ` and ` fail_if_no_peer_cert ` (also
332- prefixed).
333-
334- ` client_ ` \- prefixed options are used when the distribution initiates a
335- connection to another node. ` server_ ` \- prefixed options are used when accepting
336- a connection from a remote node.
337-
338- Raw socket options, such as ` packet ` and ` size ` must not be specified on the
339- command line.
340-
341- The command-line argument for specifying the TLS options is named
342- ` -ssl_dist_opt ` and is to be followed by pairs of SSL options and their values.
343- Argument ` -ssl_dist_opt ` can be repeated any number of times.
344-
345- An example command line doing the same as the example in the previous section
346- can now look as follows (line breaks in the command are for readability, and
347- shall not be there when typed):
348-
349- ``` text
350- $ erl -boot /home/me/ssl/start_ssl -proto_dist inet_tls
351- -ssl_dist_opt server_certfile "/home/me/ssl/erlserver.pem"
352- -ssl_dist_opt server_secure_renegotiate true client_secure_renegotiate true
353- -sname ssl_test
354- Erlang (BEAM) emulator version 5.0 [source]
355-
356- Eshell V5.0 (abort with ^G)
357- (ssl_test@myhost)1>
358- ```
359-
360- ### Setting up Environment to Always Use TLS
361-
362- A convenient way to specify arguments to Erlang is to use environment variable
363- ` ERL_FLAGS ` . All the flags needed to use the TLS distribution can be specified
364- in that variable and are then interpreted as command-line arguments for all
365- subsequent invocations of Erlang.
366-
367- In a Unix (Bourne) shell, it can look as follows (line breaks are for
368- readability, they are not to be there when typed):
369-
370- ``` erlang
371- $ ERL_FLAGS = " -boot /home/me/ssl/start_ssl -proto_dist inet_tls
372- -ssl_dist_opt server_certfile /home/me/ssl/erlserver.pem
373- -ssl_dist_opt server_secure_renegotiate true client_secure_renegotiate true"
374- $ export ERL_FLAGS
375- $ erl - sname ssl_test
376- Erlang (BEAM ) emulator version 5.0 [source ]
377-
378- Eshell V5 .0 (abort with ^G )
379- (ssl_test@myhost )1 > init :get_arguments ().
380- [{root ,[" /usr/local/erlang" ]},
381- {progname ,[" erl " ]},
382- {sname ,[" ssl_test" ]},
383- {boot ,[" /home/me/ssl/start_ssl" ]},
384- {proto_dist ,[" inet_tls" ]},
385- {ssl_dist_opt ,[" server_certfile" ," /home/me/ssl/erlserver.pem" ]},
386- {ssl_dist_opt ,[" server_secure_renegotiate" ," true" ,
387- " client_secure_renegotiate" ," true" ]
388- {home ,[" /home/me" ]}]
389- ```
390-
391- The `init :get_arguments ()` call verifies that the correct arguments are supplied
392- to the emulator .
393-
0 commit comments