blob: 2dedab0db838bdf1b7d6b9c2d6437757a9553fb9 [file] [log] [blame]
// 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.
package security
import "time"
import "v.io/v23/security"
type blessingRootsState map[string][]security.BlessingPattern
type blessingStoreState struct {
// PeerBlessings maps BlessingPatterns to the Blessings object that is to
// be shared with peers which present blessings of their own that match the
// pattern.
//
// All blessings bind to the same public key.
PeerBlessings map[security.BlessingPattern]security.WireBlessings
// DefaultBlessings is the default Blessings to be shared with peers for which
// no other information is available to select blessings.
DefaultBlessings security.WireBlessings
// DischargeCache is the cache of discharges.
// TODO(mattr): This map is deprecated in favor of the Discharges map below.
DischargeCache map[dischargeCacheKey]security.WireDischarge
// DischargeCache is the cache of discharges.
Discharges map[dischargeCacheKey]CachedDischarge
// CacheKeyFormat is the dischargeCacheKey format version. It should incremented
// any time the format of the dischargeCacheKey is changed.
CacheKeyFormat uint32
}
type CachedDischarge struct {
Discharge security.WireDischarge
// CacheTime is the time at which the discharge was first cached.
CacheTime time.Time
}
type dischargeCacheKey [32]byte