Skip to content

Commit

Permalink
Merge pull request #308 from unicomp21/master
Browse files Browse the repository at this point in the history
surface disable fingerprint verification
  • Loading branch information
murat-dogan authored Nov 22, 2024
2 parents be38609 + 2ab06c9 commit 00c255d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface RtcConfig {
maxMessageSize?: number;
mtu?: number;
iceTransportPolicy?: TransportPolicy;
disableFingerprintVerification?: boolean;
}
export const enum RelayType {
Expand Down
5 changes: 5 additions & 0 deletions src/cpp/peer-connection-wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ PeerConnectionWrapper::PeerConnectionWrapper(const Napi::CallbackInfo &info) : N
}
}

// Allow skipping fingerprint validation
if (config.Get("disableFingerprintVerification").IsBoolean()) {
rtcConfig.disableFingerprintVerification = config.Get("disableFingerprintVerification").As<Napi::Boolean>();
}

// Create peer-connection
try
{
Expand Down
1 change: 1 addition & 0 deletions src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export interface RtcConfig {
maxMessageSize?: number;
mtu?: number;
iceTransportPolicy?: TransportPolicy;
disableFingerprintVerification?: boolean;
}

// Lowercase to match the description type string from libdatachannel
Expand Down

0 comments on commit 00c255d

Please sign in to comment.