Add warning on old cipher

This commit is contained in:
Bernd Schoolmann 2024-04-29 23:51:09 +02:00
parent 695ba111ab
commit 8fd7c45b9b
No known key found for this signature in database
1 changed files with 3 additions and 1 deletions

View File

@ -58,7 +58,9 @@ func (s *EncString) UnmarshalText(data []byte) error {
}
switch s.Type {
case AesCbc128_HmacSha256_B64, AesCbc256_HmacSha256_B64, AesCbc256_B64:
case AesCbc256_HmacSha256_B64:
case AesCbc128_HmacSha256_B64, AesCbc256_B64:
return errors.New("outdated cipher of type: " + strconv.Itoa(int(s.Type)) + " detected. PLEASE ROTATE YOU VAULT KEYS")
default:
return errors.New("invalid cipher string type, unknown type: " + strconv.Itoa(int(s.Type)))
}