Skip to content

Commit

Permalink
seedengine: move into coordinator
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Meyer <[email protected]>
  • Loading branch information
katexochen committed Jun 5, 2024
1 parent b138992 commit c8458fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (s *SeedEngine) DerivePodSecret(policyHash [hashSize]byte) ([]byte, error)
if policyHash == [hashSize]byte{} {
return nil, errors.New("policy hash must not be empty")
}
if bytes.Equal(policyHash[:], s.hashFun().Sum([]byte{})) {
if bytes.Equal(policyHash[:], s.hashFun().Sum(nil)) {
return nil, errors.New("policy hash is the hash of an empty byte slice")
}
return s.hkdfDerive(s.podStateSeed, fmt.Sprintf("POD SECRET %x", policyHash))
Expand All @@ -97,7 +97,7 @@ func (s *SeedEngine) DeriveMeshCAKey(transactionHash [hashSize]byte) (*ecdsa.Pri
if transactionHash == [hashSize]byte{} {
return nil, errors.New("transaction hash must not be empty")
}
if bytes.Equal(transactionHash[:], s.hashFun().Sum([]byte{})) {
if bytes.Equal(transactionHash[:], s.hashFun().Sum(nil)) {
return nil, errors.New("transaction hash is the hash of an empty byte slice")
}
transactionSecret, err := s.hkdfDerive(s.historySeed, fmt.Sprintf("TRANSACTION SECRET %x", transactionHash))
Expand Down
File renamed without changes.

0 comments on commit c8458fc

Please sign in to comment.