comparison src/ch/ethz/ssh2/auth/AuthenticationManager.java @ 284:4ec87de11e71 ganymed

start conversion from trilead to ganymed
author Carl Byington <carl@five-ten-sg.com>
date Fri, 18 Jul 2014 18:08:56 -0700
parents 3855f58ffd2b
children d2b303406d63
comparison
equal deleted inserted replaced
283:3855f58ffd2b 284:4ec87de11e71
234 tw.writeString("ssh-dss"); 234 tw.writeString("ssh-dss");
235 tw.writeString(pk_enc, 0, pk_enc.length); 235 tw.writeString(pk_enc, 0, pk_enc.length);
236 236
237 byte[] msg = tw.getBytes(); 237 byte[] msg = tw.getBytes();
238 238
239 DSASignature ds = DSASHA1Verify.generateSignature(msg, pk, rnd); 239 byte[] ds = DSASHA1Verify.generateSignature(msg, pk, rnd);
240 240
241 byte[] ds_enc = DSASHA1Verify.encodeSSHDSASignature(ds); 241 byte[] ds_enc = DSASHA1Verify.encodeSSHDSASignature(ds);
242 242
243 PacketUserauthRequestPublicKey ua = new PacketUserauthRequestPublicKey("ssh-connection", user, 243 PacketUserauthRequestPublicKey ua = new PacketUserauthRequestPublicKey("ssh-connection", user,
244 "ssh-dss", pk_enc, ds_enc); 244 "ssh-dss", pk_enc, ds_enc);
263 tw.writeString(pk_enc, 0, pk_enc.length); 263 tw.writeString(pk_enc, 0, pk_enc.length);
264 } 264 }
265 265
266 byte[] msg = tw.getBytes(); 266 byte[] msg = tw.getBytes();
267 267
268 RSASignature ds = RSASHA1Verify.generateSignature(msg, pk); 268 byte[] ds = RSASHA1Verify.generateSignature(msg, pk);
269 269
270 byte[] rsa_sig_enc = RSASHA1Verify.encodeSSHRSASignature(ds); 270 byte[] rsa_sig_enc = RSASHA1Verify.encodeSSHRSASignature(ds);
271 271
272 PacketUserauthRequestPublicKey ua = new PacketUserauthRequestPublicKey("ssh-connection", user, 272 PacketUserauthRequestPublicKey ua = new PacketUserauthRequestPublicKey("ssh-connection", user,
273 "ssh-rsa", pk_enc, rsa_sig_enc); 273 "ssh-rsa", pk_enc, rsa_sig_enc);