ktls_const.go 965 B

123456789101112131415161718192021222324
  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. //go:build linux && go1.25 && badlinkname
  5. package ktls
  6. const (
  7. maxPlaintext = 16384 // maximum plaintext payload length
  8. maxCiphertext = 16384 + 2048 // maximum ciphertext payload length
  9. maxCiphertextTLS13 = 16384 + 256 // maximum ciphertext length in TLS 1.3
  10. recordHeaderLen = 5 // record header length
  11. maxHandshake = 65536 // maximum handshake we support (protocol max is 16 MB)
  12. maxHandshakeCertificateMsg = 262144 // maximum certificate message size (256 KiB)
  13. maxUselessRecords = 16 // maximum number of consecutive non-advancing records
  14. )
  15. const (
  16. recordTypeChangeCipherSpec = 20
  17. recordTypeAlert = 21
  18. recordTypeHandshake = 22
  19. recordTypeApplicationData = 23
  20. )