fix: verify tls cert for non-conformant servers
This commit is contained in:
		
							parent
							
								
									b4c001de2f
								
							
						
					
					
						commit
						e73de2317e
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -52,7 +52,11 @@ impl ServerCertVerifier for MatrixServerVerifier { | ||||||
|             }, |             }, | ||||||
|             None => dns_name |             None => dns_name | ||||||
|         }; |         }; | ||||||
|         self.inner.verify_server_cert(roots, presented_certs, override_name, ocsp_response) | 
 | ||||||
|  |         self.inner.verify_server_cert(roots, presented_certs, override_name, ocsp_response).or_else(|_| { | ||||||
|  |             log::warn!("Server is non-compliant, retrying with original name!"); | ||||||
|  |             self.inner.verify_server_cert(roots, presented_certs, dns_name, ocsp_response) | ||||||
|  |         }) | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue