checkMatchingKeys compares the client's and the server's keys and logs if they differ.
()
| 1415 | |
| 1416 | // checkMatchingKeys compares the client's and the server's keys and logs if they differ. |
| 1417 | func (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 | |
| 1428 | func (c *Client) UploadAndSignBlob(ctx context.Context, b schema.AnyBlob) (*PutResult, error) { |
| 1429 | signed, err := c.signBlob(ctx, b.Blob(), time.Time{}) |
no test coverage detected