This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script uses the public crt.sh database to compare Root Certificate information in crt.sh against the same information in the CCADB AllCertificateRecordsCSVFormatv2 and AllIncludedRootCertsCSV reports. | |
# | |
# psql doesn't support multi-line \COPY statements, so we use the HEREDOC workaround described by https://minhajuddin.com/2017/05/18/how-to-pass-a-multi-line-copy-sql-to-psql/ | |
# | |
# Since long-running crt.sh:5432 queries are often killed off for various reasons, this script makes multiple attempts. If all of the attempts fail, try running this script again later. | |
ERRORFILE=`mktemp` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git checkout -b duplicate_mysql_to_postgresql | |
# Duplicate the MySQL "Extra Data Issuance Chain Deduplication" storage layer files into new PostgreSQL directories, preserving git line history. | |
# (h/t https://devblogs.microsoft.com/oldnewthing/20190919-00/?p=102904) | |
mkdir trillian/ctfe/storage/postgresql | |
git mv trillian/ctfe/storage/mysql/mysql.go trillian/ctfe/storage/postgresql/postgresql.go | |
git mv trillian/ctfe/storage/mysql/mysql_test.go trillian/ctfe/storage/postgresql/postgresql_test.go | |
git mv trillian/ctfe/storage/mysql/schema.sql trillian/ctfe/storage/postgresql/schema.sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git checkout -b duplicate_mysql_to_postgresql | |
# Duplicate the MySQL quota.Manager and storage layer files into new PostgreSQL directories, preserving git line history. | |
# (h/t https://devblogs.microsoft.com/oldnewthing/20190919-00/?p=102904) | |
mkdir quota/postgresqlqm | |
git mv quota/mysqlqm/mysql_quota.go quota/postgresqlqm/postgresql_quota.go | |
git mv quota/mysqlqm/mysql_quota_test.go quota/postgresqlqm/postgresql_quota_test.go | |
git mv quota/mysqlqm/quota_provider.go quota/postgresqlqm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"math" | |
"os/signal" | |
"syscall" | |
"time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module gist.github.com/robstradling/363b54e979b879e0450cfa36e238cca6 | |
go 1.21.6 | |
require github.com/sijms/go-ora/v2 v2.8.9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"database/sql" | |
"flag" | |
"fmt" | |
"os" | |
go_ora "github.com/sijms/go-ora/v2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"database/sql" | |
"flag" | |
"fmt" | |
"os" | |
"time" | |
go_ora "github.com/sijms/go-ora/v2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH cas AS ( | |
SELECT cac.CA_ID | |
FROM ccadb_certificate cc | |
JOIN ca_certificate cac ON cc.CERTIFICATE_ID = cac.CERTIFICATE_ID | |
WHERE cc.INCLUDED_CERTIFICATE_OWNER IS NULL | |
EXCEPT | |
SELECT cac.CA_ID | |
FROM ccadb_certificate cc | |
JOIN ca_certificate cac ON cc.CERTIFICATE_ID = cac.CERTIFICATE_ID | |
GROUP BY cac.CA_ID |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module gist.github.com/robstradling/f8f8c04b73af72e7f137c1eedb523d15 | |
go 1.20 | |
require github.com/sijms/go-ora/v2 v2.7.21 |
NewerOlder