[OT] SourceForge AddReleaseTask

Manfred Riem mriem at win.tue.nl
Thu Oct 2 06:27:27 PDT 2003


Hi Ernst,

You can do 2 things. Either just disable certificate validation in Java.

 See http://javaalmanac.com/egs/javax.net.ssl/TrustAll.html

Or adding the certificate 

 See http://javaalmanac.com/egs/javax.net.ssl/GetCert.html
 See http://javaalmanac.com/egs/java.security/AddCert.html

Regards,
Manfred.

-----Original Message-----
From: owner-freebsd-java at freebsd.org
[mailto:owner-freebsd-java at freebsd.org] On Behalf Of Ernst de Haan
Sent: Thursday, October 02, 2003 3:07 PM
To: java at freebsd.org
Subject: [OT] SourceForge AddReleaseTask


Offtopic: A question about HTTPS / Java:


I'm writing an Ant task to automate the SourceForge 'Add release'
procedure. 
For this I'm using Jakarta Commons Net and HttpClient.

The task can be used in an Ant build file as follows:

<taskdef name="sfaddrelease"
classname="org.xins.util.ant.sourceforge.AddReleaseTask"
classpath="xins-common.jar:commons-net.jar:commons-httpclient.jar"
/>

<sfaddrelease
user="znerd"
password="${password}"
file="build/xins-${version}.tar.gz"
group="71598"
package="71219"
release="${version}"
/>

The login is done using HTTPS. The Commons HttpClient library supports
this. 
But apparently, the server is not trusted, because I get a 
javax.net.ssl.SSLHandshakeException. The message is:

"java.security.cert.CertificateException: Could not find trusted 
certificate"

Apparently, I need to get the certificate of sourceforge.net and store
it in 
a keystore. Perhaps I should use 'keytool -import' for this, in some
way.

Questions:
* How do I get the certificate of sourceforge.net?
* How do I store it in a file so that Java will accept it?


Ernst

_______________________________________________
freebsd-java at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "freebsd-java-unsubscribe at freebsd.org"



More information about the freebsd-java mailing list