Class: SamlTool::Certificate
- Inherits:
-
OpenSSL::X509::Certificate
- Object
- OpenSSL::X509::Certificate
- SamlTool::Certificate
- Defined in:
- lib/saml_tool/certificate.rb
Instance Method Summary collapse
- #issuer_name ⇒ Object
- #slash_list_to_comma_list(string) ⇒ Object
- #subject_name ⇒ Object
- #without_leading_and_trailing_labels ⇒ Object (also: #x509_certificate)
Instance Method Details
#issuer_name ⇒ Object
13 14 15 |
# File 'lib/saml_tool/certificate.rb', line 13 def issuer_name @issuer_name ||= slash_list_to_comma_list(issuer) end |
#slash_list_to_comma_list(string) ⇒ Object
21 22 23 24 25 |
# File 'lib/saml_tool/certificate.rb', line 21 def slash_list_to_comma_list(string) string = string.to_s string = string[1..-1] if string[0] == '/' string.split('/').reverse.join(',') end |
#subject_name ⇒ Object
17 18 19 |
# File 'lib/saml_tool/certificate.rb', line 17 def subject_name @subject_name ||= slash_list_to_comma_list(subject) end |
#without_leading_and_trailing_labels ⇒ Object Also known as: x509_certificate
8 9 10 |
# File 'lib/saml_tool/certificate.rb', line 8 def without_leading_and_trailing_labels to_s.lines.to_a[1..-2].join end |