Documentation
¶
Index ¶
- func GenerateBundle(logger *zap.Logger, keySets []KeySet) (cborBundle []byte, err error)
- func GenerateSignedBundle(logger *zap.Logger, keySets []KeySet, signKey *ecdsa.PrivateKey, kid []byte) (signedBundle []byte, err error)
- func NewKeyID(pub *ecdsa.PublicKey) []byte
- func NewRandomString() []byte
- func RollKeys(logger *zap.Logger, writeDebugFiles bool, debugFilePath string, ...) ([]byte, *ecdsa.PrivateKey, []byte, error)
- func WriteHexFile(key []byte, target string) error
- type Bundle
- type KeyManager
- type KeyRecord
- type KeySet
- type SubmitKeysRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateBundle ¶
GenerateBundle generates an unsigned bundle.
func GenerateSignedBundle ¶
func GenerateSignedBundle( logger *zap.Logger, keySets []KeySet, signKey *ecdsa.PrivateKey, kid []byte, ) (signedBundle []byte, err error)
GenerateSignedBundle creates a SignMessage containing the bundle, signed with signKey.
func NewRandomString ¶
func NewRandomString() []byte
func WriteHexFile ¶
Types ¶
type KeyManager ¶
type KeyManager struct {
// contains filtered or unexported fields
}
func (*KeyManager) GenerateSignedBundle ¶
func (*KeyManager) GetKeyID ¶
func (km *KeyManager) GetKeyID() []byte
func (*KeyManager) GetRawCert ¶
func (km *KeyManager) GetRawCert() []byte
func (*KeyManager) GetSigningKey ¶
func (km *KeyManager) GetSigningKey() *ecdsa.PrivateKey
func (*KeyManager) SetKeyID ¶
func (km *KeyManager) SetKeyID(id []byte)
type KeyRecord ¶
type KeyRecord struct { gorm.Model CredType credential.Type AESKey []byte ECCKey []byte OrgID string ValidFrom time.Time ValidTo time.Time }
KeyRecord represents a keyset in the database. This is only for use with GORM. Use the KeySet type instead TODO replace this with a better solution.
type KeySet ¶
type KeySet struct { CredType credential.Type AESKey []byte ECCKey *ecdsa.PublicKey `gorm:"type:bytes"` OrgID string ValidFrom time.Time `cbor:"-"` ValidTo time.Time `cbor:"-"` }
func GetValidKeySets ¶
func KeySetFromCBOR ¶ added in v0.2.6
func ParseSubmitKeysRequest ¶
func (*KeySet) MarshalCBOR ¶
type SubmitKeysRequest ¶
type SubmitKeysRequest struct { CredType credential.Type AesKey cbor.RawMessage ECCKey cbor.RawMessage }
Click to show internal directories.
Click to hide internal directories.