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.



33
34
35
36
# File 'lib/ftpd/tls_server.rb', line 33

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)


29
30
31
# File 'lib/ftpd/tls_server.rb', line 29

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)


20
21
22
# File 'lib/ftpd/tls_server.rb', line 20

def tls
  @tls
end