Skip to content

Instantly share code, notes, and snippets.

@marksteward
Last active May 12, 2019 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marksteward/278bc8287eb78a4108b44dc911475e8a to your computer and use it in GitHub Desktop.
Save marksteward/278bc8287eb78a4108b44dc911475e8a to your computer and use it in GitHub Desktop.
certwatch=> select id, no_of_certs_issued, name from ca where id in (select distinct ca_id from ca_trust_purpose ctp, trust_purpose tp where tp.purpose = 'EV Server Authentication' and ctp.trust_purpose_id = tp.id) order by 2 desc;
id | no_of_certs_issued | name
--------+--------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1582 | 43052791 | C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO ECC Domain Validation Secure Server CA 2
...
797 | 970183 | C=US, ST=Arizona, L=Scottsdale, O="Starfield Technologies, Inc.", OU=http://certs.starfieldtech.com/repository/, CN=Starfield Secure Certificate Authority - G2
...
1544 | 85799 | C=US, ST=New Jersey, L=Jersey City, O=The USERTRUST Network, CN=USERTrust RSA Domain Validation Secure Server CA
...
1630 | 9910 | C=US, ST=VA, L=Herndon, O=Network Solutions L.L.C., CN=Network Solutions EV Server CA 2
...
13302 | 0 | DC=com, DC=microsoft, DC=corp, DC=redmond, CN=MSIT Machine Auth CA 2
(1172 rows)
certwatch=> select certificate_id, count(*) from certificate_identity where lower(name_value) like '%.com' and issuer_ca_id = 1544 group by certificate_id having count(*) > 5;
certificate_id | count
----------------+-------
6523137 | 13
16026453 | 14
6965631 | 12
344217582 | 9
306930908 | 18
(5 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment