comparison src/ch/ethz/ssh2/packets/PacketKexDHReply.java @ 307:071eccdff8ea ganymed

fix java formatting
author Carl Byington <carl@five-ten-sg.com>
date Wed, 30 Jul 2014 14:16:58 -0700
parents 91a31873c42a
children
comparison
equal deleted inserted replaced
305:d2b303406d63 307:071eccdff8ea
34 payload = tw.getBytes(); 34 payload = tw.getBytes();
35 } 35 }
36 36
37 public PacketKexDHReply(byte payload[]) throws IOException { 37 public PacketKexDHReply(byte payload[]) throws IOException {
38 this.payload = payload; 38 this.payload = payload;
39
40 TypesReader tr = new TypesReader(payload); 39 TypesReader tr = new TypesReader(payload);
41
42 int packet_type = tr.readByte(); 40 int packet_type = tr.readByte();
43 41
44 if(packet_type != Packets.SSH_MSG_KEXDH_REPLY) { 42 if (packet_type != Packets.SSH_MSG_KEXDH_REPLY) {
45 throw new PacketTypeException(packet_type); 43 throw new PacketTypeException(packet_type);
46 } 44 }
45
47 hostKey = tr.readByteString(); 46 hostKey = tr.readByteString();
48 f = tr.readMPINT(); 47 f = tr.readMPINT();
49 signature = tr.readByteString(); 48 signature = tr.readByteString();
50 49
51 if(tr.remain() != 0) { 50 if (tr.remain() != 0) {
52 throw new PacketFormatException(String.format("Padding in %s", Packets.getMessageName(packet_type))); 51 throw new PacketFormatException(String.format("Padding in %s", Packets.getMessageName(packet_type)));
53 } 52 }
54 } 53 }
55 54
56 public byte[] getPayload() { 55 public byte[] getPayload() {