Ejemplo n.º 1
0
const UInt8* RTMP::ValidateClient(Crypto& crypto,BinaryReader& reader,bool& middleKey) {
	middleKey=false;
	UInt32 position = reader.position();
	const UInt8* keyChallenge = ValidateClientScheme(crypto,reader, false);
	if (!keyChallenge) {
		keyChallenge = ValidateClientScheme(crypto,reader, true);
		middleKey = true;
	}
	reader.reset(position);
	return keyChallenge;
}
Ejemplo n.º 2
0
bool InboundRTMPProtocol::ValidateClient(IOBuffer &inputBuffer) {
	if (_currentFPVersion == 0) {
		WARN("This version of player doesn't support validation");
		return false;
	}
	if (ValidateClientScheme(inputBuffer, 0)) {
		_handshakeScheme = 0;
		return true;
	}
	if (ValidateClientScheme(inputBuffer, 1)) {
		_handshakeScheme = 1;
		return true;
	}
	FATAL("Unable to validate client");
	return false;
}