Top Description Fields Constructors Methods
sun.security.internal.spec

public Class TlsRsaPremasterSecretParameterSpec

extends Object
implements AlgorithmParameterSpec
Class Inheritance
All Implemented Interfaces
java.security.spec.AlgorithmParameterSpec
Annotations
@Deprecated
Imports
sun.security.action.GetBooleanAction, java.security.spec.AlgorithmParameterSpec

Deprecated

Sun JDK internal use only --- WILL BE REMOVED in a future release.

Parameters for SSL/TLS RSA premaster secret.

Instances of this class are immutable.

Author
Andreas Sterbenz
Since
1.6

Field Summary

Modifier and TypeField and Description
private final int
private final byte[]
private static final boolean
private final int

Constructor Summary

AccessConstructor and Description
public
TlsRsaPremasterSecretParameterSpec(int
the version of the TLS protocol by which the client wishes to communicate during this session
clientVersion
,
int
the negotiated version of the TLS protocol which contains the lower of that suggested by the client in the client hello and the highest supported by the server.
serverVersion
)

Constructs a new TlsRsaPremasterSecretParameterSpec.

public
TlsRsaPremasterSecretParameterSpec(int
the version of the TLS protocol by which the client wishes to communicate during this session
clientVersion
,
int
the negotiated version of the TLS protocol which contains the lower of that suggested by the client in the client hello and the highest supported by the server.
serverVersion
,
byte[]
the encoded secret key
encodedSecret
)

Constructs a new TlsRsaPremasterSecretParameterSpec.

Method Summary

Modifier and TypeMethod and Description
private int
checkVersion(int version)

public int

Returns:

the version of the TLS protocol in ClientHello message
getClientVersion
()

Returns the version of the TLS protocol by which the client wishes to communicate during this session.

public byte[]

Returns:

the encoded secret, may be null if no encoded secret.
getEncodedSecret
()

Returns the encoded secret.

public int

Returns:

the major version used in RSA premaster secret.
getMajorVersion
()

Returns the major version used in RSA premaster secret.

public int

Returns:

the minor version used in RSA premaster secret.
getMinorVersion
()

Returns the minor version used in RSA premaster secret.

public int

Returns:

the negotiated version of the TLS protocol in ServerHello message
getServerVersion
()

Returns the negotiated version of the TLS protocol which contains the lower of that suggested by the client in the client hello and the highest supported by the server.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clientVersionback to summary
private final int clientVersion
encodedSecretback to summary
private final byte[] encodedSecret
rsaPreMasterSecretFixback to summary
private static final boolean rsaPreMasterSecretFix
serverVersionback to summary
private final int serverVersion

Constructor Detail

TlsRsaPremasterSecretParameterSpecback to summary
public TlsRsaPremasterSecretParameterSpec(int clientVersion, int serverVersion)

Constructs a new TlsRsaPremasterSecretParameterSpec.

Parameters
clientVersion:int

the version of the TLS protocol by which the client wishes to communicate during this session

serverVersion:int

the negotiated version of the TLS protocol which contains the lower of that suggested by the client in the client hello and the highest supported by the server.

Exceptions
IllegalArgumentException:
if clientVersion or serverVersion are negative or larger than (2^16 - 1)
TlsRsaPremasterSecretParameterSpecback to summary
public TlsRsaPremasterSecretParameterSpec(int clientVersion, int serverVersion, byte[] encodedSecret)

Constructs a new TlsRsaPremasterSecretParameterSpec.

Parameters
clientVersion:int

the version of the TLS protocol by which the client wishes to communicate during this session

serverVersion:int

the negotiated version of the TLS protocol which contains the lower of that suggested by the client in the client hello and the highest supported by the server.

encodedSecret:byte[]

the encoded secret key

Exceptions
IllegalArgumentException:
if clientVersion or serverVersion are negative or larger than (2^16 - 1) or if encodedSecret is not exactly 48 bytes

Method Detail

checkVersionback to summary
private int checkVersion(int version)
getClientVersionback to summary
public int getClientVersion()

Returns the version of the TLS protocol by which the client wishes to communicate during this session.

Returns:int

the version of the TLS protocol in ClientHello message

getEncodedSecretback to summary
public byte[] getEncodedSecret()

Returns the encoded secret.

Returns:byte[]

the encoded secret, may be null if no encoded secret.

getMajorVersionback to summary
public int getMajorVersion()

Returns the major version used in RSA premaster secret.

Returns:int

the major version used in RSA premaster secret.

getMinorVersionback to summary
public int getMinorVersion()

Returns the minor version used in RSA premaster secret.

Returns:int

the minor version used in RSA premaster secret.

getServerVersionback to summary
public int getServerVersion()

Returns the negotiated version of the TLS protocol which contains the lower of that suggested by the client in the client hello and the highest supported by the server.

Returns:int

the negotiated version of the TLS protocol in ServerHello message