public final class CertificateVerify extends HandshakeMessage
ClientKeyExchange message. For further details see RFC 5246.FRAGMENT_LENGTH_BITS, FRAGMENT_OFFSET_BITS, MESSAGE_HEADER_LENGTH_BYTES, MESSAGE_LENGTH_BITS, MESSAGE_SEQ_BITS, MESSAGE_TYPE_BITS| Constructor and Description |
|---|
CertificateVerify(SignatureAndHashAlgorithm signatureAndHashAlgorithm,
PrivateKey clientPrivateKey,
List<HandshakeMessage> handshakeMessages,
InetSocketAddress peerAddress)
Called by client to create its CertificateVerify message.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
fragmentToByteArray()
The serialization of the handshake body (without the handshake header).
|
static HandshakeMessage |
fromReader(org.eclipse.californium.elements.util.DatagramReader reader,
InetSocketAddress peerAddress) |
int |
getMessageLength()
Must be implemented by each subclass.
|
HandshakeType |
getMessageType()
Returns the type of the handshake message.
|
void |
verifySignature(PublicKey clientPublicKey,
List<HandshakeMessage> handshakeMessages)
Tries to verify the client's signature contained in the CertificateVerify
message.
|
fragmentChanged, fromByteArray, fromGenericHandshakeMessage, getContentType, getFragmentLength, getFragmentOffset, getMessageSeq, getNextHandshakeMessage, getRawMessage, setMessageSeq, setNextHandshakeMessage, size, toByteArray, toString, writeTogetPeerpublic CertificateVerify(SignatureAndHashAlgorithm signatureAndHashAlgorithm, PrivateKey clientPrivateKey, List<HandshakeMessage> handshakeMessages, InetSocketAddress peerAddress)
signatureAndHashAlgorithm - the signature and hash algorithm used to create the signature.clientPrivateKey - the client's private key to sign the signature.handshakeMessages - the handshake messages which are signed.peerAddress - the IP address and port of the peer this
message has been received from or should be sent topublic HandshakeType getMessageType()
HandshakeMessageHandshakeType.getMessageType in class HandshakeMessageHandshakeType.public int getMessageLength()
HandshakeMessagegetMessageLength in class HandshakeMessagepublic byte[] fragmentToByteArray()
HandshakeMessageClientHello, the
fragments are considered to be not modified. If a modification is required,
call HandshakeMessage.fragmentChanged().fragmentToByteArray in class HandshakeMessagepublic static HandshakeMessage fromReader(org.eclipse.californium.elements.util.DatagramReader reader, InetSocketAddress peerAddress)
public void verifySignature(PublicKey clientPublicKey, List<HandshakeMessage> handshakeMessages) throws HandshakeException
clientPublicKey - the client's public key.handshakeMessages - the handshake messages exchanged so far.HandshakeException - if the signature could not be verified.Copyright © 2023 Eclipse Foundation. All rights reserved.