Class: Koji::Plugins::SelfSignedCertificate
- Inherits:
-
Base
- Object
- Base
- Koji::Plugins::SelfSignedCertificate
show all
- Defined in:
- lib/koji/plugins/self_signed_cert.rb
Instance Attribute Summary
Attributes inherited from Base
#website
Instance Method Summary
collapse
Methods inherited from Base
inherited, #initialize, #name, #report
Instance Method Details
#evidence_list ⇒ Object
11
12
13
14
15
|
# File 'lib/koji/plugins/self_signed_cert.rb', line 11
def evidence_list
@evidence_list ||= [].tap do |out|
out << "The website has a self-signed certificate" if self_signed?
end
end
|
#score ⇒ Object
17
18
19
|
# File 'lib/koji/plugins/self_signed_cert.rb', line 17
def score
evidence_list.empty? ? 0 : 100
end
|
#self_signed? ⇒ Boolean
6
7
8
9
|
# File 'lib/koji/plugins/self_signed_cert.rb', line 6
def self_signed?
website.body
website.exception.is_a?(OpenSSL::SSL::SSLError) && website.exception.to_s.include?("self signed certificate")
end
|