-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove extension key validation to permit custom flags/extensions
- Loading branch information
1 parent
ec38993
commit 7a708ff
Showing
2 changed files
with
2 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -482,6 +482,8 @@ def test_extensions_field(self): | |
"permit-port-forwarding", | ||
"permit-pty", | ||
"permit-user-rc", | ||
"[email protected]", | ||
"[email protected]" | ||
] | ||
|
||
self.assertRandomResponse( | ||
|
@@ -492,25 +494,6 @@ def test_extensions_field(self): | |
], | ||
) | ||
|
||
def test_invalid_extensions_field(self): | ||
field = _FIELD.CriticalOptionsField([ValueError, "permit-pty", b"unpermit"]) | ||
field.validate() | ||
|
||
self.assertFieldContainsException(field, _EX.InvalidDataException) | ||
|
||
field = _FIELD.CriticalOptionsField("InvalidData") | ||
field.validate() | ||
|
||
self.assertFieldContainsException(field, _EX.InvalidDataException) | ||
|
||
field = _FIELD.CriticalOptionsField(["no-touch-required", "InvalidOption"]) | ||
field.validate() | ||
|
||
self.assertFieldContainsException(field, _EX.InvalidDataException) | ||
|
||
with self.assertRaises(_EX.InvalidDataException): | ||
field.encode(ValueError) | ||
|
||
def test_reserved_field(self): | ||
self.assertExpectedResponse(_FIELD.ReservedField, "", b"\x00\x00\x00\x00") | ||
|
||
|