Did you read section "Appendix B: SSL" the HTTP Service User's Guide at 
the http://staf.sourceforge.net/current/Http.html#SSL ?

How does your https website authenticate?  Does it use cookies to 
authenticate or does it use preemptive authentication, etc?  Section 
"Appendix B: SSL" gives some examples of how to perform  authentication.

Or, if your https wesite requires that you set the proxy host and proxy 
port JVM options, you can specify them when registering the STAF HTTP 
service in your STAF.cfg file.  Here's an example of registering the HTTP 
service in the STAF.cfg file specifying the http.proxyHost (set to your 
proxy host IP address) and http.proxyPort (set to your proxy port) options 
for the HTTP JVM:

service HTTP library JSTAF \
             execute {STAF/Config/STARoot}/service/http/STAFHTTP.jar \
             option JVMName=HTTP \
             option J2=-Dhttp.proxyHost=n.n.n.n \
             option J2=-Dhttp.proxyPort=nnnn

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




arul prakash <arulprakas...@gmail.com> 
02/13/2010 04:19 AM

To
staf-users@lists.sourceforge.net
cc

Subject
[staf-users] Problem with HTTP service for 'https' protocols






Hi,
    I am trying to access a webpage hosted in a local webserver.I uses 
'https' protocol.When I use the command to request a page it throws 
exception.How to resolve this?

C:\>staf local HTTP REQUEST METHOD get URL 
https://10.31.248.245/appliance-console RETURNNOCONTENT
Error submitting request, RC: 4004
Additional info
---------------
Error getting target url
javax.net.ssl.SSLHandshakeException: 
sun.security.validator.ValidatorException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathB
uilderException: unable to find valid certification path to requested 
target
javax.net.ssl.SSLHandshakeException: 
sun.security.validator.ValidatorException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathB
uilderException: unable to find valid certification path to requested 
target
        at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown 
Source)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown 
Source)
        at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
        at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
        at 
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown 
Source)
        at 
com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown 
Source)
        at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown 
Source)
        at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown 
Source)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown 
Source)
        at 
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown 
Source)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown 
Source)
        at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown 
Source)
        at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
        at java.io.BufferedOutputStream.flush(Unknown Source)
        at 
org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:828)
        at 
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2116)
        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 
com.ibm.staf.service.http.WebSession.requestMethod(WebSession.java:1671)
        at 
com.ibm.staf.service.http.HTTP.handleSessionMethod(HTTP.java:1637)
        at 
com.ibm.staf.service.http.HTTP.handleNonSessionMethod(HTTP.java:1354)
        at com.ibm.staf.service.http.HTTP.handleMethod(HTTP.java:1322)
        at com.ibm.staf.service.http.HTTP.acceptRequest(HTTP.java:222)
        at 
com.ibm.staf.service.STAFServiceHelper.callService(STAFServiceHelper.java:349)
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(Unknown Source)
        at sun.security.validator.PKIXValidator.engineValidate(Unknown 
Source)
        at sun.security.validator.Validator.validate(Unknown Source)
        at 
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source)
        at 
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown 
Source)
        at 
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown 
Source)
        ... 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(Unknown 
Source)
        at java.security.cert.CertPathBuilder.build(Unknown Source)
        ... 29 more

-- 
Regards,
Arul

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to