Bump dependencies (rcw hardening)

This commit is contained in:
2026-02-13 18:23:38 -05:00
parent 273e86d97e
commit f9aeca5ba9
12 changed files with 46 additions and 48 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ func LibmuttonInit(inputCB func(prompt string) string, rcwPassword []byte, appen
// RCWSanityCheckGen generates the RCW sanity check file for libmutton.
func RCWSanityCheckGen(password []byte) error {
if err := wrappers.GenSanityCheck(global.CfgDir+global.PathSeparator+"sanity.rcw", password); err != nil {
if err := wrappers.GenSanityCheck(global.CfgDir+global.PathSeparator+"sanity.rcw", password, true); err != nil {
return errors.New("unable to generate sanity check file: " + err.Error())
}
return nil
+3 -3
View File
@@ -78,7 +78,7 @@ func EntryRefresh(oldRCWPassword, newRCWPassword []byte, removeOldDir bool) erro
if err != nil {
return errors.New("unable to open \"" + realPath + "\" for decryption: " + err.Error())
}
decBytes, err := wrappers.Decrypt(encBytes, oldRCWPassword)
decBytes, err := wrappers.Decrypt(encBytes, oldRCWPassword, false)
if err != nil {
return err
}
@@ -87,7 +87,7 @@ func EntryRefresh(oldRCWPassword, newRCWPassword []byte, removeOldDir bool) erro
decSlice := clampTrailingWhitespace(strings.Split(string(decBytes), "\n"))
// re-encrypt the entry with the new password
encBytes = wrappers.Encrypt([]byte(strings.Join(decSlice, "\n")), newRCWPassword)
encBytes = wrappers.Encrypt([]byte(strings.Join(decSlice, "\n")), newRCWPassword, true, false)
// write the entry to the new directory
if err = os.WriteFile(global.EntryRoot+"-new"+strings.ReplaceAll(vanityPath, "/", global.PathSeparator), encBytes, 0600); err != nil {
@@ -124,7 +124,7 @@ func VerifyEntries(rcwPassword []byte) error {
if err != nil {
return errors.New("unable to open \"" + realPath + "\" for decryption: " + err.Error())
}
decBytes, err := wrappers.Decrypt(encBytes, rcwPassword)
decBytes, err := wrappers.Decrypt(encBytes, rcwPassword, false)
if err != nil {
return errors.New("unable to verify \"" + vanityPath + "\" (decryption failure): " + err.Error())
}