[[package]]
name = "openssl"
version = "0.2.2"
-source = "git+https://github.com/sfackler/rust-openssl.git#b8a41f79a1a78791dddd453db0aab5f0957152fc"
+source = "git+https://github.com/sfackler/rust-openssl.git#6cdd2cf577434ca3473c217e8a272ee965ef131f"
dependencies = [
"openssl-sys 0.2.2 (git+https://github.com/sfackler/rust-openssl.git)",
]
[[package]]
name = "openssl-sys"
version = "0.2.2"
-source = "git+https://github.com/sfackler/rust-openssl.git#b8a41f79a1a78791dddd453db0aab5f0957152fc"
+source = "git+https://github.com/sfackler/rust-openssl.git#6cdd2cf577434ca3473c217e8a272ee965ef131f"
dependencies = [
"pkg-config 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
fn read(&mut self) -> ReadingResult {
fn send_error(ep: &mut EndPoint, error_type: packet::ErrorType) {
- match ep.send(Error(error_type)) {
- Err(e) => println!("Unable to send error packet: {}", e),
- Ok(_) => ()
- };
+ if let Err(e) = ep.send(Error(error_type)) {
+ println!("Unable to send error packet: {}", e)
+ }
};
self.socket.set_timeout(DEFAULT_TIMEOUT);
/// 0x0A: Decrypt error
/// 0x0B: Authentication error
/// TTTTTTTT: Timestamp (64 bits)
-/// D...D: Encrypted data (AES-256 CBC mode) of:
-/// |I|C...C|P...P| for command and answer packet:
-/// I: Command ID
-/// C: Command payload (from 7 to 39 bytes)
-/// P: Padding from 1 to 16, |I|C...C|P...P| size must be a multiple of 16
-/// |0000000000000000| for error packet (16 bytes length)
+/// D...D: Encrypted data (AES-256 CBC mode) of:
+/// |I|C...C|P...P| for command and answer packet:
+/// I: Command ID
+/// C: Command payload (from 7 to 39 bytes)
+/// P: Padding from 1 to 16, |I|C...C|P...P| size must be a multiple of 16
+/// |0000000000000000| for error packet (16 bytes length)
/// MMMMMMMMMM: first 10 bytes (most significant) of the HMAC-SHA256 of:
/// for command and answer packet:
/// |I|C...C| for weak variant