forked from quic-go/quic-go
initial server hello implementation
This commit is contained in:
@@ -58,8 +58,13 @@ func (h *CryptoSetup) HandleCryptoMessage(data []byte) ([]byte, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// TODO: Send SHLO
|
||||
return nil, nil
|
||||
|
||||
var reply bytes.Buffer
|
||||
WriteHandshakeMessage(&reply, TagSHLO, map[Tag][]byte{
|
||||
TagPUBS: h.scfg.kex.PublicKey(),
|
||||
TagVER: protocol.SupportedVersionsAsTags,
|
||||
})
|
||||
return reply.Bytes(), nil
|
||||
}
|
||||
|
||||
// We have an inacholate or non-matching CHLO, we now send a rejection
|
||||
|
||||
@@ -68,4 +68,7 @@ const (
|
||||
TagEXPY Tag = 'E' + 'X'<<8 + 'P'<<16 + 'Y'<<24
|
||||
// TagCERT is the CERT data
|
||||
TagCERT Tag = 0xff545243
|
||||
|
||||
// TagSHLO is the server hello
|
||||
TagSHLO Tag = 'S' + 'H'<<8 + 'L'<<16 + 'O'<<24
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user