Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(603)

Unified Diff: net/tools/ct_mapper/sync-ct-database.sh

Issue 1238413004: Framework for iterating over certificates in CT database from Chromium code. (not for review) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make samples page work Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/ct_mapper/my_visitor.cc ('k') | net/tools/ct_mapper/visitor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/ct_mapper/sync-ct-database.sh
diff --git a/net/tools/ct_mapper/sync-ct-database.sh b/net/tools/ct_mapper/sync-ct-database.sh
new file mode 100755
index 0000000000000000000000000000000000000000..ef8a67442d21bd222dc6d365f0e9039aafb7b5bd
--- /dev/null
+++ b/net/tools/ct_mapper/sync-ct-database.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+set -e
+
+if [ $# -ne 1 ] ; then
+ echo "This tool will download the full CertificateTransparency database and write it to a file (or synchronize an existing one)"
+ echo ""
+ echo "Usage: <path-to-output-ct-db>"
+ exit 1
+fi
+
+# Make sure GO is installed
+go version >/dev/null 2>&1 || { echo >&2 "ERROR: Need to have GO installed"; exit 1; }
+
+OUT_PATH="$(readlink -f "$1")"
+
+MY_DIR=$(mktemp -d)
+
+echo "Created temporary directory: $MY_DIR"
+
+cd "$MY_DIR"
+export GOPATH="$MY_DIR"
+
+echo "Downloading agl's certificatetransparency code into $MY_DIR"
+go get github.com/agl/certificatetransparency
+
+echo "Executing src/github.com/agl/certificatetransparency/tools/ct-sync.go"
+go run src/github.com/agl/certificatetransparency/tools/ct-sync.go "$OUT_PATH"
+
+# Cleanup this temporary directory.
+echo "Cleaning up and deleting $MY_DIR"
+rm -rf "$MY_DIR"
« no previous file with comments | « net/tools/ct_mapper/my_visitor.cc ('k') | net/tools/ct_mapper/visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698