fix: nil dereference in when getting public master secret

This commit is contained in:
Mingye Chen 2025-03-01 19:32:38 -07:00
parent d24af4ae55
commit 6c3c017a94

View file

@ -23,4 +23,9 @@ func NewMasterSecretFromSecret[H fips140.Hash](hash func() H, secret []byte) *Ma
}
}
func (s *MasterSecret) Secret() []byte { return s.secret }
func (s *MasterSecret) Secret() []byte {
if s != nil {
return s.secret
}
return nil
}