Alternative TLS implementation in Go
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

44 rindas
1.3 KiB

  1. // Copyright 2009 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package tls
  5. type alertLevel int
  6. type alertType int
  7. const (
  8. alertLevelWarning alertLevel = 1
  9. alertLevelError alertLevel = 2
  10. )
  11. const (
  12. alertCloseNotify alertType = 0
  13. alertUnexpectedMessage alertType = 10
  14. alertBadRecordMAC alertType = 20
  15. alertDecryptionFailed alertType = 21
  16. alertRecordOverflow alertType = 22
  17. alertDecompressionFailure alertType = 30
  18. alertHandshakeFailure alertType = 40
  19. alertBadCertificate alertType = 42
  20. alertUnsupportedCertificate alertType = 43
  21. alertCertificateRevoked alertType = 44
  22. alertCertificateExpired alertType = 45
  23. alertCertificateUnknown alertType = 46
  24. alertIllegalParameter alertType = 47
  25. alertUnknownCA alertType = 48
  26. alertAccessDenied alertType = 49
  27. alertDecodeError alertType = 50
  28. alertDecryptError alertType = 51
  29. alertProtocolVersion alertType = 70
  30. alertInsufficientSecurity alertType = 71
  31. alertInternalError alertType = 80
  32. alertUserCanceled alertType = 90
  33. alertNoRenegotiation alertType = 100
  34. )
  35. type alert struct {
  36. level alertLevel
  37. error alertType
  38. }