From 3eb5f62f2bfa983b554ce5b2e8bb2929b30bb5ba Mon Sep 17 00:00:00 2001 From: Eric Ye Date: Sun, 1 Jun 2014 21:40:43 -0400 Subject: [PATCH] Revert "making https a default, using a self-signed cert" This reverts commit 71449d2a9c67d8fef730272025dd54e3f9783574. Users would see a security exception in their browsers when they run this because they don't recognize the self-signed cert from "Soumith Chintala". This would probably turn them away and is overkill in terms of security. --- clients/torch/js.lua | 12 +++++------ defaultcert/ca.crt | 33 ---------------------------- defaultcert/ca.key | 51 -------------------------------------------- server.js | 4 ---- 4 files changed, 6 insertions(+), 94 deletions(-) delete mode 100644 defaultcert/ca.crt delete mode 100644 defaultcert/ca.key diff --git a/clients/torch/js.lua b/clients/torch/js.lua index 968b45a..deacee5 100644 --- a/clients/torch/js.lua +++ b/clients/torch/js.lua @@ -418,13 +418,13 @@ function js.startserver(port) port = port or 8000 -- running? - local status = io.popen('curl -s https://localhost:'..port..'/'):read('*all'):gsub('%s*','') + local status = io.popen('curl -s http://localhost:'..port..'/'):read('*all'):gsub('%s*','') if status == '' then -- start up server: os.execute('node "' .. os.getenv('HOME') .. '/.gfx.js/server.js" --port '..port..' > "' .. os.getenv('HOME') .. '/.gfx.js/server.log" &') - print('[gfx.js] server started on port '..port..', graphics will be rendered into https://localhost:'..port) + print('[gfx.js] server started on port '..port..', graphics will be rendered into http://localhost:'..port) else - print('[gfx.js] server already running on port '..port..', graphics will be rendered into https://localhost:'..port) + print('[gfx.js] server already running on port '..port..', graphics will be rendered into http://localhost:'..port) end end @@ -487,12 +487,12 @@ function js.show(port) -- browse: if jit.os == 'OSX' then sys.sleep(0.1) - os.execute('open https://localhost:'..port) + os.execute('open http://localhost:'..port) elseif jit.os == 'Linux' then sys.sleep(0.1) - os.execute('xdg-open https://localhost:'..port) + os.execute('xdg-open http://localhost:'..port) else - print('[gfx.js] show() is only supported on Mac OS/Linux - other OSes: navigate to https://localhost:PORT by hand') + print('[gfx.js] show() is only supported on Mac OS/Linux - other OSes: navigate to http://localhost:PORT by hand') end end diff --git a/defaultcert/ca.crt b/defaultcert/ca.crt deleted file mode 100644 index a3dbf38..0000000 --- a/defaultcert/ca.crt +++ /dev/null @@ -1,33 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFqzCCA5OgAwIBAgIJAOMUMXtAoaxbMA0GCSqGSIb3DQEBCwUAMGwxCzAJBgNV -BAYTAlVTMREwDwYDVQQIDAhOZXcgWW9yazEWMBQGA1UEBwwNTmV3IFlvcmsgQ2l0 -eTEXMBUGA1UECgwOZ2Z4LmpzIGRlZmF1bHQxGTAXBgNVBAMMEFNvdW1pdGggQ2hp -bnRhbGEwHhcNMTQwNDI0MDMyMTIwWhcNMTkwNDI0MDMyMTIwWjBsMQswCQYDVQQG -EwJVUzERMA8GA1UECAwITmV3IFlvcmsxFjAUBgNVBAcMDU5ldyBZb3JrIENpdHkx -FzAVBgNVBAoMDmdmeC5qcyBkZWZhdWx0MRkwFwYDVQQDDBBTb3VtaXRoIENoaW50 -YWxhMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA2LXPSK2/8Wyb5pVd -R0BtcfMyj6ml1iFugJX98HftTdnOBekIy1qkwbyuZekuvvUcivZiDAfqGb+GMWNn -YGzXUMyU9sh6pvbQS0H3RITer4PHeEf0n3iv2nkAUTJ/UImdcKVm4gUBZYvCJ4Hf -XXUESOM9Wx9Po3ZPohrChddIu6sTBbsSAcFIfyDHddRGDFqmfS1upOOPIfcjBT4v -xJlmoUwadXG8wk6sJ4CbSVe8CRptup6lL4sVd7tIqATrKAtpo/Z86fZf9UmJZ+Zy -wxlyvl+cgHRMX5HL0klKrDci/NiqdUgH3hei+0C9Ji60yxLnysfnBXbXO0zMRPfD -W9K2Ek+tzBneWrKxLGyHXiumKEVK78K0jkcU1NeePZ+Utdmomp8z/Wf1th9nhYAO -DNxKVsfOaUvdl0hl2Qpii1CbdqRX+wiNgtFuXdIdg09zCpB/+ffBrzgpdrs22Hmf -JSEQ05VA74pu2IYu0kB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cert/ca.key b/defaultcert/ca.key deleted file mode 100644 index 6946599..0000000 --- a/defaultcert/ca.key +++ /dev/null @@ -1,51 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIJKQIBAAKCAgEA2LXPSK2/8Wyb5pVdR0BtcfMyj6ml1iFugJX98HftTdnOBekI -y1qkwbyuZekuvvUcivZiDAfqGb+GMWNnYGzXUMyU9sh6pvbQS0H3RITer4PHeEf0 -n3iv2nkAUTJ/UImdcKVm4gUBZYvCJ4HfXXUESOM9Wx9Po3ZPohrChddIu6sTBbsS -AcFIfyDHddRGDFqmfS1upOOPIfcjBT4vxJlmoUwadXG8wk6sJ4CbSVe8CRptup6l -L4sVd7tIqATrKAtpo/Z86fZf9UmJZ+Zywxlyvl+cgHRMX5HL0klKrDci/NiqdUgH -3hei+0C9Ji60yxLnysfnBXbXO0zMRPfDW9K2Ek+tzBneWrKxLGyHXiumKEVK78K0 -jkcU1NeePZ+Utdmomp8z/Wf1th9nhYAODNxKVsfOaUvdl0hl2Qpii1CbdqRX+wiN -gtFuXdIdg09zCpB/+ffBrzgpdrs22HmfJSEQ05VA74pu2IYu0kBNiHlnrPhSIOXO -WPV1Zn+Rl74liPjDiohdRWIuw3MuQCQ+tvJwTBe3/e4WzLQfcRzZmcbKVqbpVvjn -w3nnJfMTKZNyeF8GCMrd2F99Ae64nbtlijQ8DL9p0JLPdBNSDCLb8JFNB/CKd5qQ -jnZfPxu5r8U2HcUMeZOg3C0WX6xrRusArdti6saRH5ttBrj/VtzvYXUgK/ECAwEA -AQKCAgAsSVNYBfHw04I0qBeM5RS4sbuGcmPqk6BydLSVfNypCTa6LHpYnGiJExcM -yo98BLlViK5WyRNFOcehti+9G+EQqQ5UNHokPtIoXw26GfEsKyELaqEKKe6+FfZD -oa809TqQd6zDycQUTXBbBIZyIeTDRHUYdxieTiJN/Wv9UBaUC4zyod03MJmxKTC5 -2qyJ/8iAUlWHKt3oUgn9G01FvxejJNtPXvP1PYCe/gA+B8jsj1MXTS5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h -EfegvZPrVe6blCIKXrMPIA88o2xKWf1BcdfjUuafNxMcSJssc8PYqXnyWxmd ------END RSA PRIVATE KEY----- diff --git a/server.js b/server.js index e64d0a7..be7d3ae 100644 --- a/server.js +++ b/server.js @@ -15,10 +15,6 @@ if (fs.existsSync(configFile)) { shell: 'bash', port: 8000, static: process.env.HOME + '/.gfx.js/static', - "https": { - "key": process.env.HOME + "/.gfx.js/defaultcert/ca.key", - "cert": process.env.HOME + "/.gfx.js/defaultcert/ca.crt" - } } }