Sha256: 031d7abfa31b4230d663d18bd0238e0f3095b515db83547fc1ad32bb01362ec3

Contents?: true

Size: 467 Bytes

Versions: 7

Compression:

Stored size: 467 Bytes

Contents

# frozen_string_literal: true

require_relative 'command_handler'

module Ftpd

  class CmdAuth < CommandHandler

    def cmd_auth(security_scheme)
      ensure_tls_supported
      if socket.encrypted?
        error "AUTH already done", 503
      end
      unless security_scheme =~ /^TLS(-C)?$/i
        error "Security scheme not implemented: #{security_scheme}", 504
      end
      reply "234 AUTH #{security_scheme} OK."
      socket.encrypt
    end

  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ftpd-2.1.0 lib/ftpd/cmd_auth.rb
ftpd-2.0.5 lib/ftpd/cmd_auth.rb
ftpd-2.0.4 lib/ftpd/cmd_auth.rb
ftpd-2.0.3 lib/ftpd/cmd_auth.rb
ftpd-2.0.2 lib/ftpd/cmd_auth.rb
ftpd-2.0.1 lib/ftpd/cmd_auth.rb
ftpd-2.0.0 lib/ftpd/cmd_auth.rb