attestation.go 509 B

1234567891011121314151617
  1. package liveattestation
  2. import (
  3. "context"
  4. "errors"
  5. )
  6. var (
  7. ErrUnsupportedPlatform = errors.New("live attestation is only supported when Sub2API runs on macOS; Windows support is not implemented yet")
  8. ErrChatGPTAppMissing = errors.New("live attestation requires the official ChatGPT app on the Sub2API server")
  9. )
  10. // Provider 在发起 Live 请求前生成 ChatGPT DeviceCheck attestation。
  11. type Provider interface {
  12. Check(ctx context.Context) error
  13. Generate(ctx context.Context) (string, error)
  14. }