iaik.security.ssl
Class SignatureSchemeList

java.lang.Object
  extended by iaik.security.ssl.SignatureAndHashAlgorithmList
      extended by iaik.security.ssl.SignatureSchemeList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class SignatureSchemeList
extends SignatureAndHashAlgorithmList

Implements the TLS 1.3 SignatureSchemeList structure used by the SignatureAlgorithms extension as specified by RFC 8446. Note that the TLS 1.3 SignatureSchemeList replaces the TLS 1.2 the SignatureAndHashAlgorithmList. For compatibility reasons iSaSiLk can be used with both, SignatureAndHashAlgorithmList and SignatureSchemeList.

A TLS client/server may use the SignatureAndHashAlgorithm structure to announce the signature/hash algorithms it is able to support to the peer. The client, for instance, may send a SignatureAlgorithms extension with the ClientHello extension list to tell the server which SignatureSchemes the client can process to, e.g., verify the server certificates or, e.g., sign the CertificateVerify message.
The server, for instance, will specify a list of expected SignatureSchemes when sending the CertificateRequest message.

See Also:
SignatureAlgorithms, SignatureScheme, Serialized Form

Field Summary
 
Fields inherited from class iaik.security.ssl.SignatureAndHashAlgorithmList
L_ALL, L_DEFAULT, L_DSA, L_ECDSA, L_EDDSA, L_NONE, L_RSA, L_RSA_PKCS15, L_RSA_PSS, L_RSA_PSS_PSS, L_RSA_PSS_RSAE
 
Constructor Summary
SignatureSchemeList()
          Creates an empty signature scheme list.
SignatureSchemeList(int which)
          Creates a new signature scheme list with the contents determined by the selection value.
SignatureSchemeList(SignatureScheme signatureScheme)
          Creates a new signature scheme list with the specified signature scheme as its only element.
SignatureSchemeList(SignatureScheme[] signatureSchemes)
          Creates a new signature scheme list from the contents of the given array.
SignatureSchemeList(SignatureSchemeList signatureSchemeList)
          Creates a copy of the given signature scheme list.
SignatureSchemeList(java.lang.String[] signatureSchemes)
          Create a new SignatureSchemeList from an array of signature scheme names.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this signature scheme list.
 java.lang.Object clone(int version)
          Returns a clone of this signature scheme list for the given protocol version.
 
Methods inherited from class iaik.security.ssl.SignatureAndHashAlgorithmList
add, add, clear, contains, ensureAvailable, equals, get, getAll, getDefault, hashCode, insertAt, intersectWith, iterator, remove, remove, size, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SignatureSchemeList

public SignatureSchemeList()
Creates an empty signature scheme list.


SignatureSchemeList

public SignatureSchemeList(int which)
Creates a new signature scheme list with the contents determined by the selection value. It should be one of L_xxx values defined for this class. The resulting list will be sorted and only contain the signature algorithms that are available, i.e. can be used with the installed security provider.

Note that ensureAvailable() is automatically called on the created list.

Parameters:
which - the selection value deciding which type of list shall be created (L_NONE, L_DEFAULT, or L_ALL)
Throws:
IllegalParameterException - if the selection value is not one of

SignatureSchemeList

public SignatureSchemeList(SignatureScheme signatureScheme)
Creates a new signature scheme list with the specified signature scheme as its only element.

Parameters:
signatureScheme - the signature scheme

SignatureSchemeList

public SignatureSchemeList(SignatureScheme[] signatureSchemes)
Creates a new signature scheme list from the contents of the given array. If a signature scheme occurs multiple times in the array only the first occurrence is used.

Parameters:
signatureSchemes - the array of signature schemes

SignatureSchemeList

public SignatureSchemeList(SignatureSchemeList signatureSchemeList)
Creates a copy of the given signature scheme list.

Parameters:
signatureSchemeList - the signature scheme list to be copied

SignatureSchemeList

public SignatureSchemeList(java.lang.String[] signatureSchemes)
                    throws java.lang.IllegalArgumentException
Create a new SignatureSchemeList from an array of signature scheme names. If a signature scheme occurs multiple times in the array only the first occurrence is used.

Parameters:
signatureSchemes - the signature scheme names
Throws:
java.lang.IllegalArgumentException - if the list of signature scheme names refers a signature scheme that is not supported
Method Detail

clone

public java.lang.Object clone()
Returns a clone of this signature scheme list.

Overrides:
clone in class SignatureAndHashAlgorithmList
Returns:
the clone of this list

clone

public java.lang.Object clone(int version)
Returns a clone of this signature scheme list for the given protocol version.

Overrides:
clone in class SignatureAndHashAlgorithmList
Parameters:
version - the protocol version
Returns:
the clone of this list for the given protocol version

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

iSaSiLk 6.0, (c) 2002 IAIK, (c) 2003 - 2015 SIC