lib/sslcheck/validators/common_name.rb in sslcheck-0.9.4 vs lib/sslcheck/validators/common_name.rb in sslcheck-0.9.4.1
- old
+ new
@@ -10,10 +10,11 @@
def common_name_matches?
matching_wildcard_domain || alternate_common_name_match || direct_common_name_match
end
def matching_wildcard_domain
- true if (@peer_cert.common_name.match(/\*\./) && @common_name.include?(@peer_cert.common_name.gsub(/\*\./,'')))
+ return true if (@peer_cert.common_name.match(/\*\./) && @common_name.include?(@peer_cert.common_name.gsub(/\*\./,'')))
+ false
end
def direct_common_name_match
@peer_cert.common_name.downcase == @common_name.downcase
end