You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Eng-list <en...@Xiotech.com> on 2005/12/03 20:18:51 UTC

Get HTTPS server cert

Hi,
 
I'm developing an Apache Axis web service client and accessing a web
service through HTTPS.  I don't have the server's cert at the time that
I initially access the server so the cert is not trusted and
communication fails.  I understand how to pre-trust the server's cert
and communicate successfully if I obtain the server's cert out-of-band
ahead of time.  However, I don't understand how to grab the cert on the
fly during the initial HTTPS handshake.  With other toolkits, I have
handled the "untrusted cert" exception, shown the cert to the user and
after confirmation added the cert to the local trust list and proceeded.
However, I can't seem to get at the server's cert programmatically when
it isn't already trusted...
 
I tried this:  http://javaalmanac.com/egs/javax.net.ssl/TrustAll.html
 
But it doesn't seem to work within Axis?
 
Any help on this issue would be greatly appreciated!
 
Thanks,
 
Ryan

Re: Get HTTPS server cert

Posted by Davanum Srinivas <da...@gmail.com>.
see http://www.mindreef.com/weblog/index/P249/

On 12/3/05, Eng-list <en...@xiotech.com> wrote:
>
> Hi,
>
> I'm developing an Apache Axis web service client and accessing a web service
> through HTTPS.  I don't have the server's cert at the time that I initially
> access the server so the cert is not trusted and communication fails.  I
> understand how to pre-trust the server's cert and communicate successfully
> if I obtain the server's cert out-of-band ahead of time.  However, I don't
> understand how to grab the cert on the fly during the initial HTTPS
> handshake.  With other toolkits, I have handled the "untrusted cert"
> exception, shown the cert to the user and after confirmation added the cert
> to the local trust list and proceeded.  However, I can't seem to get at the
> server's cert programmatically when it isn't already trusted...
>
> I tried this:
> http://javaalmanac.com/egs/javax.net.ssl/TrustAll.html
>
> But it doesn't seem to work within Axis?
>
> Any help on this issue would be greatly appreciated!
>
> Thanks,
>
> Ryan


--
Davanum Srinivas : http://wso2.com/blogs/