Skip to content

Commit 49ef715

Browse files
committed
Consider SHORTNAME and shortname equal as hostname
There seems to be no reason to consider a local hostname as case sensitive when other hostnames are compared case insensitive. If the behavior needs to be more strict it would be good to document in what way it is more strict.
1 parent 758b62e commit 49ef715

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/openssl/ssl.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def verify_hostname(hostname, san) # :nodoc:
314314
san_parts = san.downcase.split(".")
315315

316316
# TODO: this behavior should probably be more strict
317-
return san == hostname if san_parts.size < 2
317+
return san.downcase == hostname.downcase if san_parts.size < 2
318318

319319
# Matching is case-insensitive.
320320
host_parts = hostname.downcase.split(".")

0 commit comments

Comments
 (0)