/** Starts renegotiation on a new session */ @DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 13:01:10.412 -0500", hash_original_method = "A1AF1BC51EE82C9340D705103AD7A155", hash_generated_method = "B095B45DF7DE60E1EB58901C0B717D81") private void renegotiateNewSession() { if (parameters.getEnableSessionCreation()) { isResuming = false; session = new SSLSessionImpl(parameters.getSecureRandom()); if (engineOwner != null) { session.setPeer(engineOwner.getPeerHost(), engineOwner.getPeerPort()); } else { session.setPeer(socketOwner.getInetAddress().getHostName(), socketOwner.getPort()); } session.protocol = ProtocolVersion.getLatestVersion(parameters.getEnabledProtocols()); recordProtocol.setVersion(session.protocol.version); startSession(); } else { status = NOT_HANDSHAKING; sendWarningAlert(AlertProtocol.NO_RENEGOTIATION); } }
/** Starts handshake */ @DSGenerator( tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 13:01:10.409 -0500", hash_original_method = "6C060C09ED0246441EBDE47DFEF048B2", hash_generated_method = "4BC410302B6F252CC3D835E7B02F89AC") @Override public void start() { if (session == null) { // initial handshake session = findSessionToResume(); } else { // start session renegotiation if (clientHello != null && this.status != FINISHED) { // current negotiation has not completed return; // ignore } if (!session.isValid()) { session = null; } } if (session != null) { isResuming = true; } else if (parameters.getEnableSessionCreation()) { isResuming = false; session = new SSLSessionImpl(parameters.getSecureRandom()); if (engineOwner != null) { session.setPeer(engineOwner.getPeerHost(), engineOwner.getPeerPort()); } else { session.setPeer(socketOwner.getInetAddress().getHostName(), socketOwner.getPort()); } session.protocol = ProtocolVersion.getLatestVersion(parameters.getEnabledProtocols()); recordProtocol.setVersion(session.protocol.version); } else { fatalAlert(AlertProtocol.HANDSHAKE_FAILURE, "SSL Session may not be created "); } startSession(); }