Documentation ¶
Index ¶
- Variables
- func AttestationParametersFromProto(in *devicepb.TPMAttestationParameters) attest.AttestationParameters
- func AttestationParametersToProto(in attest.AttestationParameters) *devicepb.TPMAttestationParameters
- func EncryptedCredentialFromProto(in *devicepb.TPMEncryptedCredential) *attest.EncryptedCredential
- func EncryptedCredentialToProto(in *attest.EncryptedCredential) *devicepb.TPMEncryptedCredential
- func FriendlyDeviceEnrollStatus(enrollStatus devicepb.DeviceEnrollStatus) string
- func FriendlyOSType(osType devicepb.OSType) string
- func HandleUnimplemented(err error) error
- func PlatformAttestationFromProto(in *devicepb.TPMPlatformAttestation) (platParams *attest.PlatformParameters, nonce []byte)
- func PlatformAttestationToProto(in *attest.PlatformParameters, nonce []byte) *devicepb.TPMPlatformAttestation
- func PlatformParametersFromProto(in *devicepb.TPMPlatformParameters) *attest.PlatformParameters
- func PlatformParametersToProto(in *attest.PlatformParameters) *devicepb.TPMPlatformParameters
Constants ¶
This section is empty.
Variables ¶
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.
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 ¶
FriendlyOSType returns a user-friendly OSType representation. Recommended for user-facing messages.
func HandleUnimplemented ¶
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.