public abstract class CertificateTypeExtension extends HelloExtension
HelloExtension.ExtensionType| Modifier and Type | Field and Description |
|---|---|
protected static int |
EXTENSION_TYPE_BITS |
protected static int |
LIST_FIELD_LENGTH_BITS |
LENGTH_BITS, TYPE_BITS| Modifier | Constructor and Description |
|---|---|
protected |
CertificateTypeExtension(HelloExtension.ExtensionType type,
CertificateType certificateType)
Constructs a server-side certificate type extension with a the supported
certificate type.
|
protected |
CertificateTypeExtension(HelloExtension.ExtensionType type,
org.eclipse.californium.elements.util.DatagramReader extensionDataReader)
Constructs a certificate type extension with a list of supported
certificate types, or a selected certificate type chosen by the server.
|
protected |
CertificateTypeExtension(HelloExtension.ExtensionType type,
List<CertificateType> certificateTypes)
Constructs a client-side certificate type extension with a list of supported
certificate types.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addExtensionData(org.eclipse.californium.elements.util.DatagramWriter writer)
Adds binary encoding of this extension's data.
|
List<CertificateType> |
getCertificateTypes() |
int |
getLength()
Gets the overall length of this extension's corresponding Extension struct.
|
boolean |
isClientExtension() |
String |
toString() |
fromExtensionDataReader, toByteArrayprotected static final int LIST_FIELD_LENGTH_BITS
protected static final int EXTENSION_TYPE_BITS
protected CertificateTypeExtension(HelloExtension.ExtensionType type, org.eclipse.californium.elements.util.DatagramReader extensionDataReader)
type - the type of the extension.extensionDataReader - the list of supported certificate types or the
selected certificate type encoded in bytes.NullPointerException - if extension data is nullIllegalArgumentException - if extension data is emptyprotected CertificateTypeExtension(HelloExtension.ExtensionType type, List<CertificateType> certificateTypes)
type - the type of the extension.certificateTypes - the list of supported certificate types.NullPointerException - if certificate types is nullIllegalArgumentException - if certificate types is empty.protected CertificateTypeExtension(HelloExtension.ExtensionType type, CertificateType certificateType)
type - the type of the extension.certificateType - the supported certificate type.NullPointerException - if certificate type is nullpublic boolean isClientExtension()
public int getLength()
HelloExtensionNote that this includes the 2 bytes indicating the extension type.
getLength in class HelloExtensionpublic String toString()
toString in class HelloExtensionprotected void addExtensionData(org.eclipse.californium.elements.util.DatagramWriter writer)
HelloExtensionThis implementation does not do anything. Sub-classes should override this method and use the passed-in writer to add their extension_data bytes to the Extension data structure.
NB: Subclasses MUST NOT write the extension's type code to the writer
as this will already have been done by the HelloExtension.toByteArray() method.
addExtensionData in class HelloExtensionwriter - the writer to use for serializationpublic List<CertificateType> getCertificateTypes()
Copyright © 2023 Eclipse Foundation. All rights reserved.