public.go 536 B

1234567891011121314151617181920212223242526
  1. package tls
  2. // [Psiphon]
  3. // ClientSessionState contains the state needed by clients to resume TLS sessions.
  4. func MakeClientSessionState(
  5. Ticket []uint8,
  6. Vers uint16,
  7. CipherSuite uint16,
  8. MasterSecret []byte,
  9. CreatedAt uint64,
  10. AgeAdd uint32,
  11. UseBy uint64,
  12. ) *ClientSessionState {
  13. css := &ClientSessionState{
  14. ticket: Ticket,
  15. session: &SessionState{
  16. version: Vers,
  17. cipherSuite: CipherSuite,
  18. secret: MasterSecret,
  19. createdAt: CreatedAt,
  20. ageAdd: AgeAdd,
  21. useBy: UseBy,
  22. },
  23. }
  24. return css
  25. }