Skip to content

Commit

Permalink
Fix plaintext backup in transit (#3692)
Browse files Browse the repository at this point in the history
  • Loading branch information
briankassouf authored and jefferai committed Dec 15, 2017
1 parent a401cc7 commit 13b776e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions helper/keysutil/lock_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ type PolicyRequest struct {

// Whether to upsert
Upsert bool

// Whether to allow plaintext backup
AllowPlaintextBackup bool
}

type LockManager struct {
Expand Down Expand Up @@ -378,10 +381,11 @@ func (lm *LockManager) getPolicyCommon(req PolicyRequest, lockType bool) (*Polic
}

p = &Policy{
Name: req.Name,
Type: req.KeyType,
Derived: req.Derived,
Exportable: req.Exportable,
Name: req.Name,
Type: req.KeyType,
Derived: req.Derived,
Exportable: req.Exportable,
AllowPlaintextBackup: req.AllowPlaintextBackup,
}
if req.Derived {
p.KDF = Kdf_hkdf_sha256
Expand Down

0 comments on commit 13b776e

Please sign in to comment.