Crash Reported on Google Play: org.apache.harmony.security.asn1.ASN1Exception

Bug #1264976 reported by Stefan Hammer on 2013-12-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Tomdroid
Fix Released
Undecided
Unassigned

Bug Description

java.lang.RuntimeException: org.apache.harmony.security.asn1.ASN1Exception: Wrong content for ASN.1 integer at [15]. An integer MUST be encoded in minimum number of octets
at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:612)
at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native Method)
at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:378)
at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.<init>(OpenSSLSocketImpl.java:649)
at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.getInputStream(OpenSSLSocketImpl.java:620)
at org.apache.http.impl.io.SocketInputBuffer.<init>(SocketInputBuffer.java:70)
at org.apache.http.impl.SocketHttpClientConnection.createSessionInputBuffer(SocketHttpClientConnection.java:83)
at org.apache.http.impl.conn.DefaultClientConnection.createSessionInputBuffer(DefaultClientConnection.java:170)
at org.apache.http.impl.SocketHttpClientConnection.bind(SocketHttpClientConnection.java:106)
at org.apache.http.impl.conn.DefaultClientConnection.openCompleted(DefaultClientConnection.java:129)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:172)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:670)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:509)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
at org.tomdroid.sync.web.WebConnection.execute(WebConnection.java:124)
at org.tomdroid.sync.web.AnonymousConnection.get(AnonymousConnection.java:42)
at org.tomdroid.sync.web.OAuthConnection.getAuthorizationUrl(OAuthConnection.java:131)
at org.tomdroid.sync.web.SnowySyncService$1.run(SnowySyncService.java:102)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:856)
Caused by: org.apache.harmony.security.asn1.ASN1Exception: Wrong content for ASN.1 integer at [15]. An integer MUST be encoded in minimum number of octets
at org.apache.harmony.security.asn1.BerInputStream.readInteger(BerInputStream.java:445)
at org.apache.harmony.security.asn1.ASN1Integer.decode(ASN1Integer.java:63)
at org.apache.harmony.security.asn1.BerInputStream.readSequence(BerInputStream.java:554)
at org.apache.harmony.security.asn1.DerInputStream.readSequence(DerInputStream.java:105)
at org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.java:40)
at org.apache.harmony.security.asn1.BerInputStream.readSequence(BerInputStream.java:554)
at org.apache.harmony.security.asn1.DerInputStream.readSequence(DerInputStream.java:105)
at org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.java:40)
at org.apache.harmony.security.asn1.ASN1Type.decode(ASN1Type.java:82)
at org.apache.harmony.security.provider.cert.X509CertImpl.<init>(X509CertImpl.java:128)
at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:590)
... 23 more

User message: trying to sync first time. Using rainy 0.5

I talked to the Rainy developers - this user probably tried to sync using a wrong certificate (not the one rainy created), therefore it is in the wrong format and can't be read.
The app sould not crash though in this case - we need to catch this and through an exception with a error message.

Changed in tomdroid:
assignee: nobody → Stefan Hammer (j-4)
status: Triaged → Fix Committed
Changed in tomdroid:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers