diff --git a/cmd/ocsp-updater/main.go b/cmd/ocsp-updater/main.go index bde17f34d..b8be069a9 100644 --- a/cmd/ocsp-updater/main.go +++ b/cmd/ocsp-updater/main.go @@ -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") diff --git a/core/objects.go b/core/objects.go index cf513e724..df6e1eb47 100644 --- a/core/objects.go +++ b/core/objects.go @@ -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"` diff --git a/rpc/rpc-wrappers.go b/rpc/rpc-wrappers.go index c6700f9e7..ae11655ed 100644 --- a/rpc/rpc-wrappers.go +++ b/rpc/rpc-wrappers.go @@ -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 diff --git a/test/boulder-config.json b/test/boulder-config.json index 00ab1e534..6684deeee 100644 --- a/test/boulder-config.json +++ b/test/boulder-config.json @@ -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": {