TlsRSAKeyExchange (Bouncy Castle Library 1.52 API Specification)

org.bouncycastle.crypto.tls

## Class TlsRSAKeyExchange

- java.lang.Object
- - org.bouncycastle.crypto.tls.AbstractTlsKeyExchange
  - - org.bouncycastle.crypto.tls.TlsRSAKeyExchange

- All Implemented Interfaces:
    TlsKeyExchange

      public class TlsRSAKeyExchange
      extends AbstractTlsKeyExchange

  (D)TLS and SSLv3 RSA key exchange.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected byte[]` | `premasterSecret`
    `protected RSAKeyParameters` | `rsaServerPublicKey`
    `protected TlsEncryptionCredentials` | `serverCredentials`
    `protected AsymmetricKeyParameter` | `serverPublicKey`

    - ### Fields inherited from class org.bouncycastle.crypto.tls.AbstractTlsKeyExchange

      `context, keyExchange, supportedSignatureAlgorithms`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TlsRSAKeyExchange(java.util.Vector supportedSignatureAlgorithms)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `generateClientKeyExchange(java.io.OutputStream output)`
    `byte[]` | `generatePremasterSecret()`
    `void` | `processClientCredentials(TlsCredentials clientCredentials)`
    `void` | `processClientKeyExchange(java.io.InputStream input)`
    `void` | `processServerCertificate(Certificate serverCertificate)`
    `void` | `processServerCredentials(TlsCredentials serverCredentials)`
    `void` | `skipServerCredentials()`
    `void` | `validateCertificateRequest(CertificateRequest certificateRequest)`
    `protected RSAKeyParameters` | `validateRSAPublicKey(RSAKeyParameters key)`

    - ### Methods inherited from class org.bouncycastle.crypto.tls.AbstractTlsKeyExchange

      `generateServerKeyExchange, init, processClientCertificate, processServerKeyExchange, requiresServerKeyExchange, skipClientCredentials, skipServerKeyExchange`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### serverPublicKey

          protected AsymmetricKeyParameter serverPublicKey

    - #### rsaServerPublicKey

          protected RSAKeyParameters rsaServerPublicKey

    - #### serverCredentials

          protected TlsEncryptionCredentials serverCredentials

    - #### premasterSecret

          protected byte[] premasterSecret

  - ### Constructor Detail

    - #### TlsRSAKeyExchange

          public TlsRSAKeyExchange(java.util.Vector supportedSignatureAlgorithms)

  - ### Method Detail

    - #### skipServerCredentials

          public void skipServerCredentials()
                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### processServerCredentials

          public void processServerCredentials(TlsCredentials serverCredentials)
                                        throws java.io.IOException

      Specified by:
        `processServerCredentials` in interface `TlsKeyExchange`
      Overrides:
        `processServerCredentials` in class `AbstractTlsKeyExchange`
      Throws:
        `java.io.IOException`

    - #### processServerCertificate

          public void processServerCertificate(Certificate serverCertificate)
                                        throws java.io.IOException

      Specified by:
        `processServerCertificate` in interface `TlsKeyExchange`
      Overrides:
        `processServerCertificate` in class `AbstractTlsKeyExchange`
      Throws:
        `java.io.IOException`

    - #### validateCertificateRequest

          public void validateCertificateRequest(CertificateRequest certificateRequest)
                                          throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### processClientCredentials

          public void processClientCredentials(TlsCredentials clientCredentials)
                                        throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### generateClientKeyExchange

          public void generateClientKeyExchange(java.io.OutputStream output)
                                         throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### processClientKeyExchange

          public void processClientKeyExchange(java.io.InputStream input)
                                        throws java.io.IOException

      Specified by:
        `processClientKeyExchange` in interface `TlsKeyExchange`
      Overrides:
        `processClientKeyExchange` in class `AbstractTlsKeyExchange`
      Throws:
        `java.io.IOException`

    - #### generatePremasterSecret

          public byte[] generatePremasterSecret()
                                         throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### validateRSAPublicKey

          protected RSAKeyParameters validateRSAPublicKey(RSAKeyParameters key)
                                                   throws java.io.IOException

      Throws:
        `java.io.IOException`