working with winscard windows library in render process

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

working with winscard windows library in render process

Postby ari37086 » Thu Feb 26, 2015 7:34 am

I use CEF3 don't remember version , but last source update I made was week ago


I want to implement the following model:

JS code calls use cefsimple to call winscard different methods.
the result of call (string, int or bool) pass back to JS.

STEP1) I've implemented basic flow using Functions and Window Binding example from JavaScriptIntegration document. In Basic flow I use setstring or rand calls. It works fine The result pass correctly back to JS.
STEP2) I called to SCardEstablishContext function (winscard windows library) from OnContextInitialized CefBrowserProcess method. It works fine I could see the correct result in my application. (just wanted to be sure that I can work with this library from cefsimple app)

STEP3) I tried to integrate this call in basic flow (from step1). RESULT: the code run , but ERROR is returned from winscard library.

Microsoft documentation is not 100% clear, but it seems that happens due to LACK of RENDER process run permissions.
Functionality that can be run by browser process , can not be run by render process.

Questions
1) is my understanding is correct and due to security reasons render process has no permissions that browser process has ?
2) what will be the correct solution for this ? - using IPC between both process ?
JS call will be received and interpreted by render process
then
render will call browser process to perform the call to winscard
then
browser process will call render back with the results of work it done ?
3) I use cefsimple as my application and add to the missing functionality . Was it correct decision or should I work with cefclient ?

THANK YOU for your help
ari37086
Techie
 
Posts: 28
Joined: Thu Feb 19, 2015 10:50 am

Re: working with winscard windows library in render process

Postby magreenblatt » Fri Feb 27, 2015 11:00 am

Correct, you should use IPC to communicate between the processes. You can find more information here: https://code.google.com/p/chromiumembed ... s_Bindings
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: working with winscard windows library in render process

Postby ari37086 » Wed Mar 11, 2015 4:09 am

and this could be added to cef simple application ?
ari37086
Techie
 
Posts: 28
Joined: Thu Feb 19, 2015 10:50 am

Re: working with winscard windows library in render process

Postby magreenblatt » Wed Mar 11, 2015 11:04 am

ari37086 wrote:and this could be added to cef simple application ?

Yes, you can start with the cefsimple application and add the JavaScript/IPC functionality.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: working with winscard windows library in render process

Postby ari37086 » Thu Mar 12, 2015 9:51 am

Hi Marshall,

Do you have any simple application with both browser & renderer process methods and witch use cef_message_router mechanism for communication between both ?

Thank you so much for your help
ari37086
Techie
 
Posts: 28
Joined: Thu Feb 19, 2015 10:50 am

Re: working with winscard windows library in render process

Postby ari37086 » Sun Apr 12, 2015 6:23 am

I did managed to implement IPC between browser and renderer process and call's to winscard work fine.
Thanks a lot for the help :-)

If I still want to call it from renderer process, it works if adding "no-sandbox" option.
My Question:

I want to continue using of sandbox,and try to call to winscard functions from renderer process IS THERE any rule that I can add for sandbox policy and that will enable this ?

(I will add this question as a new issue in forum)
ari37086
Techie
 
Posts: 28
Joined: Thu Feb 19, 2015 10:50 am


Return to Support Forum

Who is online

Users browsing this forum: Devyre and 90 guests