@@ -127,7 +127,7 @@ func (ctp *CTPolicy) GetSCTs(ctx context.Context, cert core.CertDER, expiration
127127 go ctp .getOne (subCtx , cert , logs [nextLog ], resChan )
128128 }
129129
130- go ctp .submitPrecertInformational (cert , expiration )
130+ go ctp .submitPrecertInformational (ctx , cert , expiration )
131131
132132 // staggerTicker will be used to start a new submission each stagger interval
133133 staggerTicker := time .NewTicker (ctp .stagger )
@@ -215,7 +215,9 @@ func compliantSet(results []result) core.SCTDERs {
215215// submitAllBestEffort submits the given certificate or precertificate to every
216216// log ("informational" for precerts, "final" for certs) configured in the policy.
217217// It neither waits for these submission to complete, nor tracks their success.
218- func (ctp * CTPolicy ) submitAllBestEffort (blob core.CertDER , kind pubpb.SubmissionType , expiry time.Time ) {
218+ func (ctp * CTPolicy ) submitAllBestEffort (ctx context.Context , blob core.CertDER , kind pubpb.SubmissionType , expiry time.Time ) {
219+ ctx = context .WithoutCancel (ctx )
220+
219221 logs := ctp .finalLogs
220222 if kind == pubpb .SubmissionType_info {
221223 logs = ctp .infoLogs
@@ -228,7 +230,7 @@ func (ctp *CTPolicy) submitAllBestEffort(blob core.CertDER, kind pubpb.Submissio
228230
229231 go func (log loglist.Log ) {
230232 _ , err := ctp .pub .SubmitToSingleCTWithResult (
231- context . Background () ,
233+ ctx ,
232234 & pubpb.Request {
233235 LogURL : log .Url ,
234236 LogPublicKey : base64 .StdEncoding .EncodeToString (log .Key ),
@@ -245,12 +247,12 @@ func (ctp *CTPolicy) submitAllBestEffort(blob core.CertDER, kind pubpb.Submissio
245247
246248// submitPrecertInformational submits precertificates to any configured
247249// "informational" logs, but does not care about success or returned SCTs.
248- func (ctp * CTPolicy ) submitPrecertInformational (cert core.CertDER , expiration time.Time ) {
249- ctp .submitAllBestEffort (cert , pubpb .SubmissionType_info , expiration )
250+ func (ctp * CTPolicy ) submitPrecertInformational (ctx context. Context , cert core.CertDER , expiration time.Time ) {
251+ ctp .submitAllBestEffort (ctx , cert , pubpb .SubmissionType_info , expiration )
250252}
251253
252254// SubmitFinalCert submits finalized certificates created from precertificates
253255// to any configured "final" logs, but does not care about success.
254- func (ctp * CTPolicy ) SubmitFinalCert (cert core.CertDER , expiration time.Time ) {
255- ctp .submitAllBestEffort (cert , pubpb .SubmissionType_final , expiration )
256+ func (ctp * CTPolicy ) SubmitFinalCert (ctx context. Context , cert core.CertDER , expiration time.Time ) {
257+ ctp .submitAllBestEffort (ctx , cert , pubpb .SubmissionType_final , expiration )
256258}
0 commit comments