util.x509: Only compare identity with oid-on-xmppAddr for XMPP services
authorKim Alvefur <zash@zash.se>
Thu, 26 Sep 2013 16:55:39 +0200
changeset 5845 c48f717c2fd6
parent 5844 4f545674b0bc
child 5846 b8c7656481ac
util.x509: Only compare identity with oid-on-xmppAddr for XMPP services
util/x509.lua
--- a/util/x509.lua	Sun Sep 22 04:29:27 2013 +0200
+++ b/util/x509.lua	Thu Sep 26 16:55:39 2013 +0200
@@ -161,7 +161,9 @@
 
 		if sans[oid_xmppaddr] then
 			had_supported_altnames = true
-			if compare_xmppaddr(host, sans[oid_xmppaddr]) then return true end
+			if service == "_xmpp-client" or service == "_xmpp-server" then
+				if compare_xmppaddr(host, sans[oid_xmppaddr]) then return true end
+			end
 		end
 
 		if sans[oid_dnssrv] then