Skip to content

Commit

Permalink
Additional log lines prior to the seed request to assist with debuggi…
Browse files Browse the repository at this point in the history
…ng GAE size limits.

PiperOrigin-RevId: 572055711
  • Loading branch information
mjoliver authored and copybara-github committed Oct 9, 2023
1 parent d27eae8 commit b1c4673
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions appengine/endpoints/seed.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package endpoints
import (
"context"
"crypto/sha256"
"encoding/binary"
"encoding/hex"
"encoding/json"
"errors"
Expand Down Expand Up @@ -173,12 +174,16 @@ func signSeedResponse(ctx context.Context, s models.Seed) (models.SeedResponse,
}
s.Certs = certs

log.Infof(ctx, "certs: %v", len(certs))

jsonSeed, err := json.Marshal(s)
if err != nil {
return models.SeedResponse{},
fmt.Errorf("failed to marshal seed before signing: %v", err)
}

log.Infof(ctx, "marshalled with a total byte size of: %v", binary.Size(jsonSeed))

_, sig, err := appengine.SignBytes(ctx, jsonSeed)
if err != nil {
return models.SeedResponse{},
Expand Down

0 comments on commit b1c4673

Please sign in to comment.