MCPcopy
hub / github.com/perkeep/perkeep / checkMatchingKeys

Method checkMatchingKeys

pkg/client/client.go:1417–1426  ·  view source on GitHub ↗

checkMatchingKeys compares the client's and the server's keys and logs if they differ.

()

Source from the content-addressed store, hash-verified

1415
1416// checkMatchingKeys compares the client's and the server's keys and logs if they differ.
1417func (c *Client) checkMatchingKeys() {
1418 serverKey, err := c.ServerKeyID()
1419 if err != nil {
1420 log.Printf("Warning: Could not obtain ther server's key id: %v", err)
1421 return
1422 }
1423 if serverKey != c.signer.KeyIDLong() {
1424 log.Printf("Warning: client (%s) and server (%s) keys differ.", c.signer.KeyIDLong(), serverKey)
1425 }
1426}
1427
1428func (c *Client) UploadAndSignBlob(ctx context.Context, b schema.AnyBlob) (*PutResult, error) {
1429 signed, err := c.signBlob(ctx, b.Blob(), time.Time{})

Callers 2

UploadAndSignBlobMethod · 0.95

Calls 3

ServerKeyIDMethod · 0.95
PrintfMethod · 0.80
KeyIDLongMethod · 0.80

Tested by

no test coverage detected