| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| func (c rpcCall) Security() security.Call { return c.secCall } |
| func (c rpcCall) LocalEndpoint() naming.Endpoint { return nil } |
| func (c rpcCall) RemoteEndpoint() naming.Endpoint { return nil } |
| func fakeContextAndCall(provider, user security.Principal) (*context.T, rpc.ServerCall) { |
| ctx, _ := context.RootContext() |
| return ctx, rpcCall{secCall: security.NewCall(&security.CallParams{ |
| LocalPrincipal: provider, |
| LocalBlessings: blessSelf(provider, "provider"), |
| RemoteBlessings: blessSelf(user, "self-signed-user"), |
| func blessSelf(p security.Principal, name string) security.Blessings { |
| b, err := p.BlessSelf(name) |
| func newCaveat(c security.Caveat, err error) security.Caveat { |