Documentation
¶
Overview ¶
aTLS provides config generation functions to bootstrap attested TLS connections.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAttestationClientTLSConfig ¶
CreateAttestationClientTLSConfig creates a tls.Config object that verifies a certificate with an embedded attestation document.
ATTENTION: The tls.Config ensures freshness of the server's attestation only for the first connection it is used for. If freshness is required, you must create a new tls.Config for each connection or ensure freshness on the protocol level. If freshness is not required, you can reuse this tls.Config.
If no validators are set, the server's attestation document will not be verified. If issuer is nil, the client will be unable to perform mutual aTLS.
func CreateAttestationServerTLSConfig ¶
CreateAttestationServerTLSConfig creates a tls.Config object with a self-signed certificate and an embedded attestation document. Pass a list of validators to enable mutual aTLS. If issuer is nil, no attestation will be embedded.
Types ¶
type FakeAttestationDoc ¶
FakeAttestationDoc is a fake attestation document used for testing.
type FakeIssuer ¶
FakeIssuer fakes an issuer and can be used for tests.
func NewFakeIssuer ¶
func NewFakeIssuer(oid variant.Getter) *FakeIssuer
NewFakeIssuer creates a new FakeIssuer with the given OID.
type FakeValidator ¶
FakeValidator fakes a validator and can be used for tests.
func NewFakeValidator ¶
func NewFakeValidator(oid variant.Getter) *FakeValidator
NewFakeValidator creates a new FakeValidator with the given OID.
type Issuer ¶
type Issuer interface { variant.Getter Issue(ctx context.Context, userData []byte, nonce []byte) (quote []byte, err error) }
Issuer issues an attestation document.