[OT] SourceForge AddReleaseTask

Ernst de Haan znerd at FreeBSD.org
Thu Oct 2 06:07:11 PDT 2003


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



More information about the freebsd-java mailing list