"use-strict"

exports.initialize = function(http, config) {
    if (!config.enableSSL) {
        return;
    }
    
    http.ssl.registerClientContext(
        config.sslKey,
        function() {
          console.log("Password Verification")
        },
        config.sslCert,
        function(cert) {
          console.log("CLIENT", JSON.stringify(cert));
          return true;
        },
        config.caLocation,
        http.ssl.VERIFY_NONE
      );

    http.ssl.registerServerContext(
        config.sslKey,
        function() {
          console.log("Password Verification")
        },
        config.sslCert,
        function(cert) {
          console.log("SERVER", JSON.stringify(cert));
          return true;
        },
        config.caLocation,
        http.ssl.VERIFY_NONE
      );
}
