javax.net.ssl.SSLPeerUnverifiedException:在amazons3分段上传期间没有对等证书

时间:2014-06-19 09:17:51

标签: java android ssl amazon-s3

我使用Simpl3r,一个简单的高级Android API,用于使用Amazon S3服务上传文件,将媒体文件上传到我的存储桶。

在某些上传文件中,我收到SSLException错误。这是引发异常的代码:

2014-06-12 20: 24: 86I/AmazonHttpClient(30949): Unable to execute HTTP request: No peer certificate
2014-06-12 20: 24: 87I/AmazonHttpClient(30949): javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
2014-06-12 20: 24: 89I/AmazonHttpClient(30949):     at org.apache.harmony.xnet.provider.jsse.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:137)
2014-06-12 20: 24: 90I/AmazonHttpClient(30949):     at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:93)
2014-06-12 20: 24: 91I/AmazonHttpClient(30949):     at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)
2014-06-12 20: 24: 92I/AmazonHttpClient(30949):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:165)
2014-06-12 20: 24: 93I/AmazonHttpClient(30949):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
2014-06-12 20: 24: 94I/AmazonHttpClient(30949):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
2014-06-12 20: 24: 95I/AmazonHttpClient(30949):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
2014-06-12 20: 24: 97I/AmazonHttpClient(30949):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
2014-06-12 20: 24: 98I/AmazonHttpClient(30949):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
2014-06-12 20: 24: 100I/AmazonHttpClient(30949):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
2014-06-12 20: 24: 102I/AmazonHttpClient(30949):    at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:295)
2014-06-12 20: 24: 107I/AmazonHttpClient(30949):    at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:179)
2014-06-12 20: 24: 108I/AmazonHttpClient(30949):    at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:2980)
2014-06-12 20: 24: 109I/AmazonHttpClient(30949):    at com.amazonaws.services.s3.AmazonS3Client.initiateMultipartUpload(AmazonS3Client.java:2197)
2014-06-12 20: 24: 110I/AmazonHttpClient(30949):    at com.rightbackup.simpl3r.Uploader.upload(Uploader.java:260)
2014-06-12 20: 24: 111I/AmazonHttpClient(30949):    at com.rightbackup.simpl3r.Uploader.start(Uploader.java:182)
2014-06-12 20: 24: 113I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.finalUpload(UploadService.java:1598)
2014-06-12 20: 24: 114I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 24: 115I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 25: 22I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 25: 23I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 25: 24I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 25: 25I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 25: 26I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 25: 61I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 25: 68I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 25: 70I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 25: 72I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1655)
2014-06-12 20: 25: 77I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 25: 81I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 25: 82I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 25: 83I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.parseJsonResponse(UploadService.java:1106)
2014-06-12 20: 25: 84I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.makeRequest(UploadService.java:435)
2014-06-12 20: 25: 85I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.onHandleIntent(UploadService.java:296)
2014-06-12 20: 25: 88I/AmazonHttpClient(30949):     at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
2014-06-12 20: 25: 89I/AmazonHttpClient(30949):     at android.os.Handler.dispatchMessage(Handler.java:99)
2014-06-12 20: 25: 90I/AmazonHttpClient(30949):     at android.os.Looper.loop(Looper.java:137)
2014-06-12 20: 25: 91I/AmazonHttpClient(30949):     at android.os.HandlerThread.run(HandlerThread.java:60)
2014-06-12 20: 26: 55I/AmazonHttpClient(30949): Unable to execute HTTP request: No peer certificate
2014-06-12 20: 26: 56I/AmazonHttpClient(30949): javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
2014-06-12 20: 26: 57I/AmazonHttpClient(30949):     at org.apache.harmony.xnet.provider.jsse.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:137)
2014-06-12 20: 26: 57I/AmazonHttpClient(30949):     at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:93)
2014-06-12 20: 26: 58I/AmazonHttpClient(30949):     at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)
2014-06-12 20: 26: 59I/AmazonHttpClient(30949):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:165)
2014-06-12 20: 26: 59I/AmazonHttpClient(30949):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
2014-06-12 20: 26: 60I/AmazonHttpClient(30949):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
2014-06-12 20: 26: 61I/AmazonHttpClient(30949):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
2014-06-12 20: 26: 62I/AmazonHttpClient(30949):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
2014-06-12 20: 26: 62I/AmazonHttpClient(30949):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
2014-06-12 20: 26: 63I/AmazonHttpClient(30949):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
2014-06-12 20: 26: 64I/AmazonHttpClient(30949):     at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:295)
2014-06-12 20: 26: 64I/AmazonHttpClient(30949):     at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:179)
2014-06-12 20: 26: 65I/AmazonHttpClient(30949):     at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:2980)
2014-06-12 20: 26: 66I/AmazonHttpClient(30949):     at com.amazonaws.services.s3.AmazonS3Client.initiateMultipartUpload(AmazonS3Client.java:2197)
2014-06-12 20: 26: 66I/AmazonHttpClient(30949):     at com.rightbackup.simpl3r.Uploader.upload(Uploader.java:260)
2014-06-12 20: 26: 67I/AmazonHttpClient(30949):     at com.rightbackup.simpl3r.Uploader.start(Uploader.java:182)
2014-06-12 20: 26: 68I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1598)
2014-06-12 20: 26: 68I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 26: 69I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 26: 70I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 26: 70I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 26: 71I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 26: 72I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 26: 73I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 26: 73I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 26: 74I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 26: 75I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 26: 76I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1655)
2014-06-12 20: 26: 77I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 26: 78I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 26: 79I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 26: 80I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.parseJsonResponse(UploadService.java:1106)
2014-06-12 20: 26: 80I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.makeRequest(UploadService.java:435)
2014-06-12 20: 26: 81I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.onHandleIntent(UploadService.java:296)
2014-06-12 20: 26: 82I/AmazonHttpClient(30949):     at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
2014-06-12 20: 26: 82I/AmazonHttpClient(30949):     at android.os.Handler.dispatchMessage(Handler.java:99)
2014-06-12 20: 26: 83I/AmazonHttpClient(30949):     at android.os.Looper.loop(Looper.java:137)
2014-06-12 20: 26: 84I/AmazonHttpClient(30949):     at android.os.HandlerThread.run(HandlerThread.java:60)
2014-06-12 20: 30: 136I/AmazonHttpClient(30949): Unable to execute HTTP request: No peer certificate
2014-06-12 20: 30: 137I/AmazonHttpClient(30949): javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
2014-06-12 20: 30: 137I/AmazonHttpClient(30949):    at org.apache.harmony.xnet.provider.jsse.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:137)
2014-06-12 20: 30: 138I/AmazonHttpClient(30949):    at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:93)
2014-06-12 20: 30: 138I/AmazonHttpClient(30949):    at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)
2014-06-12 20: 30: 139I/AmazonHttpClient(30949):    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:165)
2014-06-12 20: 30: 139I/AmazonHttpClient(30949):    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
2014-06-12 20: 30: 139I/AmazonHttpClient(30949):    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
2014-06-12 20: 30: 140I/AmazonHttpClient(30949):    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
2014-06-12 20: 30: 141I/AmazonHttpClient(30949):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
2014-06-12 20: 30: 141I/AmazonHttpClient(30949):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
2014-06-12 20: 30: 142I/AmazonHttpClient(30949):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
2014-06-12 20: 30: 142I/AmazonHttpClient(30949):    at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:295)
2014-06-12 20: 30: 142I/AmazonHttpClient(30949):    at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:179)
2014-06-12 20: 30: 143I/AmazonHttpClient(30949):    at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:2980)
2014-06-12 20: 30: 144I/AmazonHttpClient(30949):    at com.amazonaws.services.s3.AmazonS3Client.initiateMultipartUpload(AmazonS3Client.java:2197)
2014-06-12 20: 30: 145I/AmazonHttpClient(30949):    at com.rightbackup.simpl3r.Uploader.upload(Uploader.java:260)
2014-06-12 20: 30: 146I/AmazonHttpClient(30949):    at com.rightbackup.simpl3r.Uploader.start(Uploader.java:182)
2014-06-12 20: 30: 148I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.finalUpload(UploadService.java:1598)
2014-06-12 20: 30: 149I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 30: 149I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 30: 150I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 30: 150I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 30: 151I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 30: 151I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 30: 151I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 30: 152I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 30: 152I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 30: 152I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 30: 153I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.finalUpload(UploadService.java:1655)
2014-06-12 20: 30: 153I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 32: 08I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 32: 09I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 32: 09I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.parseJsonResponse(UploadService.java:1106)
2014-06-12 20: 32: 10I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.makeRequest(UploadService.java:435)
2014-06-12 20: 32: 11I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.onHandleIntent(UploadService.java:296)
2014-06-12 20: 32: 11I/AmazonHttpClient(30949):     at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
2014-06-12 20: 32: 12I/AmazonHttpClient(30949):     at android.os.Handler.dispatchMessage(Handler.java:99)
2014-06-12 20: 32: 13I/AmazonHttpClient(30949):     at android.os.Looper.loop(Looper.java:137)
2014-06-12 20: 32: 13I/AmazonHttpClient(30949):     at android.os.HandlerThread.run(HandlerThread.java:60)
2014-06-12 20: 36: 70I/AmazonHttpClient(30949): Unable to execute HTTP request: No peer certificate
2014-06-12 20: 36: 71I/AmazonHttpClient(30949): javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
2014-06-12 20: 36: 71I/AmazonHttpClient(30949):     at org.apache.harmony.xnet.provider.jsse.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:137)
2014-06-12 20: 36: 71I/AmazonHttpClient(30949):     at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:93)
2014-06-12 20: 36: 72I/AmazonHttpClient(30949):     at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)
2014-06-12 20: 36: 72I/AmazonHttpClient(30949):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:165)
2014-06-12 20: 36: 73I/AmazonHttpClient(30949):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
2014-06-12 20: 36: 73I/AmazonHttpClient(30949):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
2014-06-12 20: 36: 73I/AmazonHttpClient(30949):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
2014-06-12 20: 36: 74I/AmazonHttpClient(30949):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
2014-06-12 20: 36: 74I/AmazonHttpClient(30949):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
2014-06-12 20: 36: 75I/AmazonHttpClient(30949):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
2014-06-12 20: 36: 75I/AmazonHttpClient(30949):     at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:295)
2014-06-12 20: 36: 75I/AmazonHttpClient(30949):     at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:179)
2014-06-12 20: 36: 76I/AmazonHttpClient(30949):     at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:2980)
2014-06-12 20: 36: 76I/AmazonHttpClient(30949):     at com.amazonaws.services.s3.AmazonS3Client.initiateMultipartUpload(AmazonS3Client.java:2197)
2014-06-12 20: 36: 76I/AmazonHttpClient(30949):     at com.rightbackup.simpl3r.Uploader.upload(Uploader.java:260)
2014-06-12 20: 36: 77I/AmazonHttpClient(30949):     at com.rightbackup.simpl3r.Uploader.start(Uploader.java:182)
2014-06-12 20: 36: 77I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1598)
2014-06-12 20: 36: 78I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 36: 93I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 36: 93I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 36: 94I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 36: 94I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 36: 94I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 36: 95I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 36: 95I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 36: 95I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 36: 96I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 36: 96I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1655)
2014-06-12 20: 36: 97I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 36: 97I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 36: 98I/AmazonHttpClient(30949):     at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 36: 132I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.parseJsonResponse(UploadService.java:1106)
2014-06-12 20: 36: 133I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.makeRequest(UploadService.java:435)
2014-06-12 20: 36: 133I/AmazonHttpClient(30949):    at com.S3Upload.UploadService.onHandleIntent(UploadService.java:296)
2014-06-12 20: 36: 134I/AmazonHttpClient(30949):    at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
2014-06-12 20: 36: 135I/AmazonHttpClient(30949):    at android.os.Handler.dispatchMessage(Handler.java:99)
2014-06-12 20: 36: 136I/AmazonHttpClient(30949):    at android.os.Looper.loop(Looper.java:137)
2014-06-12 20: 36: 137I/AmazonHttpClient(30949):    at android.os.HandlerThread.run(HandlerThread.java:60)
2014-06-12 20: 36: 138W/System.err(30949): com.amazonaws.AmazonClientException: Unable to execute HTTP request: No peer certificate
2014-06-12 20: 36: 139W/System.err(30949):  at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:343)
2014-06-12 20: 36: 140W/System.err(30949):  at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:179)
2014-06-12 20: 36: 140W/System.err(30949):  at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:2980)
2014-06-12 20: 36: 141W/System.err(30949):  at com.amazonaws.services.s3.AmazonS3Client.initiateMultipartUpload(AmazonS3Client.java:2197)
2014-06-12 20: 36: 142W/System.err(30949):  at com.rightbackup.simpl3r.Uploader.upload(Uploader.java:260)
2014-06-12 20: 36: 143W/System.err(30949):  at com.rightbackup.simpl3r.Uploader.start(Uploader.java:182)
2014-06-12 20: 36: 144W/System.err(30949):  at com.S3Upload.UploadService.finalUpload(UploadService.java:1598)
2014-06-12 20: 36: 145W/System.err(30949):  at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 36: 145W/System.err(30949):  at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 36: 146W/System.err(30949):  at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 36: 147W/System.err(30949):  at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 36: 148W/System.err(30949):  at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 36: 149W/System.err(30949):  at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 36: 150W/System.err(30949):  at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 36: 151W/System.err(30949):  at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 36: 151W/System.err(30949):  at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 36: 152W/System.err(30949):  at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 36: 153W/System.err(30949):  at com.S3Upload.UploadService.finalUpload(UploadService.java:1655)
2014-06-12 20: 36: 154W/System.err(30949):  at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 36: 155W/System.err(30949):  at com.S3Upload.UploadService.finalUpload(UploadService.java:1633)
2014-06-12 20: 36: 156W/System.err(30949):  at com.S3Upload.UploadService.upload(UploadService.java:1381)
2014-06-12 20: 36: 157W/System.err(30949):  at com.S3Upload.UploadService.parseJsonResponse(UploadService.java:1106)
2014-06-12 20: 36: 158W/System.err(30949):  at com.S3Upload.UploadService.makeRequest(UploadService.java:435)
2014-06-12 20: 36: 159W/System.err(30949):  at com.S3Upload.UploadService.onHandleIntent(UploadService.java:296)
2014-06-12 20: 36: 160W/System.err(30949):  at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
2014-06-12 20: 36: 161W/System.err(30949):  at android.os.Handler.dispatchMessage(Handler.java:99)
2014-06-12 20: 36: 162W/System.err(30949):  at android.os.Looper.loop(Looper.java:137)
2014-06-12 20: 36: 163W/System.err(30949):  at android.os.HandlerThread.run(HandlerThread.java:60)
2014-06-12 20: 36: 164W/System.err(30949): Caused by: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
2014-06-12 20: 36: 164W/System.err(30949):  at org.apache.harmony.xnet.provider.jsse.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:137)
2014-06-12 20: 36: 165W/System.err(30949):  at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:93)
2014-06-12 20: 36: 165W/System.err(30949):  at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)
2014-06-12 20: 36: 166W/System.err(30949):  at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:165)
2014-06-12 20: 36: 167W/System.err(30949):  at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
2014-06-12 20: 36: 167W/System.err(30949):  at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
2014-06-12 20: 36: 168W/System.err(30949):  at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
2014-06-12 20: 36: 168W/System.err(30949):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
2014-06-12 20: 36: 169W/System.err(30949):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
2014-06-12 20: 36: 169W/System.err(30949):  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
2014-06-12 20: 36: 169W/System.err(30949):  at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:295)
2014-06-12 20: 36: 170W/System.err(30949):  ... 27 more

当它到来时,应用程序停留在上传状态,并且我的异常块中没有捕获到这个异常。当我在搜索这个问题时,我发现你的JVM已经过时,你必须更新你的JVM。那么如何解决这个问题,任何想法?

1 个答案:

答案 0 :(得分:0)

  

javax.net.ssl.SSLPeerUnverifiedException:无对等证书

您使用的是匿名Diffie-Hellman(ADH),服务器上未安装证书,服务器未启用SSL / TLS,或者服务器存在信任问题。

您应该验证SSL / TLS是否可用于OpenSSL(或其他工具)。例如:

$ openssl s_client -connect <server>:<port>

以下是s_client(1)上的OpenSSL文档。

如果有可用的SSL / TLS服务器,请在Apache HTTPClient SSLPeerUnverifiedException查看Bruno的答案。

还有另一个潜在的问题:没有客户证书。但我不认为这是一个问题。它看起来不像您为相互身份验证配置,我在后面跟踪中看不到TLS警报。