add some cryptosetup tests

This commit is contained in:
Lucas Clemente
2016-04-17 00:22:41 +02:00
parent ac0eed61f2
commit cbbf29e3d5
2 changed files with 69 additions and 2 deletions

View File

@@ -116,6 +116,10 @@ func (h *CryptoSetup) HandleCryptoMessage(data []byte) ([]byte, error) {
// We have an inacholate or non-matching CHLO, we now send a rejection
return h.handleInchoateCHLO(data)
}
func (h *CryptoSetup) handleInchoateCHLO(data []byte) ([]byte, error) {
var chloOrNil []byte
if h.version > protocol.VersionNumber(30) {
chloOrNil = data