PeerIdentity

sealed interface PeerIdentity(source)

Who the peer is according to channel security (DTLS or TLS), already authenticated by that layer. OSCORE and EDHOC identities are separate; the application can authorize on either or both.

Byte arrays are copied in and out, so an identity cannot change after it was checked.

Inheritors

Types

Link copied to clipboard

A validated X.509 chain, DER encoded, end-entity certificate first.

Link copied to clipboard
data object None : PeerIdentity

No channel security.

Link copied to clipboard

The PSK identity the client presented (RFC 4279 §2).

Link copied to clipboard
class RawPublicKey(subjectPublicKeyInfo: ByteArray) : PeerIdentity

The peer's raw public key (RFC 7250) as a DER SubjectPublicKeyInfo. RFC 7252 §9.1.3.2.1 derives the CoAP identifier from it with RFC 6920 (sha-256-120 at least); that lives in kcoap-dtls.

Properties

Link copied to clipboard
abstract val mode: SecurityMode