Chromium Code Reviews

Side by Side Diff: services/vanadium/security/wire_blessings.go

Issue 1391243003: Move //mojo/services/X/public/... to //mojo/services/X/... (part 4). (Closed) Base URL: https://github.com/domokit/mojo.git@no_public_3-x-no_public_2-x-no_public_1
Patch Set: copyright header Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « services/vanadium/security/principal_service.go ('k') | services/view_manager/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package main 5 package main
6 6
7 import vpkg "mojo/services/vanadium/security/public/interfaces/principal" 7 import vpkg "mojo/services/vanadium/security/interfaces/principal"
8 8
9 // wireBlessings encapsulates wire format of a set of a Vanadium blessings 9 // wireBlessings encapsulates wire format of a set of a Vanadium blessings
10 // and the corresponding cryptographic proof that binds them to a principal 10 // and the corresponding cryptographic proof that binds them to a principal
11 // (identified by a public key). 11 // (identified by a public key).
12 type wireBlessings struct { 12 type wireBlessings struct {
13 // CertificateChains is an array of chains of certificates that bind 13 // CertificateChains is an array of chains of certificates that bind
14 // a blessing to the public key in the last certificate of the chain. 14 // a blessing to the public key in the last certificate of the chain.
15 CertificateChains [][]certificate 15 CertificateChains [][]certificate
16 } 16 }
17 17
(...skipping 40 matching lines...)
58 // TODO(ataly, gauthamt): Below we only consider the first certificate c hain 58 // TODO(ataly, gauthamt): Below we only consider the first certificate c hain
59 // in the wireBlessings object. We should handle the case when the wireB lessings 59 // in the wireBlessings object. We should handle the case when the wireB lessings
60 // object has more than one certificate chain. 60 // object has more than one certificate chain.
61 // TODO(ataly, gauthamt): We should validate all caveats present in the certificates. 61 // TODO(ataly, gauthamt): We should validate all caveats present in the certificates.
62 var chain []vpkg.Certificate 62 var chain []vpkg.Certificate
63 for _, c := range wb.CertificateChains[0] { 63 for _, c := range wb.CertificateChains[0] {
64 chain = append(chain, vpkg.Certificate{Extension: c.Extension}) 64 chain = append(chain, vpkg.Certificate{Extension: c.Extension})
65 } 65 }
66 return &vpkg.Blessing{chain} 66 return &vpkg.Blessing{chain}
67 } 67 }
OLDNEW
« no previous file with comments | « services/vanadium/security/principal_service.go ('k') | services/view_manager/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine