aports/community/booster/support-converted-luks-volumes.patch
Sören Tempel dd79e6548f community/booster: support converted LUKS volumes
Requires vendoring dependencies to patch the luks.go library.
2023-12-23 16:30:43 +00:00

21 lines
967 B
Diff

Without this patch, Booster does not support LUKS volumes that were
converted from LUKS1 to LUKS2. This is due to the digest size of
such volumes.
Taken from: https://github.com/anatol/luks.go/pull/12
See also: https://github.com/anatol/booster/issues/202
diff -upr booster-0.11.orig/vendor/github.com/anatol/luks.go/luks2.go booster-0.11/vendor/github.com/anatol/luks.go/luks2.go
--- booster-0.11.orig/vendor/github.com/anatol/luks.go/luks2.go 2023-12-23 15:56:19.086176223 +0100
+++ booster-0.11/vendor/github.com/anatol/luks.go/luks2.go 2023-12-23 15:56:47.252903832 +0100
@@ -243,7 +243,7 @@ func (d *deviceV2) UnsealVolume(keyslotI
if err != nil {
return nil, fmt.Errorf("keyslotIdx[%v].digest.Digest base64 parsing failed: %v", keyslotIdx, err)
}
- if !bytes.Equal(generatedDigest, expectedDigest) {
+ if !bytes.Equal(generatedDigest[0:len(expectedDigest)], expectedDigest) {
return nil, ErrPassphraseDoesNotMatch
}
clearSlice(generatedDigest)