I have used the client/server chat example to implement my SSL
requirements.
The main part of my requirement is session management
.
I want to:
- Create
SSL
(TLS
) "tunnels" from my clients to the server - The
SSL tunnel
(channel
) will only be opened and available, when specific requirements are fulfilled. Otherwise, the channel and hence the connection will be closed immediately. - To check, if the requirements are fulfilled. The plan is, that the client sends an
ID
to the server. TheID
will be for example assembled using theclient-PC-ID
,Username
,IP-Address
,Timestamp
, etc. ThisID
can be used as thechannel ID
and as aClient-Sesion-ID
, so that the server can locate/track/identify the user.
When creating an SSL
connection, once the configuration is created, I am executing the handshake()
method. The connection is then created and a random Integer
is used as the Channel-ID
. So, on the server side, I have the ID
s of the clients and can send messages to them. But, I want to have my own unique ID
s, which I can also use as session ID
s. And most importantly, the clients will create these ID
s and "login" using them. So I want to decide on the server side - using the ID
created by the client - if the TLS tunnel
(channel
) will be opened (logged-in
) or not (no-access-to-log-in
). This needs the client to send the self-created unique ID
during the handshake
, doesn't it?
Once the client has sent a valid ID
, the server should check, if the SSL-Certificate
is valid, and so on. But this is the next step.
So, the question is, how can I use an ID
sent by the clients? Or is this not possible? Or is it maybe not required? Or maybe it does not make any sense?
Any ideas on that?