Skip to content

Commit

Permalink
Merge pull request #1171 from xicilion/skipCheckFingerprint
Browse files Browse the repository at this point in the history
Add option to disable fingerprint validation
  • Loading branch information
paullouisageneau authored May 11, 2024
2 parents 919f06e + 3944b93 commit 3a11fec
Show file tree
Hide file tree
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
Expand Up @@ -77,6 +77,7 @@ struct RTC_CPP_EXPORT Configuration {
bool disableAutoNegotiation = false;
bool disableAutoGathering = false;
bool forceMediaTransport = false;
bool disableFingerprintVerification = false;

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

if (config.disableFingerprintVerification)
return true;

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

0 comments on commit 3a11fec

Please sign in to comment.