273
|
1 /*
|
|
2 * Copyright (c) 2006-2013 Christian Plattner. All rights reserved.
|
|
3 * Please refer to the LICENSE.txt for licensing details.
|
|
4 */
|
|
5 package ch.ethz.ssh2.server;
|
|
6
|
|
7 import java.net.Socket;
|
|
8
|
|
9 import ch.ethz.ssh2.ServerAuthenticationCallback;
|
|
10 import ch.ethz.ssh2.ServerConnection;
|
|
11 import ch.ethz.ssh2.ServerConnectionCallback;
|
|
12 import ch.ethz.ssh2.auth.ServerAuthenticationManager;
|
|
13 import ch.ethz.ssh2.channel.ChannelManager;
|
|
14 import ch.ethz.ssh2.crypto.CryptoWishList;
|
344
|
15 import ch.ethz.ssh2.crypto.SecureRandomFix;
|
281
|
16 import java.security.KeyPair;
|
|
17 import java.security.PrivateKey;
|
|
18 import java.security.interfaces.DSAPrivateKey;
|
|
19 import java.security.interfaces.ECPrivateKey;
|
278
|
20 import java.security.interfaces.RSAPrivateKey;
|
273
|
21 import ch.ethz.ssh2.transport.ClientServerHello;
|
|
22 import ch.ethz.ssh2.transport.ServerTransportManager;
|
|
23
|
307
|
24 public class ServerConnectionState {
|
|
25 public ServerConnection conn;
|
281
|
26
|
344
|
27 public SecureRandomFix generator = new SecureRandomFix();
|
281
|
28
|
307
|
29 public String softwareversion;
|
281
|
30
|
307
|
31 //public String auth_banner = null;
|
|
32 public ServerConnectionCallback cb_conn;
|
|
33 public ServerAuthenticationCallback cb_auth;
|
281
|
34
|
307
|
35 /* Settings for the next key exchange */
|
|
36 public CryptoWishList next_cryptoWishList = CryptoWishList.forServer();
|
|
37 public KeyPair next_dsa_key;
|
|
38 public KeyPair next_ec_key;
|
|
39 public KeyPair next_rsa_key;
|
281
|
40
|
307
|
41 public Socket s;
|
281
|
42
|
307
|
43 public ClientServerHello csh;
|
|
44 public ServerTransportManager tm;
|
|
45 public ServerAuthenticationManager am;
|
|
46 public ChannelManager cm;
|
281
|
47
|
307
|
48 public boolean flag_auth_serviceRequested = false;
|
|
49 public boolean flag_auth_completed = false;
|
273
|
50
|
307
|
51 public ServerConnectionState(ServerConnection conn) {
|
|
52 this.conn = conn;
|
|
53 }
|
273
|
54 }
|