mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-10 03:54:54 -06:00
ChromiumBrowser:
1. Chromium 54 certificates API change 2. CEF download page updated 3. translation typo fixed git-svn-id: svn://ultimatepp.org/upp/trunk@10533 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
622d7c67ed
commit
615c5a4d24
4 changed files with 35 additions and 44 deletions
|
|
@ -153,21 +153,6 @@ bool ClientHandler::OnJSDialog(CefRefPtr<CefBrowser> browser, const CefString& o
|
|||
}
|
||||
|
||||
|
||||
static Upp::String GetCefTimeString(const CefTime& v) {
|
||||
if (v.GetTimeT() == 0) return "Unspecified";
|
||||
|
||||
Upp::Time t;
|
||||
t.year = v.year;
|
||||
t.month = v.month;
|
||||
t.day = v.day_of_month;
|
||||
t.hour = v.hour;
|
||||
t.minute= v.minute;
|
||||
t.second= v.second;
|
||||
|
||||
return Upp::FormatTime(t, "YYYY-MM-DD hh:mm:ss");
|
||||
}
|
||||
|
||||
|
||||
bool ClientHandler::OnCertificateError(CefRefPtr<CefBrowser> browser, ErrorCode cert_error,
|
||||
const CefString& request_url, CefRefPtr<CefSSLInfo> ssl_info,
|
||||
CefRefPtr<CefRequestCallback> callback)
|
||||
|
|
@ -177,27 +162,32 @@ bool ClientHandler::OnCertificateError(CefRefPtr<CefBrowser> browser, ErrorCode
|
|||
bool cont = WhenCertificateError(request_url.ToString());
|
||||
|
||||
if (!cont){
|
||||
CefRefPtr<CefSSLCertPrincipal> subject = ssl_info->GetSubject();
|
||||
CefRefPtr<CefSSLCertPrincipal> issuer = ssl_info->GetIssuer();
|
||||
Upp::String valid_start;
|
||||
Upp::String valid_expiry;
|
||||
Upp::String subject_str = " ";
|
||||
Upp::String issuer_str = " ";
|
||||
|
||||
if (ssl_info){
|
||||
CefRefPtr<CefX509Certificate> cert = ssl_info->GetX509Certificate();
|
||||
if (cert.get()){
|
||||
valid_start = Upp::Format(Upp::TimeFromUTC(cert->GetValidStart().GetTimeT()));
|
||||
valid_expiry = Upp::Format(Upp::TimeFromUTC(cert->GetValidExpiry().GetTimeT()));
|
||||
CefRefPtr<CefX509CertPrincipal> subject = cert->GetSubject();
|
||||
subject_str = subject.get() ? subject->GetDisplayName().ToString().c_str() : " ";
|
||||
CefRefPtr<CefX509CertPrincipal> issuer = cert->GetIssuer();
|
||||
issuer_str = issuer.get() ? issuer->GetDisplayName().ToString().c_str() : " ";
|
||||
}
|
||||
}
|
||||
|
||||
// Build a table showing certificate information.
|
||||
// certificate information
|
||||
Upp::String ss;
|
||||
ss << "<html><head></head><body>"
|
||||
"<center><h1>Page certificate is not trusted</h1></center>"
|
||||
"<br/>Certificate Information:"
|
||||
"<table border=1><tr><th>Field</th><th>Value</th></tr>"
|
||||
"<tr><td>Subject</td><td>" <<
|
||||
(subject.get() ? subject->GetDisplayName().ToString().c_str() : " ") <<
|
||||
"</td></tr>"
|
||||
"<tr><td>Issuer</td><td>" <<
|
||||
(issuer.get() ? issuer->GetDisplayName().ToString().c_str() : " ") <<
|
||||
"</td></tr>"
|
||||
"<tr><td>Valid Start</td><td>" <<
|
||||
GetCefTimeString(ssl_info->GetValidStart()) << "</td></tr>"
|
||||
"<tr><td>Valid Expiry</td><td>" <<
|
||||
GetCefTimeString(ssl_info->GetValidExpiry()) << "</td></tr>"
|
||||
"</table>"
|
||||
"</body></html>";
|
||||
ss << "<h1>Page certificate is not trusted</h1><br/><br/>X.509 Certificate Information:"
|
||||
"<table border=1><tr><th>Field</th><th>Value</th></tr>" <<
|
||||
"<tr><td>Subject</td><td>" << subject_str << "</td></tr>"
|
||||
"<tr><td>Issuer</td><td>" << issuer_str << "</td></tr>"
|
||||
"<tr><td>Valid Start</td><td>" << valid_start << "</td></tr>"
|
||||
"<tr><td>Valid Expiry</td><td>" << valid_expiry << "</td></tr>"
|
||||
"</table>";
|
||||
|
||||
browser->GetMainFrame()->LoadString(~ss, request_url);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ Windows.&]
|
|||
[s0;* &]
|
||||
[ {{10000F(128)G(128)@1 [s0; [* Building CEF application on Linux]]}}&]
|
||||
[s0; &]
|
||||
[s0;i150;O0; download CEF package for Linux from https://cefbuilds.com/.
|
||||
Downloading stable release is recommended (not `"dev channel`").&]
|
||||
[s0;i150;O0; download `"Standard Distribution`" CEF package for Linux
|
||||
from http://opensource.spotify.com/cefbuilds/index.html&]
|
||||
[s0;i150;O0; unpack the archive to your `"MyApps`" directory&]
|
||||
[s0;i150;O0; go to CEF directory and run following commands:&]
|
||||
[s0; -|[C1 cmake `-G `"Unix Makefiles`" `-DCMAKE`_BUILD`_TYPE`=Release]&]
|
||||
|
|
@ -58,12 +58,13 @@ to work]&]
|
|||
[s0;i150;O0; configure library paths in TheIDE, menu [* Setup ]/ [* Build
|
||||
methods]:&]
|
||||
[s0; -|[* INCLUDE directories] `- add CEF library directory, for example:&]
|
||||
[s0; -|[C1 /home/USER`_NAME/MyApps/cef`_binary`_3.2454.1327.g0ea96ca`_linux64]&]
|
||||
[s0; -|[C1 /home/`$USER/MyApps/cef`_binary`_3.2840.1518.gffd843c`_linux64]&]
|
||||
[s0; -|[* LIB directories] `- add CEF subdirectories containing libcef.so
|
||||
and libcef`_dll`_wrapper.a, for example:&]
|
||||
[s0; [C1 -|/home/USER`_NAME/MyApps/cef`_binary`_3.2454.1327.g0ea96ca`_linux64/Release]&]
|
||||
[s0; [C1 -|/home/USER`_NAME/MyApps/cef`_binary`_3.2454.1327.g0ea96ca`_linux64/libcef`_dl
|
||||
l]&]
|
||||
[s0; [C1 -|/home/`$USER/MyApps/cef`_binary`_3.2840.1518.gffd843c`_linux64/libcef`_dll]&]
|
||||
[s0; [C1 -|/home/`$USER/MyApps/cef`_binary`_3.2840.1518.gffd843c`_linux64/Release]&]
|
||||
[s0; [C1 -|/home/`$USER/MyApps/cef`_binary`_3.2840.1518.gffd843c`_linux64/libcef`_dll`_w
|
||||
rapper]&]
|
||||
[s0;i150;O0; open ChromiumBrowserExample from Bazaar and try to compile
|
||||
it&]
|
||||
[s0;i150;O0; before you run compiled application, copy asset files
|
||||
|
|
@ -146,7 +147,8 @@ to the output directory&]
|
|||
[s0; &]
|
||||
[s0;i150;O0; required software: Visual Studio 2015, CMake (http://www.cmake.org/downloa
|
||||
d/)&]
|
||||
[s0;i150;O0; download CEF package for Windows from https://cefbuilds.com/&]
|
||||
[s0;i150;O0; download `"Standard Distribution`" CEF package for Windows
|
||||
from http://opensource.spotify.com/cefbuilds/index.html&]
|
||||
[s0;i150;O0; unpack the archive to your `"MyApps`" directory&]
|
||||
[s0;i150;O0; go to CEF directory and run following command:&]
|
||||
[s0; -|[C cmake `-G `"Visual Studio 14`"]&]
|
||||
|
|
|
|||
|
|
@ -26,6 +26,5 @@ file
|
|||
main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI MT NOGTK USEMALLOC",
|
||||
"" = "GUI MT USEMALLOC";
|
||||
"" = "GUI MT NOGTK USEMALLOC";
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ T_("Message")
|
|||
plPL("Wiadomo\305\233\304\207")
|
||||
|
||||
T_("Connection to '%s' is untrusted&Load page anyway?")
|
||||
plPL("Po\305\202\304\205czenie z '%s' jest niezaufaned&Za\305\202adowa\304\207 "
|
||||
plPL("Po\305\202\304\205czenie z '%s' jest niezaufane&Za\305\202adowa\304\207 "
|
||||
"stron\304\231 mimo to?")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue