mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Force state change if encryption used fallback (#2232)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
This commit is contained in:
@@ -60,13 +60,14 @@ func (p planEncryption) EncryptPlan(data []byte) ([]byte, error) {
|
||||
}
|
||||
|
||||
func (p planEncryption) DecryptPlan(data []byte) ([]byte, error) {
|
||||
return p.base.decrypt(data, func(data []byte) error {
|
||||
data, _, err := p.base.decrypt(data, func(data []byte) error {
|
||||
// Check magic bytes
|
||||
if len(data) < 2 || string(data[:2]) != "PK" {
|
||||
return fmt.Errorf("Invalid plan file %v", string(data[:2]))
|
||||
}
|
||||
return nil
|
||||
})
|
||||
return data, err
|
||||
}
|
||||
|
||||
func PlanEncryptionDisabled() PlanEncryption {
|
||||
|
||||
Reference in New Issue
Block a user