mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
21 lines
967 B
Diff
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)
|