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

Side by Side Diff: net/tools/ct_mapper/dump-ct.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 unified diff | Download patch
« no previous file with comments | « net/tools/ct_mapper/dump-ct.go ('k') | net/tools/ct_mapper/entry.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/bash
2
3 set -e
4
5 if [ $# -ne 2 ] ; then
6 echo "This tool will extract all of the certificates in a CertificateTranspare ncy database and write their raw DER to a single file. This is the input file fo r cert_mapper"
7 echo ""
8 echo "Usage: <input-path-to-ct-db> <output-path-to-dump>"
9 exit 1
10 fi
11
12 # Make sure GO is installed
13 go version >/dev/null 2>&1 || { echo >&2 "ERROR: Need to have GO installed"; exi t 1; }
14
15 CT_DB_INPUT="$(readlink -f "$1")"
16 OUT_PATH="$(readlink -f "$2")"
17
18 ORIGINAL_GO_FILE=$( readlink -f "$(dirname "$0")/dump-ct.go" )
19
20 MY_DIR=$(mktemp -d)
21
22 echo "Created temporary directory: $MY_DIR"
23
24 cd "$MY_DIR"
25 export GOPATH="$MY_DIR"
26
27 echo "Downloading agl's certificatetransparency code into $MY_DIR"
28 go get github.com/agl/certificatetransparency
29
30 mkdir mycttools
31 DST_GO_FILE="mycttools/dump-ct.go"
32 echo "Copying to $ORIGINAL_GO_FILE to $MY_DIR/$DST_GO_FILE"
33 cp "$ORIGINAL_GO_FILE" "$MY_DIR/$DST_GO_FILE"
34
35 echo "Executing dump-ct.go"
36 go run "$DST_GO_FILE" "$CT_DB_INPUT" "$OUT_PATH"
37
38 # Cleanup this temporary directory.
39 echo "Cleaning up and deleting $MY_DIR"
40 rm -rf "$MY_DIR"
OLDNEW
« no previous file with comments | « net/tools/ct_mapper/dump-ct.go ('k') | net/tools/ct_mapper/entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698