common

package
v0.0.2411 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Copyright 2024 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2022-2024 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2021-2024 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClaimsToMap

func ClaimsToMap(mapper ClaimMapper) (map[string]interface{}, error)

func DecodePemSubjectPubKeyInfo

func DecodePemSubjectPubKeyInfo(key []byte) (crypto.PublicKey, error)

DecodePemSubjectPubKeyInfo decodes a PEM encoded SubjectPublicKeyInfo

func GetImplID

func GetImplID(scheme string, attr json.RawMessage) (string, error)

func GetInstID

func GetInstID(scheme string, attr json.RawMessage) (string, error)

func MapToCCAPlatformClaims added in v0.0.2410

func MapToCCAPlatformClaims(in map[string]interface{}) (platform.IClaims, error)

func MapToPSAClaims added in v0.0.2410

func MapToPSAClaims(in map[string]interface{}) (psatoken.IClaims, error)

func UnsignedCorimDecoder

func UnsignedCorimDecoder(
	data []byte,
	xtr IExtractor,
) (*handler.EndorsementHandlerResponse, error)

Types

type CcaPlatformWrapper added in v0.0.2410

type CcaPlatformWrapper struct {
	C platform.IClaims
}

func (CcaPlatformWrapper) MarshalJSON added in v0.0.2410

func (o CcaPlatformWrapper) MarshalJSON() ([]byte, error)

type CcaRealmWrapper added in v0.0.2410

type CcaRealmWrapper struct {
	C realm.IClaims
}

func (CcaRealmWrapper) MarshalJSON added in v0.0.2410

func (o CcaRealmWrapper) MarshalJSON() ([]byte, error)

type ClaimMapper

type ClaimMapper interface {
	MarshalJSON() ([]byte, error)
}

type IExtractor

type IExtractor interface {
	RefValExtractor(comid.ValueTriples) ([]*handler.Endorsement, error)
	TaExtractor(comid.KeyTriple) (*handler.Endorsement, error)
	SetProfile(string)
}

IExtractor is the interface that CoRIM plugins need to implement to hook into the UnsignedCorimDecoder logics. Each extractor consumes a specific CoMID triple and produces a corresponding Veraison Endorsement format (or an error).

Note: At the moment the interface is limited by the known use cases. We anticipate that in the future there will to be an extractor for each of the defined CoMID triples, plus maybe a way to handle cross-triples checks as well as extraction from the "global" CoRIM context. See also https://github.com/veraison/services/issues/70

type PsaPlatformWrapper added in v0.0.2410

type PsaPlatformWrapper struct {
	C psatoken.IClaims
}

func (PsaPlatformWrapper) MarshalJSON added in v0.0.2410

func (o PsaPlatformWrapper) MarshalJSON() ([]byte, error)

Directories

Path Synopsis
arm
cca

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL