(opts editOpts)
| 73 | } |
| 74 | |
| 75 | func edit(opts editOpts) ([]byte, error) { |
| 76 | // Load the file |
| 77 | tree, err := common.LoadEncryptedFileWithBugFixes(common.GenericDecryptOpts{ |
| 78 | Cipher: opts.Cipher, |
| 79 | InputStore: opts.InputStore, |
| 80 | InputPath: opts.InputPath, |
| 81 | IgnoreMAC: opts.IgnoreMAC, |
| 82 | KeyServices: opts.KeyServices, |
| 83 | }) |
| 84 | if err != nil { |
| 85 | return nil, err |
| 86 | } |
| 87 | // Decrypt the file |
| 88 | dataKey, err := common.DecryptTree(common.DecryptTreeOpts{ |
| 89 | Cipher: opts.Cipher, |
| 90 | IgnoreMac: opts.IgnoreMAC, |
| 91 | Tree: tree, |
| 92 | KeyServices: opts.KeyServices, |
| 93 | DecryptionOrder: opts.DecryptionOrder, |
| 94 | }) |
| 95 | if err != nil { |
| 96 | return nil, err |
| 97 | } |
| 98 | |
| 99 | return editTree(opts, tree, dataKey) |
| 100 | } |
| 101 | |
| 102 | type cancelError struct{} |
| 103 |
no test coverage detected