-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Thomac02/master
Merge fixes for secure channel
- Loading branch information
Showing
15 changed files
with
89 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
132,134c132 | ||
< if device.validate_secure_channel_establishment(reply): | ||
< print("Secure session established.") | ||
< | ||
--- | ||
> device.validate_secure_channel_establishment(reply) |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
41d40 | ||
< print("Building secure message...") | ||
46,47c45,46 | ||
< additional_length = 4 + (2 if device.message_control.use_crc else 1) | ||
< self.add_packet_length(command_buffer, additional_length) | ||
--- | ||
> # additional_length = 4 + (device.message_control.use_crc ? 2 : 1) | ||
> # self.add_packet_length(command_buffer, additional_length) |
Empty file.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
33c33 | ||
< | ||
--- | ||
> | ||
38c38 | ||
< return ServerCryptogramCommand(self.address, self._secure_channel.server_cryptogram) | ||
--- | ||
> return ServerCryptogramCommand(self.address, self._secure_channel.serverCryptogram) | ||
59d58 | ||
< print("Cryptogram not accepted") |
Empty file.
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
111c111 | ||
< reply = UnknownReply(data, connection_id, issuing_command, device) | ||
--- | ||
> reply = UnknownReply(data, connection_id, issuing_command, Device) | ||
115d114 | ||
< print("Secure block data: ", self.secure_block_data[0]) | ||
159d157 | ||
< print("Extract reply data: ", self.extract_reply_data.hex()) |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
37c37 | ||
< if client_cryptogram != self.generate_key(self.server_random_number, client_random_number, self._enc): | ||
--- | ||
> if client_cryptogram != self.generate_key(self.server_random_number, client_cryptogram, self._enc): | ||
61c61 | ||
< self.server_random_number, | ||
--- | ||
> self._server_random_number, |
Empty file.
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
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
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