mcollina/mosca — pull request #54 by samirnaik (2013-09-02 20:42:09+00:00)
Title: Adding SSL/TLS support to mosca

Secure mosca server can now be instantiated by including a secure key and signed cert in the settings passed to the server:

var moscaSettings = function() {
return {
port: nextPort(),
logger: {
childOf: globalLogger,
level: 60
},
secure : {
keyPath: SECURE_KEY,
certPath: SECURE_CERT
}
};
};

Test cases have been added, but are currently being skipped. All of them pass except for the ones that are using MQTT ascoltatore as a backend. When this happens we try to connect a non-secure client to the now secure server so the test fails.

Matteo - I propose refactoring MQTT createClient to just take a option dictionary, where the secure key/cert can be passed in similar to mosca. This should allow the failing tests to pass. What do you think?