Merge branch 'master' into test-reg-rate-limit-3

This commit is contained in:
Jacob Hoffman-Andrews 2015-10-09 12:48:13 -07:00
commit be36c3d71d
4 changed files with 12 additions and 4 deletions

View File

@ -435,6 +435,7 @@ func main() {
go updater.newCertificatesLoop.loop()
go updater.oldOCSPResponsesLoop.loop()
go updater.missingSCTReceiptsLoop.loop()
cmd.FailOnError(err, "Failed to create updater")

View File

@ -747,6 +747,13 @@ type SignedCertificateTimestamp struct {
LockCol int64
}
// RPCSignedCertificateTimestamp is a wrapper around SignedCertificateTimestamp
// so that it can be passed through the RPC layer properly. Without this wrapper
// the UnmarshalJSON method below will be used when marshaling/unmarshaling the
// object, which is not what we want as it is not symmetrical (as it is intended
// to unmarshal a rawSignedCertificateTimestamp into a SignedCertificateTimestamp)
type RPCSignedCertificateTimestamp SignedCertificateTimestamp
type rawSignedCertificateTimestamp struct {
Version uint8 `json:"sct_version"`
LogID string `json:"id"`

View File

@ -1078,7 +1078,7 @@ func NewStorageAuthorityServer(rpc Server, impl core.StorageAuthority) error {
}
sct, err := impl.GetSCTReceipt(gsctReq.Serial, gsctReq.LogID)
jsonResponse, err := json.Marshal(core.SignedCertificateTimestamp(sct))
jsonResponse, err := json.Marshal(core.RPCSignedCertificateTimestamp(sct))
if err != nil {
// AUDIT[ Error Conditions ] 9cc4d537-8534-4970-8665-4b382abe82f3
errorCondition(MethodGetSCTReceipt, err, req)
@ -1089,7 +1089,7 @@ func NewStorageAuthorityServer(rpc Server, impl core.StorageAuthority) error {
})
rpc.Handle(MethodAddSCTReceipt, func(req []byte) (response []byte, err error) {
var sct core.SignedCertificateTimestamp
var sct core.RPCSignedCertificateTimestamp
err = json.Unmarshal(req, &sct)
if err != nil {
// AUDIT[ Improper Messages ] 0786b6f2-91ca-4f48-9883-842a19084c64

View File

@ -189,6 +189,7 @@
},
"publisher": {
"maxConcurrentRPCServerRequests": 16,
"debugAddr": "localhost:8009"
},
@ -208,8 +209,7 @@
"submissionRetries": 1,
"submissionBackoff": "1s",
"intermediateBundleFilename": "test/test-ca.pem"
},
"maxConcurrentRPCServerRequests": 16
}
},
"certChecker": {