Class: Ftpd::TlsServer

Inherits:
Server
  • Object
show all
Defined in:
lib/ftpd/tls_server.rb

Direct Known Subclasses

FtpServer

Instance Attribute Summary collapse

Attributes inherited from Server

#interface, #port

Instance Method Summary collapse

Methods inherited from Server

#bound_port, #join, #start, #stop

Constructor Details

#initializeTlsServer

Create a new TLS server.



35
36
37
38
# File 'lib/ftpd/tls_server.rb', line 35

def initialize
  super
  @tls = :off
end

Instance Attribute Details

#certfile_pathString

The path of the SSL certificate to use for TLS. Defaults to nil (no SSL certificate).

Set this before calling #start.

Returns:

  • (String)


31
32
33
# File 'lib/ftpd/tls_server.rb', line 31

def certfile_path
  @certfile_path
end

#tlsSymbol

Whether or not to do TLS, and which flavor.

One of:

  • :off

  • :explicit

  • :implicit

Notes:

  • Defaults to :off

  • Set this before calling #start.

  • If other than :off, then #certfile_path must be set.

Returns:

  • (Symbol)


22
23
24
# File 'lib/ftpd/tls_server.rb', line 22

def tls
  @tls
end