Date: Thu, 2 Oct 2003 15:27:25 +0200 From: "Manfred Riem" <mriem@win.tue.nl> To: <java@freebsd.org> Subject: RE: [OT] SourceForge AddReleaseTask Message-ID: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAgjJ/YbsydEiM%2BB2MArS8eMKAAAAQAAAAmRe7nyNk%2BU6cRKG/hkYHKgEAAAAA@win.tue.nl> In-Reply-To: <200310021507.09939.znerd@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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@freebsd.org [mailto:owner-freebsd-java@freebsd.org] On Behalf Of Ernst de Haan Sent: Thursday, October 02, 2003 3:07 PM To: java@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@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-java To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAgjJ/YbsydEiM%2BB2MArS8eMKAAAAQAAAAmRe7nyNk%2BU6cRKG/hkYHKgEAAAAA>