Class: Mumble::CertManager
- Inherits:
-
Object
- Object
- Mumble::CertManager
- 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
-
#cert ⇒ Object
readonly
Returns the value of attribute cert.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize(username, opts) ⇒ CertManager
constructor
A new instance of CertManager.
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
#cert ⇒ Object (readonly)
Returns the value of attribute cert.
6 7 8 |
# File 'lib/mumble-ruby/cert_manager.rb', line 6 def cert @cert end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
6 7 8 |
# File 'lib/mumble-ruby/cert_manager.rb', line 6 def key @key end |