Module rml_rtmp::handshake[][src]

Expand description

This module provides functionality for handling the RTMP handshake process. There are two types of handshakes that can potentially be seen.

The first is the original RTMP handshake that is defined in the official RTMP specification released by Adobe. However, if a flash client connects using this handshake then the client will not play h.264 video (it is assumed this is only a restriction in flash based clients).

Flash player 9 introduced a new handshake that utilizes SHA digests and Diffie-Hellman encryption key negotiation, and it is required if a connected flash player is going to display h.264 video. While there is no official specifications for this format this module is implemented using a clean-room specification found at https://www.cs.cmu.edu/~dst/Adobe/Gallery/RTMPE.txt.

This handshake module allows for handling both the original and fp9+ handshake methods, and determines which method of verification to use based on the packet 1 it receives. The only time this might fail is if a peer only accepts the originally specified RTMP handshake format exactly and verifies that bytes 4-7 are zeroes. At this point in time any (with the prevalence of h.264 video) all clients and servers should work against the fp9 method so this should not be an issue.

Note: At this point of time we only accept (and send) command bytes of 3, meaning that no encryption is used.

Structs

Handshake

Struct that handles the handshaking process.

HandshakeError

Data pertaining to errors that occurred during the handshaking process.

Enums

HandshakeErrorKind

Enumeration that represents the various errors that can occur during the handshaking process

HandshakeProcessResult

Contains the result after processing bytes for the handshaking process

PeerType

The type of peer being represented by the handshake.