Android App - SSL Certificate Verification

Got an idea? Missing something? Post your feature request here.

Moderator: moderators

Android App - SSL Certificate Verification

Postby cdtfry » Wed Nov 14, 2012 11:30 pm

Is there any way to enforce SSL certificate verification on the Android app? I recently got caught out with a injected certificate from a proxy. :?

As far as I can tell (with superficial testing) the android app accepts any certificate that is presented without any notification, even when the certificate changes or is invalid for the domain.

Thanks
cdtfry
 
Posts: 3
Joined: Wed Nov 14, 2012 11:07 pm

Re: Android App - SSL Certificate Verification

Postby jol » Thu Nov 15, 2012 2:13 pm

cdtfry wrote:Is there any way to enforce SSL certificate verification on the Android app? I recently got caught out with a injected certificate from a proxy. :?

As far as I can tell (with superficial testing) the android app accepts any certificate that is presented without any notification, even when the certificate changes or is invalid for the domain.

Thanks

I remember having seen a comment that this was done deliberately in order to allow https with self-signed certificates, as "trusted" certificates are usually expensive. But I agree that verification of the certificate should be done. As a compromise I would suggest to verify the certificate and if there is a problem (like not trusted, not matching hostname) ask the user whether to proceed and remember that decision for that URL - similar to like any SSH client is doing since years.
Best regards, jol
Subsonic 4.7 running on Acer H340 with LDAP authentication / Windows Home Server 2011 - Android client (3.5)
jol
 
Posts: 52
Joined: Sat Jan 21, 2012 7:40 pm

Re: Android App - SSL Certificate Verification

Postby cdtfry » Thu Nov 15, 2012 6:12 pm

Agreed, the other solution I had thought about was to force certificate verification which would then require the certificate to be installed on the device - which is far less user friendly.

Does anyone know if this is likely to be included in future versions of the app? Its not really a headline feature but very good from a security standpoint.

My knowledge of Java is pretty much non-existent, I wonder how difficult it would be to implement?
cdtfry
 
Posts: 3
Joined: Wed Nov 14, 2012 11:07 pm

Re: Android App - SSL Certificate Verification

Postby daneren2005 » Thu Nov 15, 2012 6:50 pm

My understanding is that you can setup a keystore for self-signed apps where the first self-signed certificate for a given domain was accepted and saved, and from then on anything else would be denied. Right now I looked in the code and it appears to just accept all self-signed certificates regardless, so in the future it probably needs to add to the devices keystore. I have no clue how complicated it would be though.
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: Android App - SSL Certificate Verification

Postby cdtfry » Fri Nov 16, 2012 11:55 pm

Thanks for the info, hopefully we will see something like this implemented in future versions. I guess the best chance of seeing this would be to start a thread under feature requests?
cdtfry
 
Posts: 3
Joined: Wed Nov 14, 2012 11:07 pm

Re: Android App - SSL Certificate Verification

Postby BKKKPewsey » Sat Nov 17, 2012 3:01 am

cdtfry wrote:I guess the best chance of seeing this would be to start a thread under feature requests?


Yep :)

I will do you a favour and move this thread there

:mrgreen:
Everyone is entitled to be stupid, Image but some abuse the privilege!

Due to the confusion from too many genres of music, we have decided to put both country music and rap music into the genre of Crap music.
User avatar
BKKKPewsey
 
Posts: 2080
Joined: Mon May 23, 2011 12:16 pm
Location: United Kingdom

Re: Android App - SSL Certificate Verification

Postby jol » Sat Nov 17, 2012 6:01 am

daneren2005 wrote:..the first self-signed certificate for a given domain was accepted and saved, and from then on anything else would be denied.
If I take this verbatim I cannot replace an expired or compromised certificate without also changing the host name...
Best regards, jol
Subsonic 4.7 running on Acer H340 with LDAP authentication / Windows Home Server 2011 - Android client (3.5)
jol
 
Posts: 52
Joined: Sat Jan 21, 2012 7:40 pm

Re: Android App - SSL Certificate Verification

Postby daneren2005 » Mon Nov 19, 2012 8:55 pm

jol wrote:
daneren2005 wrote:..the first self-signed certificate for a given domain was accepted and saved, and from then on anything else would be denied.
If I take this verbatim I cannot replace an expired or compromised certificate without also changing the host name...
Best regards, jol

My experience has been that a lot of apps that do this have an option to clear self-signed signatures. And at least in ICS+ there is a way to access "user" certificates and delete them.
Developer of DSub for Android
daneren2005
 
Posts: 1709
Joined: Fri Jul 06, 2012 7:52 pm

Re: Android App - SSL Certificate Verification

Postby jol » Tue Nov 20, 2012 6:14 am

daneren2005 wrote:
jol wrote:
daneren2005 wrote:..the first self-signed certificate for a given domain was accepted and saved, and from then on anything else would be denied.
If I take this verbatim I cannot replace an expired or compromised certificate without also changing the host name...
Best regards, jol

My experience has been that a lot of apps that do this have an option to clear self-signed signatures. And at least in ICS+ there is a way to access "user" certificates and delete them.
With that the approach sounds OK to me. My Android is still 2.2 but I guess it will be replaced by the time my certificate expires..
Btw. my Android uses a dedicated user with close to no authorizations, just to be sure someone tricking my device does not get more value than listening to my music..
Best regards, jol
Subsonic 4.7 running on Acer H340 with LDAP authentication / Windows Home Server 2011 - Android client (3.5)
jol
 
Posts: 52
Joined: Sat Jan 21, 2012 7:40 pm


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 6 guests