Browse Source

Increase the tentp max framesize to 64 kib.

Yawning Angel 4 years ago
parent
commit
5a58b8ab51
2 changed files with 4 additions and 7 deletions
  1. 2 2
      framing/tentp/tentp.go
  2. 2 5
      framing/tentp/tentp_test.go

+ 2 - 2
framing/tentp/tentp.go

@@ -44,12 +44,12 @@ const (
 	// MaxPlaintextRecordSize is the maximum length of a message payload that
 	// can be sent per record.  (The length of payload + padding is also
 	// limited to this maximum value).
-	MaxPlaintextRecordSize = 16383
+	MaxPlaintextRecordSize = 65535
 
 	// MaxPaddingSize is the maximum length of padding that can be sent per
 	// record.  (The length of payload + padding is also limited to this
 	// maximum value).
-	MaxPaddingSize = 16383
+	MaxPaddingSize = 65535
 
 	// FramingOverhead is the amount of constant overhead incurred regardless
 	// of payload/padding length (24 bytes).

+ 2 - 5
framing/tentp/tentp_test.go

@@ -43,11 +43,8 @@ func TestTentpSmoke(t *testing.T) {
 		t.Fatalf("failed to initialize decoder: %v", err)
 	}
 
-	// The full version of this takes... quite a while (~2 mins on an i5).
-	padIters := 10
-	if testing.Short() {
-		padIters = 2
-	}
+	// This used to be 10, but since I increased the framesize...
+	padIters := 2
 
 	for i := 0; i <= MaxPlaintextRecordSize; i++ {
 		var sndCmd [1]byte