Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check certificate SAN as well as CN values #651

Open
digininja opened this issue Feb 3, 2020 · 1 comment
Open

Check certificate SAN as well as CN values #651

digininja opened this issue Feb 3, 2020 · 1 comment

Comments

@digininja
Copy link
Contributor

I just got this warning scanning www.xxx.com

+ Hostname 'www.xxx.com' does not match certificate's names: xxx.com

That name isn't the CN, but is in the SAN so the message isn't quite right. Maybe dump the SAN contents as well as the CN in the "SSL Info" section and then only alert if the the name doesn't match either set.

@sullo
Copy link
Owner

sullo commented Jul 24, 2021

I'm a little unsure what didn't match on this one. The code below looks like it should capture SANs and merge them into the "name list" which hostname is validated against. I tried this against several sites with SANs and it seems to be ok. Is this still a problem?

	if ($mark->{'ssl_cert_altnames'} ne '') { 
		foreach my $n (split(/, /,$mark->{'ssl_cert_altnames'})) { 
			push(@names, $n);
			}
		}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants