Skip to content

Commit

Permalink
Support for ignoring fingerprint checks in PeerConnection.
Browse files Browse the repository at this point in the history
xicilion committed May 10, 2024
1 parent 919f06e commit 7060347
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/rtc/configuration.hpp
Original file line number Diff line number Diff line change
@@ -77,6 +77,7 @@ struct RTC_CPP_EXPORT Configuration {
bool disableAutoNegotiation = false;
bool disableAutoGathering = false;
bool forceMediaTransport = false;
bool skipCheckFingerprint = false;

// Port range
uint16_t portRangeBegin = 1024;
3 changes: 3 additions & 0 deletions src/impl/peerconnection.cpp
Original file line number Diff line number Diff line change
@@ -426,6 +426,9 @@ bool PeerConnection::checkFingerprint(const std::string &fingerprint) const {
if (!mRemoteDescription || !mRemoteDescription->fingerprint())
return false;

if (config.skipCheckFingerprint)
return true;

auto expectedFingerprint = mRemoteDescription->fingerprint()->value;
if (expectedFingerprint == fingerprint) {
PLOG_VERBOSE << "Valid fingerprint \"" << fingerprint << "\"";

0 comments on commit 7060347

Please sign in to comment.