From ad86d61c4229dd9ecb5ddf89e4b4a4794b31e415 Mon Sep 17 00:00:00 2001 From: "Henry D. Case" Date: Fri, 10 Aug 2018 18:45:48 +0100 Subject: [PATCH] Let's use constant instead of hardcoding values (same is done in bssl) --- conn.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conn.go b/conn.go index d4baf45..689c5ca 100644 --- a/conn.go +++ b/conn.go @@ -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