Service Virtualization

Expand all | Collapse all

How to add SSL certficate with Rest step

Jump to Best Answer
  • 1.  How to add SSL certficate with Rest step

    Posted 04-26-2017 01:27 PM

    Hello,

     

    I have a Rest (Http, Get) step which requires SSL certificate and password to run successfully. How do we add SSL certificate for Rest steps?

     

    I tried adding in local.properties Section 3 (details below) but it did not work.

     

    ## Enable a client cert and password for SSL.
    ## (Used by both HTTP Step and Raw SOAP Step Execution -
    ## also used by Web Service Step Execution if not overridden

    ssl.client.cert.path =

    ssl.client.cert.pass=

     

    Thanks!



  • 2.  Re: How to add SSL certficate with Rest step

    Posted 04-26-2017 11:22 PM

    Hello,

       What is the error you are getting after adding these properties, Please give error details for further assist or you can raise a support ticket to analyse the issue.

     

    Thanks

    Srikanth



  • 3.  Re: How to add SSL certficate with Rest step

    Posted 04-27-2017 04:51 PM

    do you have below mentioned property defined in local.properties?

    https.protocols=SSLv3, TLSv1.2

     

    If not, please add the same, Restart the workstation and try.



  • 4.  Re: How to add SSL certficate with Rest step
    Best Answer

    Posted 04-28-2017 09:11 AM

    This can sometimes be better added in the vmoptions file (since it is a Java setting, not a DevTest one) as 

     

    -Dhttps.protocols=TLSv1.1TLSv1.2

    and so on

     

    SSLv3 is disabled in Java - and is horrendously insecure. If needed then the JRE configuration must be changed. 



  • 5.  Re: How to add SSL certficate with Rest step

    Posted 04-28-2017 09:13 AM

    If you are having trouble debugging your certificate configuration, from the Help menu enable HTTP/SSL debug - the DevTest Workstation will then provide much more information to show what is happening



  • 6.  Re: How to add SSL certficate with Rest step

    Posted 05-03-2017 11:16 AM

    Sunil,

    Did Dave's responses help you out with this issue?

    Regards,

    Reid



  • 7.  Re: How to add SSL certficate with Rest step

    Posted 05-09-2017 01:59 PM

    Hi Reid,

     

    No the issue is still not resolved. I am seeing following error.

     

    Without Certificate and https.protocols=SSLv3, TLSv1.2
    ------------------------------------------------------------------
    ============================================================================
    | HTTP
    ============================================================================
    | Message: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
    ----------------------------------------------------------------------------
    | Trapped Exception: Received fatal alert: certificate_unknown
    | Trapped Message: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
    ----------------------------------------------------------------------------
    STACK TRACE
    javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
    at sun.security.ssl.Alerts.getSSLException(Unknown Source)
    at sun.security.ssl.Alerts.getSSLException(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)


    With certificate path, password and https.protocols=SSLv3, TLSv1.2 in local.properties
    -----------------------------------------------------------------------------

    ============================================================================
    | HTTP
    ============================================================================
    | Message: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    ----------------------------------------------------------------------------
    | Trapped Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    | Trapped Message: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    ----------------------------------------------------------------------------
    STACK TRACE
    javax.net.ssl.SSLHandshakeException: 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.ssl.Alerts.getSSLException(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
    at sun.security.ssl.Handshaker.fatalSE(Unknown Source)



  • 8.  Re: How to add SSL certficate with Rest step

    Posted 05-09-2017 02:37 PM

    It seems certificate type you using not supported ( unable to find valid certification path to requested target and certificate_unknown ) .  

     

    Please try to use valid certificate issue by CA.  

    https://communities.ca.com/thread/241757150

    you can refer below link as similar question already address. 

     

    Hope this helps. 

    Thanks, 

    Rajesh k Singh