Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cert-handler #8

Open
jegger opened this issue Feb 15, 2015 · 5 comments
Open

Fix cert-handler #8

jegger opened this issue Feb 15, 2015 · 5 comments

Comments

@jegger
Copy link
Collaborator

jegger commented Feb 15, 2015

CEFBrowser.certificate_error_handler;
TypeError: unbound method must be called with CEFBrowser instance as first argument (got int instance instead)

@ghost
Copy link

ghost commented Feb 16, 2015

Resolved the problem. Others arise:

  • We also need a callback (e.g. if we want to ask the user to accept the certificate)
  • We need to investigate, whether CEFPython could give the browser instance with OnCertificateError

@cztomczak
Copy link

@rtsh The browser parameter is missing in upstream CEF. It was added only recently in branch 2272 revision 2029: https://code.google.com/p/chromiumembedded/issues/detail?id=1530

@ghost
Copy link

ghost commented Feb 16, 2015

@CzarekTomczak I wonder if it would be possible to pass the browser instance to the ClientHandler here: https://code.google.com/p/cefpython/source/browse/cefpython/cefpython.pyx#392
So the ClientHandler would know which browser is associated with it. Then we could already implement this before having the fix in upstream CEF.

@cztomczak
Copy link

@rtsh The problem is that we can assign browser instance to client handler only after browser was created. Currently only synchronous browser creation is available. So it's probably not possible to have the browser parameter available during initial browser navigation. However to be sure about that one would need to run tests. You could edit ClientHandler C++ code and add browserIdentifier_ property. Set it in cefpython.pyx you refered to. And then pass it to and check in RequestHandler_OnCertificateError() whether GetPyBrowserById() returns not empty value. Even if this doesn't work, it can still work assuming that the initial url during browser creation is guaranteed to not have a certificate error (about:blank or data:text/html;base64, for example). Browser id would be available for all subsequent browser navigations.

@ghost ghost added the enhancement label Feb 17, 2015
@ghost ghost self-assigned this Feb 17, 2015
@allestuetsmerweh allestuetsmerweh unassigned ghost Jun 30, 2015
@cztomczak
Copy link

In CEF 51 the browser object is now passed to OnCertificateError - but it needs updating cefpython bindings to expose it to python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants