文件:mediasoup-dem/server/node_modules/mediasoup/worker/src/RTC/IceServer.cpp
函数:IceServer::ProcessStunPacket
讲错内容:
正确描述:STUN协议中,FINGERPRINT是STUN消息的指纹,不是证书的指纹。
理由1:函数StunPacket::Parse中,判断有FINGERPRINT属性的情况下,计算STUN消息的指纹:
理由2:RFC 5389 36页
检查远端证书指纹合法性的函数位于CheckRemoteFingerprint:
inline bool DtlsTransport::CheckRemoteFingerprint()
{
certificate = SSL_get_peer_certificate(this->ssl);
...
// Compare the remote fingerprint with the value given via signaling.
ret = X509_digest(certificate, hashFunction, binaryFingerprint, &size);
...
if (this->remoteFingerprint.value != hexFingerprint)
{
...
return false;
}
}