Class: Mumble::CertManager

Inherits:
Object
  • Object
show all
Defined in:
lib/mumble-ruby/cert_manager.rb

Constant Summary collapse

CERT_STRING =
"/C=%s/O=%s/OU=%s/CN=%s"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(username, opts) ⇒ CertManager



10
11
12
13
14
15
16
17
18
# File 'lib/mumble-ruby/cert_manager.rb', line 10

def initialize(username, opts)
  @cert_dir = File.join(opts[:cert_dir], "#{username.downcase}_cert")
  @username = username
  @opts = opts

  FileUtils.mkdir_p @cert_dir
  setup_key
  setup_cert
end

Instance Attribute Details

#certObject (readonly)

Returns the value of attribute cert.



6
7
8
# File 'lib/mumble-ruby/cert_manager.rb', line 6

def cert
  @cert
end

#keyObject (readonly)

Returns the value of attribute key.



6
7
8
# File 'lib/mumble-ruby/cert_manager.rb', line 6

def key
  @key
end