Browse Source

Let's use constant instead of hardcoding values (same is done in bssl)

v1.2.3
Henry D. Case 6 years ago
parent
commit
ad86d61c42
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      conn.go

+ 2
- 2
conn.go View File

@@ -365,8 +365,8 @@ func (hc *halfConn) decrypt(b *block) (ok bool, prefixLen int, alertValue alert)
}
// Check AD header, see 5.2 of RFC8446
additionalData = make([]byte, 5)
additionalData[0] = 23
binary.BigEndian.PutUint16(additionalData[1:], 0x0303)
additionalData[0] = byte(recordTypeApplicationData)
binary.BigEndian.PutUint16(additionalData[1:], VersionTLS12)
binary.BigEndian.PutUint16(additionalData[3:], uint16(len(payload)))
}
var err error


Loading…
Cancel
Save