diff --git a/pyrdp/mitm/RDPMITM.py b/pyrdp/mitm/RDPMITM.py index 237b936df..c1e8cfad5 100644 --- a/pyrdp/mitm/RDPMITM.py +++ b/pyrdp/mitm/RDPMITM.py @@ -238,6 +238,9 @@ def doClientTls(self): # Wait for server certificate reactor.callLater(1, self.doClientTls) + if cert.get_subject().commonName != self.config.targetHost: + cert.get_subject().commonName = self.config.targetHost + # Clone certificate if necessary. if self.certs: privKey, certFile = self.certs.lookup(cert)