devicetrust

package
v0.0.0-...-5c79d48 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDeviceKeyNotFound = errors.New("device key not found")

ErrDeviceKeyNotFound is raised for missing device key during device authentication. May be raised in situations where the binary is missing entitlements, as Sec/Keychain queries return empty in both cases. If checking for equality always use errors.Is, as other errors may "impersonate" this error.

View Source
var ErrPlatformNotSupported = errors.New("platform not supported")

ErrPlatformNotSupported is raised for device operations attempted on non-supported platforms. trace.NotImplemented is purposefully avoided, as NotImplemented errors are used to detect the lack of server-side device trust support.

Functions

func AttestationParametersFromProto

func AttestationParametersFromProto(in *devicepb.TPMAttestationParameters) attest.AttestationParameters

AttestationParametersFromProto extracts an attest.AttestationParameters from its protobuf representation.

func AttestationParametersToProto

func AttestationParametersToProto(in attest.AttestationParameters) *devicepb.TPMAttestationParameters

AttestationParametersToProto converts an attest.AttestationParameters to its protobuf representation.

func EncryptedCredentialFromProto

func EncryptedCredentialFromProto(in *devicepb.TPMEncryptedCredential) *attest.EncryptedCredential

EncryptedCredentialFromProto extracts an attest.EncryptedCredential from its protobuf representation.

func EncryptedCredentialToProto

func EncryptedCredentialToProto(in *attest.EncryptedCredential) *devicepb.TPMEncryptedCredential

EncryptedCredentialToProto converts an attest.EncryptedCredential to its protobuf representation.

func FriendlyDeviceEnrollStatus

func FriendlyDeviceEnrollStatus(enrollStatus devicepb.DeviceEnrollStatus) string

FriendlyOSType returns a user-friendly DeviceEnrollStatus representation. Recommended for user-facing messages.

func FriendlyOSType

func FriendlyOSType(osType devicepb.OSType) string

FriendlyOSType returns a user-friendly OSType representation. Recommended for user-facing messages.

func HandleUnimplemented

func HandleUnimplemented(err error) error

HandleUnimplemented turns remote unimplemented errors to a more user-friendly error.

func PlatformAttestationFromProto

func PlatformAttestationFromProto(in *devicepb.TPMPlatformAttestation) (platParams *attest.PlatformParameters, nonce []byte)

PlatformAttestationFromProto extracts a attest.PlatformParameters and nonce from a PlatformAttestation proto message.

func PlatformAttestationToProto

func PlatformAttestationToProto(in *attest.PlatformParameters, nonce []byte) *devicepb.TPMPlatformAttestation

PlatformAttestationToProto converts an *attest.PlatformParameters and nonce to a PlatformAttestation proto message.

func PlatformParametersFromProto

func PlatformParametersFromProto(in *devicepb.TPMPlatformParameters) *attest.PlatformParameters

PlatformParametersFromProto extracts an attest.PlatformParameters from its protobuf representation.

func PlatformParametersToProto

func PlatformParametersToProto(in *attest.PlatformParameters) *devicepb.TPMPlatformParameters

PlatformParametersToProto converts an attest.PlatformParameters to its protobuf representation.

Types

This section is empty.

Directories

Path Synopsis
Package native implements OS-specific methods required by Device Trust.
Package native implements OS-specific methods required by Device Trust.

Jump to

Keyboard shortcuts

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