package org.bouncycastle.crypto.tls;

import java.io.IOException;
import java.io.InputStream;

/**
 * A generic class for ciphersuites in TLS 1.0.
 */
abstract class TlsCipherSuite
{
    protected static final short KE_RSA = 1;
    protected static final short KE_RSA_EXPORT = 2;
    protected static final short KE_DHE_DSS = 3;
    protected static final short KE_DHE_DSS_EXPORT = 4;
    protected static final short KE_DHE_RSA = 5;
    protected static final short KE_DHE_RSA_EXPORT = 6;
    protected static final short KE_DH_DSS = 7;
    protected static final short KE_DH_RSA = 8;
    protected static final short KE_DH_anon = 9;
    protected static final short KE_SRP = 10;
    protected static final short KE_SRP_RSA = 11;
    protected static final short KE_SRP_DSS = 12;

    protected abstract TlsCipher createCipher(byte[] ms, byte[] cr, byte[] sr);

    protected abstract void skipServerCertificate() throws IOException;
    protected abstract void processServerCertificate(Certificate serverCertificate,
        CertificateVerifyer verifyer) throws IOException;

    protected abstract void processServerKeyExchange(InputStream is, byte[] cr, byte[] sr)
        throws IOException;
    protected abstract void skipServerKeyExchange() throws IOException;

    protected abstract byte[] generateClientKeyExchange() throws IOException;

    protected abstract byte[] getPremasterSecret();
}

@@ -779,89 +779,8 @@
 2;%0A%0A
-    protected abstract TlsCipher createCipher(byte%5B%5D ms, byte%5B%5D cr, byte%5B%5D sr);%0A%0A
     
@@ -839,32 +839,32 @@
 ws IOException;%0A
+
     protected ab
@@ -982,32 +982,104 @@
 s IOException;%0A%0A
+    protected abstract void skipServerKeyExchange() throws IOException;%0A
     protected ab
@@ -1184,80 +1184,8 @@
 ion;
-%0A    protected abstract void skipServerKeyExchange() throws IOException;
 %0A%0A  
@@ -1253,32 +1253,32 @@
 s IOException;%0A%0A
-
     protected ab
@@ -1312,11 +1312,92 @@
 ecret();
+%0A%0A    protected abstract TlsCipher createCipher(byte%5B%5D ms, byte%5B%5D cr, byte%5B%5D sr);
 %0A%7D%0A

Reorder methods to match the order TlsProtocolHandler will call them during handshake