Class: Pkernel::CRLReason

Inherits:
Object
  • Object
show all
Includes:
Catcher
Defined in:
lib/pkernel.rb

Constant Summary collapse

UNSPECIFIED =
0
KEY_COMPROMISE =
1
CA_COMPROMISE =
2
AFFILIATION_CHANGED =
3
SUPERSEDED =
4
CESSATION_OF_OPERATION =
5
CERTIFICATE_HOLD =
6
REMOVE_FROM_CRL =
8
PRIVILEGE_WITHDRAWN =
9
AA_COMPROMISE =
10

Class Method Summary collapse

Methods included from Catcher

#method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Pkernel::Catcher

Class Method Details

.to_string(reason) ⇒ Object



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/pkernel.rb', line 108

def self.to_string(reason)
  case reason
  when UNSPECIFIED
    "CRL reason is not specified"
  when KEY_COMPROMISE
    "Key is compromised"
  when CA_COMPROMISE
    "Certificate authority is compromised"
  when AFFILIATION_CHANGED
    "Affiliation has changed"
  when SUPERSEDED
    "Certificate is superseded"
  when CESSATION_OF_OPERATION
    "Certificate issuer has ceased operation"
  when CERTIFICATE_HOLD
    "Certificate is on hold"
  when REMOVE_FROM_CRL
    "Certificate has removed from CRL"
  when PRIVILEGE_WITHDRAWN
    "Certificate owner has privilege withdrawn"
  when AA_COMPROMISE
    "AA has compromised"
  else
    ""
  end
end