int protocol = RdpConstants.RDP_NEG_REQ_PROTOCOL_SSL;
if (credssp) {
protocol = RdpConstants.RDP_NEG_REQ_PROTOCOL_HYBRID;
add(
new ClientNtlmsspNegotiate("client_ntlmssp_nego", ntlmState),
new ServerNtlmsspChallenge("server_ntlmssp_challenge", ntlmState),
new ClientNtlmsspPubKeyAuth("client_ntlmssp_auth", ntlmState, sslState, serverHostName, domain, workstation, userName, password),