Comparison

core/s2smanager.lua @ 4512:eb97612bf42b

Merge with 0.9
author Matthew Wild <mwild1@gmail.com>
date Sat, 25 Feb 2012 17:21:15 +0000
parent 4510:b827401581c5
parent 4511:92597f6223de
child 4518:f2d695d2e31e
comparison
equal deleted inserted replaced
4510:b827401581c5 4512:eb97612bf42b
510 session.cert_chain_status = "invalid"; 510 session.cert_chain_status = "invalid";
511 else 511 else
512 (session.log or log)("debug", "certificate chain validation result: valid"); 512 (session.log or log)("debug", "certificate chain validation result: valid");
513 session.cert_chain_status = "valid"; 513 session.cert_chain_status = "valid";
514 514
515 local host = session.direction == "incoming" and session.from_host or session.to_host 515 local host;
516 if session.direction == "incoming" then
517 host = session.from_host;
518 else
519 host = session.to_host;
520 end
516 521
517 -- We'll go ahead and verify the asserted identity if the 522 -- We'll go ahead and verify the asserted identity if the
518 -- connecting server specified one. 523 -- connecting server specified one.
519 if host then 524 if host then
520 if cert_verify_identity(host, "xmpp-server", cert) then 525 if cert_verify_identity(host, "xmpp-server", cert) then