Mercurial > 510Connectbot
comparison src/ch/ethz/ssh2/packets/PacketKexDhGexReply.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 |
---|---|
20 private final BigInteger f; | 20 private final BigInteger f; |
21 private final byte[] signature; | 21 private final byte[] signature; |
22 | 22 |
23 public PacketKexDhGexReply(byte payload[]) throws IOException { | 23 public PacketKexDhGexReply(byte payload[]) throws IOException { |
24 TypesReader tr = new TypesReader(payload); | 24 TypesReader tr = new TypesReader(payload); |
25 | |
26 int packet_type = tr.readByte(); | 25 int packet_type = tr.readByte(); |
27 | 26 |
28 if(packet_type != Packets.SSH_MSG_KEX_DH_GEX_REPLY) { | 27 if (packet_type != Packets.SSH_MSG_KEX_DH_GEX_REPLY) { |
29 throw new PacketTypeException(packet_type); | 28 throw new PacketTypeException(packet_type); |
30 } | 29 } |
31 | 30 |
32 hostKey = tr.readByteString(); | 31 hostKey = tr.readByteString(); |
33 f = tr.readMPINT(); | 32 f = tr.readMPINT(); |
34 signature = tr.readByteString(); | 33 signature = tr.readByteString(); |
35 | 34 |
36 if(tr.remain() != 0) { | 35 if (tr.remain() != 0) { |
37 throw new PacketFormatException(String.format("Padding in %s", Packets.getMessageName(packet_type))); | 36 throw new PacketFormatException(String.format("Padding in %s", Packets.getMessageName(packet_type))); |
38 } | 37 } |
39 } | 38 } |
40 | 39 |
41 public BigInteger getF() { | 40 public BigInteger getF() { |