Permalink
Browse files

using tls creddentials for S2S as well

  • Loading branch information...
1 parent 1ce415c commit ec251d68bdaecd72758059b14d37ba6e287f77f3 @julien51 julien51 committed Dec 23, 2011
Showing with 8 additions and 1 deletion.
  1. +1 −1 lib/server.js
  2. +7 −0 modules/s2s.js
View
@@ -30,7 +30,7 @@ exports.run = function(config, ready) {
DiscoInfo.configure(server, config.disco);
VCard.configure(server, config.vcard);
Websocket.configure(server, config.websocket);
- S2S.configure(server, config.s2s);
+ S2S.configure(server, config);
// On Connect event. When a client connects.
server.on("connect", function(client) {
View
@@ -8,7 +8,14 @@ function S2S() {
exports.configure = function(server, config) {
if(config) {
+ console.log(config);
+
var s2s = new xmpp.Router(config.port, server.options.bindAddress); // We only use 5269 has the default S2S port.
+ // Load TLS key material
+ if (config.tls) {
+ console.log(config.tls);
+ s2s.loadCredentials(server.options.domain, config.tls.keyPath, config.tls.certPath);
+ }
// S2S plugged to C2S.
s2s.register(server.options.domain, function(stanza) {

0 comments on commit ec251d6

Please sign in to comment.