added support for CT over http for testing
This commit is contained in:
parent
e5fd2e9efc
commit
cfe7adf06c
6
logs.go
6
logs.go
|
@ -14,9 +14,12 @@ import (
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"crypto/x509"
|
"crypto/x509"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
"flag"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var http_flag = flag.Bool("http", false, "Connect to CT logs over http instead of https, useful for testing")
|
||||||
|
|
||||||
type LogInfoFile struct {
|
type LogInfoFile struct {
|
||||||
Logs []LogInfo `json:"logs"`
|
Logs []LogInfo `json:"logs"`
|
||||||
}
|
}
|
||||||
|
@ -30,6 +33,9 @@ type LogInfo struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (info *LogInfo) FullURI() string {
|
func (info *LogInfo) FullURI() string {
|
||||||
|
if *http_flag {
|
||||||
|
return "http://" + info.Url
|
||||||
|
}
|
||||||
return "https://" + info.Url
|
return "https://" + info.Url
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue