z-classic / z-nomp

z-nomp is mining pool software for Zcash and Zclassic so you can create internet money in your home!
MIT License
291 stars 436 forks source link

TLS, Certificate ca website #215

Open ridd84 opened 6 years ago

ridd84 commented 6 years ago

Hi, I saw some errors in web https from mozilla, also I check SSL from SSLLabs.

Error says that I need (Additional Certificates), same as CA. I would like to add ca in code to solve, it's correct?

config_example.json

          "tlsOptions" : {
              "enabled": false,
              "cert": "",
              "key": "",
             "ca": ""  
}

website.js

   try {        
        if (portalConfig.website.tlsOptions && portalConfig.website.tlsOptions.enabled === true) {
            var TLSoptions = {
              key: fs.readFileSync(portalConfig.website.tlsOptions.key),
              cert: fs.readFileSync(portalConfig.website.tlsOptions.cert),
              ca: fs.readFileSync(portalConfig.website.tlsOptions.ca)
};

thanks

sennevb commented 6 years ago

I use nginx as Proxy for z-nomp! Try that

hellcatz commented 6 years ago

I have it working with the following...

        "tlsOptions" : {
            "enabled": true,
            "cert":"/path/to/fullchain.pem",
            "key":"/path/to/privkey.pem"
        }

Or, use nginx as sennevb suggest.

ridd84 commented 6 years ago

Ok, SSL works but if I do ssl test (https://www.ssllabs.com/ssltest/index.html) I get some errors because server don't give (CA) you can check here my result (https://www.ssllabs.com/ssltest/analyze.html?d=multipool.es&hideResults=on)

If not I try to use nginx or pound...