09-11-2017, 07:49 AM
(This post was last modified: 09-20-2017, 09:43 AM by daisukiXCI.)
Hello,
i try to use https for the webadmin but i doesn't seem to work. At first i used my own certificate from my own CA but it failed so i tried to use the script GenerateSelfSignedHTTPSCertUsingOpenssl.sh and i got the same error:
[21:37:28] WebServer: Cannot read HTTPS certificate: -0x2180
i look into the code it seems the error is from the src/HTTP/HTTPServer.cpp:
Thank you for your time.
i try to use https for the webadmin but i doesn't seem to work. At first i used my own certificate from my own CA but it failed so i tried to use the script GenerateSelfSignedHTTPSCertUsingOpenssl.sh and i got the same error:
[21:37:28] WebServer: Cannot read HTTPS certificate: -0x2180
i look into the code it seems the error is from the src/HTTP/HTTPServer.cpp:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | int res = Cert->Parse(CertFile.data(), CertFile.size()); if (res == 0) { auto CertPrivKey = std::make_shared<cCryptoKey>(); res = CertPrivKey->ParsePrivate(KeyFile.data(), KeyFile.size(), "" ); if (res == 0) { // Modifyable locally but otherwise must be const auto Config = cSslConfig::MakeDefaultConfig( false ); Config->SetOwnCert(Cert, CertPrivKey); m_SslConfig = std::move(Config); } else { // Reading the private key failed, reset the cert: LOGWARNING( "WebServer: Cannot read HTTPS certificate private key: -0x%x" , -res); } } else { LOGWARNING( "WebServer: Cannot read HTTPS certificate: -0x%x" , -res); } |
Thank you for your time.