Mercurial > 510Connectbot
comparison src/ch/ethz/ssh2/packets/PacketKexDHInit.java @ 308:42b15aaa7ac7 ganymed
merge
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 30 Jul 2014 14:21:50 -0700 |
parents | 071eccdff8ea |
children |
comparison
equal
deleted
inserted
replaced
306:90e47d99ea54 | 308:42b15aaa7ac7 |
---|---|
28 payload = tw.getBytes(); | 28 payload = tw.getBytes(); |
29 } | 29 } |
30 | 30 |
31 public PacketKexDHInit(byte payload[]) throws IOException { | 31 public PacketKexDHInit(byte payload[]) throws IOException { |
32 this.payload = payload; | 32 this.payload = payload; |
33 | |
34 TypesReader tr = new TypesReader(payload); | 33 TypesReader tr = new TypesReader(payload); |
35 | |
36 int packet_type = tr.readByte(); | 34 int packet_type = tr.readByte(); |
37 | 35 |
38 if(packet_type != Packets.SSH_MSG_KEXDH_INIT) { | 36 if (packet_type != Packets.SSH_MSG_KEXDH_INIT) { |
39 throw new PacketTypeException(packet_type); | 37 throw new PacketTypeException(packet_type); |
40 } | 38 } |
41 | 39 |
42 e = tr.readMPINT(); | 40 e = tr.readMPINT(); |
43 | 41 |
44 if(tr.remain() != 0) { | 42 if (tr.remain() != 0) { |
45 throw new PacketFormatException(String.format("Padding in %s", Packets.getMessageName(packet_type))); | 43 throw new PacketFormatException(String.format("Padding in %s", Packets.getMessageName(packet_type))); |
46 } | 44 } |
47 } | 45 } |
48 | 46 |
49 public BigInteger getE() { | 47 public BigInteger getE() { |