"veyron/security/serialization": Bug fix
Bug: A signature file written by a SigningWriter in one process
cannot be read by a corresponding VerifyingReader in another process
due to a VOM-decode error - "failure trying to convert: [32]uint8 to
reflect type: not possible to convert [32]uint8 to reflect.Type (type:
*vom.vArrayType)"
The problem seem to be in VOM-decoding hash blocks of type [32]uint8
from the signature file. VOM-registering the type [32]uint8 fixes
the problem.
Change-Id: Ic8fb8430af109b0e90b444ddd4a1dc88f4cadc1b
diff --git a/security/serialization/verifying_reader.go b/security/serialization/verifying_reader.go
index 89ce5cc..5e2ceb4 100644
--- a/security/serialization/verifying_reader.go
+++ b/security/serialization/verifying_reader.go
@@ -121,3 +121,7 @@
}
return nil
}
+
+func init() {
+ vom.Register([sha256.Size]byte{})
+}