Class: CertValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/cert_validator.rb,
lib/cert_validator/asn1.rb,
lib/cert_validator/errors.rb,
lib/cert_validator/version.rb,
lib/cert_validator/crl/extractor.rb,
lib/cert_validator/crl_validator.rb,
lib/cert_validator/ocsp/extractor.rb,
lib/cert_validator/ocsp/null_validator.rb,
lib/cert_validator/ocsp/real_validator.rb

Defined Under Namespace

Modules: OcspFailures Classes: Asn1, CrlFetchError, CrlValidator, Error, NullOcspValidator, OcspNotAvailableError, RealOcspValidator, RecursiveExtractError

Constant Summary collapse

OcspValidator =

use the null validator as a fallback

CertValidator::NullOcspValidator
VERSION =
"0.0.1"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cert, ca) ⇒ CertValidator



7
8
9
10
# File 'lib/cert_validator.rb', line 7

def initialize(cert, ca)
  @certificate = cert
  @ca = ca
end

Instance Attribute Details

#caObject (readonly)

Returns the value of attribute ca



5
6
7
# File 'lib/cert_validator.rb', line 5

def ca
  @ca
end

#certificateObject (readonly)

Returns the value of attribute certificate



4
5
6
# File 'lib/cert_validator.rb', line 4

def certificate
  @certificate
end

Instance Method Details

#crl=(crl) ⇒ Object



12
13
14
# File 'lib/cert_validator.rb', line 12

def crl=(crl)
  crl_validator.crl = crl
end

#crl_available?Boolean



16
17
18
# File 'lib/cert_validator.rb', line 16

def crl_available?
  crl_validator.available?
end

#crl_valid?Boolean



20
21
22
# File 'lib/cert_validator.rb', line 20

def crl_valid?
  crl_validator.valid?
end

#ocsp_available?Boolean



24
25
26
# File 'lib/cert_validator.rb', line 24

def ocsp_available?
  ocsp_validator.available?
end

#ocsp_valid?Boolean



28
29
30
# File 'lib/cert_validator.rb', line 28

def ocsp_valid?
  ocsp_validator.valid?
end