"veyron2/security": No direct vom encoding of blessings
Following the guideline of only vom encoding/decoding concrete
types (rather than interfaces), this CL replaces vom encoding/decoding
of objects of type security.Blessings with objects of type
security.WireBlessings.
Additionally it also makes it impossible to encode/decode objects
of type security.Blessings. Blessings objects can be converted to
WireBlessings objects and back, using the MarshalBlessings and
NewBlessings functions respectively.
WSPR counterpart in
https://veyron-review.googlesource.com/#/c/6820
Change-Id: Ie988260de7aebaf685fa0a4485b9e064e09f4e9f
diff --git a/tools/principal/main.go b/tools/principal/main.go
index 15e1121..5112eef 100644
--- a/tools/principal/main.go
+++ b/tools/principal/main.go
@@ -606,7 +606,7 @@
if blessings == nil {
return errors.New("no blessings found")
}
- str, err := base64VomEncode(blessings)
+ str, err := base64VomEncode(security.MarshalBlessings(blessings))
if err != nil {
return fmt.Errorf("base64-VOM encoding failed: %v", err)
}