source code access

75 views
Skip to first unread message

saint

unread,
Sep 14, 2011, 4:11:13 AM9/14/11
to SandroB
Are you planning to reveal the source code of the browser with client
cert auth support?

SandroB

unread,
Sep 14, 2011, 2:41:59 PM9/14/11
to san...@googlegroups.com
Just parts of it.
SandroB is port of android native browser. So base source code is from there.

How SandroB started with just sending filename/password to creating sslcontext you can see in
http://code.google.com/p/sandrob/source/browse/misc/examples/HttpsConnection.java

How to create custom application that uses ssl client certificate you can see in
(sources included just click on Ad to get chance to save it. It is zipped eclipse project)
https://market.android.com/details?id=org.sandrob.sslexample

How the local storage of pfx file is implemented you can see in
http://code.google.com/p/sandrob/downloads/detail?name=sandrob_demo_1_0_0_10.apk
http://code.google.com/p/sandrob/source/browse/misc/KeyStoreUtils

saint

unread,
Sep 15, 2011, 1:48:37 AM9/15/11
to SandroB
ok, thanks

rk

unread,
Jun 24, 2012, 4:32:13 PM6/24/12
to san...@googlegroups.com
I want to use SandroB as my library .. But i cannot find much information on your wiki . Please confirm if I can do this ? if so ,how ?

On Wednesday, September 14, 2011 10:48:37 PM UTC-7, saint wrote:
ok, thanks

SandroB

unread,
Jun 24, 2012, 5:45:49 PM6/24/12
to san...@googlegroups.com
SandroB uses c++ library for html rendering
https://android.googlesource.com/platform/external/webkit
Some phone manufactures change this so SandroB does not work on all devices.

You will be better off with SandroB example code.
https://market.android.com/details?id=org.sandrob.sslexample
Hack is just to use webkit part and with reflection change ssl socket factory.

             // hack to change ssl socket factory for HttpsConnection class
                // this is not how SandroB makes it
                Class c = Class.forName("android.net.http.HttpsConnection");
                Field[] fieldlist = c.getDeclaredFields();
                for (int i = 0; i < fieldlist.length; i++) {
                    Field fld = fieldlist[i];
                    if (fld.getName().equals("mSslSocketFactory")) {
                        fld.setAccessible(true);
                        fld.set(null, sslContext.getSocketFactory());
                    }
                }


This guy implementation uses the same principle.
https://github.com/yonekawa/webview-with-client-certificate

But I must warn you that this do not work from Android 3.x ->...
So far no solution for ICS.
http://stackoverflow.com/questions/10683643/webview-with-ssl-client-certificate-on-android-4-ics

I am working mainly now on SandroProxy,
https://play.google.com/store/apps/details?id=org.sandroproxy
but it would be challenge to make webview work with ssl client cert on ICS also :)


Hoping that info will help you...

rgrds
Reply all
Reply to author
Forward
0 new messages