Skip to content

Commit

Permalink
RA: inform publisher of CT submission type (#7164)
Browse files Browse the repository at this point in the history
Have the RA populate the new pubpb.Request.Kind field, along side the
deprecated pubpb.Request.Precert field, so that the publisher has more
detailed information about what kind of CT submission this is.

Fixes #7161
  • Loading branch information
aarongable authored Nov 27, 2023
1 parent e1a8a2e commit a31429f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ctpolicy/ctpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ func (ctp *CTPolicy) GetSCTs(ctx context.Context, cert core.CertDER, expiration
LogPublicKey: key,
Der: cert,
Precert: true,
Kind: pubpb.SubmissionType_sct,
})
if err != nil {
return nil, url, fmt.Errorf("ct submission to %q (%q) failed: %w", g, url, err)
Expand Down Expand Up @@ -200,8 +201,10 @@ func (ctp *CTPolicy) GetSCTs(ctx context.Context, cert core.CertDER, expiration
// It neither waits for these submission to complete, nor tracks their success.
func (ctp *CTPolicy) submitAllBestEffort(blob core.CertDER, isPrecert bool, expiry time.Time) {
logs := ctp.finalLogs
kind := pubpb.SubmissionType_final
if isPrecert {
logs = ctp.infoLogs
kind = pubpb.SubmissionType_info
}

for _, group := range logs {
Expand All @@ -218,6 +221,7 @@ func (ctp *CTPolicy) submitAllBestEffort(blob core.CertDER, isPrecert bool, expi
LogPublicKey: log.Key,
Der: blob,
Precert: isPrecert,
Kind: kind,
},
)
if err != nil {
Expand Down

0 comments on commit a31429f

Please sign in to comment.