deviceattest01

package
v0.0.7-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatTPM = "tpm"
)

Variables

This section is empty.

Functions

func Setup

func Setup(
	keyAuth string,
	akAttrs *keystore.KeyAttributes,
	format AttestationFormat,
	tpm tpm2.TrustedPlatformModule) ([]byte, error)

Generates an attestation statement for the device-attest-01 challenge. https://datatracker.ietf.org/doc/draft-acme-device-attest https://www.w3.org/TR/webauthn/#sctn-tpm-attestation

func Verify

func Verify(
	resolver *net.Resolver,
	ca ca.CertificateAuthority,
	domain, port, challengeToken, expectedKeyAuth string) error

Verifies the device-attest-01 challenge Implements acme.ChallengeVerifierFunc

Types

type AttestationFormat

type AttestationFormat string

func (AttestationFormat) String

func (format AttestationFormat) String() string

type AttestationObject

type AttestationObject struct {
	Format       string               `json:"fmt"`
	AttStatement AttestationStatement `json:"attStmt,omitempty"`
}

type AttestationStatement

type AttestationStatement struct {
	Ver      string        `json:"ver"`
	Alg      int64         `json:"alg"`
	X5c      []interface{} `json:"x5c"`
	Sig      []byte        `json:"sig"`
	CertInfo []byte        `json:"certInfo"`
	PubArea  []byte        `json:"pubArea"`
}

Jump to

Keyboard shortcuts

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