initial server hello implementation

This commit is contained in:
Lucas Clemente
2016-04-16 00:27:30 +02:00
parent a2ef4d2dc8
commit 88f404c19e
2 changed files with 10 additions and 2 deletions

View File

@@ -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