abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philip Durbin <philipdur...@gmail.com>
Subject how to tell Abdera to ignore invalid cert on localhost
Date Tue, 16 Jul 2013 14:26:00 GMT
I'm playing around with https://github.com/swordapp/JavaClient2.0 (which
uses Abdera) and pointing it at "localhost" which does not have a valid SSL
cert.

Is there a way I can tell Abdera to ignore the invalid SSL cert on
localhost? With curl I would use -k or --insecure for this.

Thanks,

Phil

p.s. Here's a stack trace:

run:
tryFSDeposit
 INFO [main] (SWORDClient.java:1574) - Requesting Service Document from
http://localhost:8080/dvn/api/data-deposit/swordv2/service-document with
username sword
 INFO [main] (AuthChallengeProcessor.java:101) - basic authentication
scheme selected
 INFO [main] (SWORDClient.java:149) - Retrieved Service Document from
http://localhost:8080/dvn/api/data-deposit/swordv2/service-document with
HTTP success code
DEBUG [main] (SWORDClient.java:297) - beginning deposit on Collection url
https://localhost:8181/dvn/api/data-deposit/swordv2/collection/dataverse/sword
DEBUG [main] (SWORDClient.java:308) - Formalised Collection URL to
https://localhost:8181/dvn/api/data-deposit/swordv2/collection/dataverse/sword
DEBUG [main] (SWORDClient.java:1529) - Setting username/password:
sword/****password omitted *****
 INFO [main] (SWORDClient.java:1620) - CreateRequest:  with username sword
Binary Only deposit; filename=bagit.zip mimetype=application/zip Addition
HTTP headers: In-Progress: true; Metadata-Relevant: false
DEBUG [main] (SWORDClient.java:360) - Connecting to server to do
Binary-Only deposit at url
https://localhost:8181/dvn/api/data-deposit/swordv2/collection/dataverse/sword
Exception in thread "main" java.lang.RuntimeException:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target
    at
org.apache.abdera.protocol.client.AbderaClient.execute(AbderaClient.java:701)
    at
org.apache.abdera.protocol.client.AbderaClient.post(AbderaClient.java:238)
    at org.swordapp.client.SWORDClient.deposit(SWORDClient.java:362)
    at org.swordapp.client.SWORDClient.deposit(SWORDClient.java:277)
    at org.swordapp.client.SwordCli.tryFSDeposit(SwordCli.java:82)
    at org.swordapp.client.SwordCli.main(SwordCli.java:60)
Caused by: javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target
    at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
    at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1747)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:241)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:235)
    at
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1209)
    at
com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:135)
    at
com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
    at
com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
    at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:943)
    at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1188)
    at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:654)
    at
com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:100)
    at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at
org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:828)
    at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.flushRequestOutputStream(MultiThreadedHttpConnectionManager.java:1565)
    at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2077)
    at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
    at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
    at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    at
org.apache.abdera.protocol.client.AbderaClient.execute(AbderaClient.java:688)
    ... 5 more
Caused by: sun.security.validator.ValidatorException: PKIX path building
failed: sun.security.provider.certpath.SunCertPathBuilderException: unable
to find valid certification path to requested target
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:323)
    at
sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:217)
    at sun.security.validator.Validator.validate(Validator.java:218)
    at
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:126)
    at
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:209)
    at
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)
    at
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1188)
    ... 23 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
    at
sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:174)
    at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:238)
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:318)
    ... 29 more
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message