There aren't any suitable database indexes to enable that sort of search to be done efficiently. Subject:countryName isn't indexed at all.
Please take a look at
https://github.com/robstradling/CeRTSearcH, which uses the publicly accessible postgres database at crt.sh:5432. The following command will trawl through the entire database (until you press CTRL+C) and write details of all certs with Subject:countryName=US to a file.
./CeRTSearcH -q US -sanType NONE -subjectType 2.5.4.6 -startID 1 2> country_equals_us.json
Please note: It will take several days to process all of the records that currently exist.
To apply your additional "that have a CA like a digecert" filter, you could either (1) edit the SQL in certsearch.go before running that command, or (2) use "jq" afterwards to extract the results of interest from country_equals_us.json.
On Wednesday, July 5, 2023 at 3:13:08 PM UTC+1 Ferti wrote:
Hi everyone, first thanks a lots to rodd for this tool,
i would like ask how i can search list of sites in crt.sh that have a CA like a digecert and from country=US at same time.
i tried put C=US in the bar but this appear error