crtsh / certwatch_db

Database schema
https://crt.sh/
GNU General Public License v3.0
199 stars 36 forks source link

Host match search type #11

Open robstradling opened 8 years ago

robstradling commented 8 years ago

Add a "?host=" search type that will list certs with any identity that a browser would match to a URL on the host indicated by the search value.

e.g. ?host=www.example.com would match [CN or dNSName]=www.example.com, [CN or dNSName]=*.example.com, but not [CN or dNSName]=secure.example.com, etc.

yschimke commented 3 years ago

This would be great. Also any chance that you provide a way to get back the certificate PEM encoded or similar in the initial query?

Context is this PR on another project, I was trying to query live certificates for a particular host, and doing a N+1 query to get these results is terrible.

https://github.com/cashapp/certifikit/pull/86/files#diff-2b385aa0b4de4df488fdfe27a22e80bb47a07432ffdf8f65bd32882b1b8e63d9R53

yschimke commented 3 years ago

I'm going to switch to using the readonly postgres database instead. Query all for a host and return certificates in that query.