<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SSL Handshake failure via ABAP Code / SM59 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738512#M35168</link>
    <description>&lt;P&gt;Aha. That's good news. If you are able to access web page that means there is an issue which can be fixed. Thank you for taking out time for the same&lt;/P&gt;&lt;P&gt;I'll check the cryptolib version and update here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit : &lt;/P&gt;&lt;P&gt;SSFLIB Version 1.840.40 ; CommonCryptoLib (SAPCRYPTOLIB) Version 8.4.32&lt;/P&gt;</description>
    <pubDate>Fri, 02 Nov 2018 03:03:18 GMT</pubDate>
    <dc:creator>manishkhanna</dc:creator>
    <dc:date>2018-11-02T03:03:18Z</dc:date>
    <item>
      <title>SSL Handshake failure via ABAP Code / SM59</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738506#M35162</link>
      <description>&lt;P&gt;Greetings&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;I am facing challenge in accessing a HTTPS URL &lt;A href="https://iam.bluemix.net" target="test_blank"&gt;https://iam.bluemix.net&lt;/A&gt; and am looking for some help.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Setup&lt;/STRONG&gt;&lt;/P&gt;
  &lt;UL&gt;
   &lt;LI&gt;- SAP Basis 740&lt;/LI&gt;
   &lt;LI&gt;- HTTPS Service setup &lt;/LI&gt;
  &lt;/UL&gt;
  &lt;PRE&gt;&lt;CODE&gt;ssl/ciphersuites         135:PFS:HIGH::EC_P256:EC_HIGH 
ssl/client_ciphersuites  918:PFS:HIGH::EC_P256:EC_HIGH " Have tried with 150 as well&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;UL&gt;
   &lt;LI&gt;Certificate from TLD iam.bluemix.net has been imported in Base64-X509 format to ANONYM PSE&lt;/LI&gt;
  &lt;/UL&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;ABAP Code&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;I've tried sample code found on SCN/Google but it didn't work.&lt;/P&gt;
  &lt;P&gt;ICM Log&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/235022-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;SM59&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;I tried to setup a G connection without SSL + No Auth + No Logon and got following error.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/235023-capture2.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;I've tried various combinations but they always land in the SSLV3 No certificate error (as in first screenshot). I've run out of ideas and in desperate need of some advice.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;ABAP Code &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;REPORT .
DATA  html_control TYPE REF TO cl_gui_html_viewer.
DATA: l_empty_co    TYPE REF TO cl_gui_container.
DATA : gv_url TYPE string VALUE 'https://iam.bluemix.net'.
DATA : url_char TYPE C LENGTH 255.
DATA : http_client TYPE REF TO if_http_client.
DATA : post_data_string TYPE string.
DATA : data_length TYPE I.
DATA : lt_table TYPE TABLE OF char255 WITH HEADER LINE.
DATA : page_content TYPE xstring.
DATA : lt_ex_tab  LIKE  lxe_xtab OCCURS 1 WITH HEADER LINE.

CREATE OBJECT html_control
EXPORTING
  parent = l_empty_co.

CALL METHOD cl_http_client=&amp;gt;create_by_url
EXPORTING
  url    = gv_url
IMPORTING
  CLIENT = http_client
EXCEPTIONS
  OTHERS = 1.

CALL METHOD http_client-&amp;gt;request-&amp;gt;set_header_field
EXPORTING
  name  = '~request_method'
  VALUE = 'POST'.

CALL METHOD http_client-&amp;gt;request-&amp;gt;set_header_field
EXPORTING
  name  = 'Content-Type'
  VALUE = 'application/x-www-form-urlencoded'.

* post_data_string = 'lang=TR....'.

* data_length = STRLEN( post_data_string ).

* CALL METHOD http_client-&amp;gt;request-&amp;gt;set_cdata
* EXPORTING
*DATA   = post_data_string
*      offset = 0
*      length = data_length.


CALL METHOD http_client-&amp;gt;send
EXCEPTIONS
  http_communication_failure = 1
  http_invalid_state         = 2.


IF sy-subrc &amp;lt;&amp;gt; 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 DISPLAY LIKE sy-msgty.
EXIT.
ENDIF.


*   5 - Get the result back

************* FAILS AT THIS POINT ***************
CALL METHOD http_client-&amp;gt;receive
EXCEPTIONS
  http_communication_failure = 1
  http_invalid_state         = 2
  http_processing_failed     = 3.


IF sy-subrc &amp;lt;&amp;gt; 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 DISPLAY LIKE sy-msgty.
EXIT.
ENDIF.


*   6 - Get the content of the returned page
page_content = http_client-&amp;gt;response-&amp;gt;get_data( ).


CALL FUNCTION 'LXE_COMMON_XSTRING_TO_TABLE'
EXPORTING
  in_xstring = page_content
TABLES
  ex_string  = lt_ex_tab.


CLEAR lt_table[].
LOOP AT lt_ex_tab.
APPEND lt_ex_tab-TEXT TO lt_table.
ENDLOOP.


url_char = gv_url.


CALL METHOD html_control-&amp;gt;load_data
EXPORTING
  url                  = url_char
IMPORTING
  assigned_url         = url_char
CHANGING
  data_table           = lt_table[]
EXCEPTIONS
  dp_invalid_parameter = 1
  dp_error_general     = 2
  cntl_error           = 3
  OTHERS               = 4.
IF sy-subrc &amp;lt;&amp;gt; 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 DISPLAY LIKE sy-msgty.
EXIT.
ENDIF.


CALL METHOD html_control-&amp;gt;('DETACH_URL_IN_BROWSER')
EXPORTING
  url = gv_url.
cl_gui_cfw=&amp;gt;flush( ).
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Oct 2018 04:39:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738506#M35162</guid>
      <dc:creator>manishkhanna</dc:creator>
      <dc:date>2018-10-27T04:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: SSL Handshake failure via ABAP Code / SM59</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738507#M35163</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to import all 3 certificates from the chain!&lt;/P&gt;&lt;P&gt;Also set ssl_id             = 'ANONYM'&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Domi&lt;/P&gt;</description>
      <pubDate>Sun, 28 Oct 2018 22:41:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738507#M35163</guid>
      <dc:creator>Domi</dc:creator>
      <dc:date>2018-10-28T22:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: SSL Handshake failure via ABAP Code / SM59</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738508#M35164</link>
      <description>&lt;P&gt;Thanks but did not work. I imported all 3 certificates in the chain to PSE. Then ran the code and tested SM59 connect. Same issue "No certificaste request ...."&lt;/P&gt;</description>
      <pubDate>Tue, 30 Oct 2018 18:05:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738508#M35164</guid>
      <dc:creator>manishkhanna</dc:creator>
      <dc:date>2018-10-30T18:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: SSL Handshake failure via ABAP Code / SM59</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738509#M35165</link>
      <description>&lt;P&gt;Did you restart the ICM after you imported the SSL certificates?&lt;BR /&gt;It's a little thing i discovered when i started to play with SSL: go to SMICM, choose menu Administration -&amp;gt; ICM -&amp;gt;Exit Hard -&amp;gt;Global&lt;/P&gt;&lt;P&gt;Once ICM restart, try again the connection in SM59&lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 07:39:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738509#M35165</guid>
      <dc:creator>SimoneMilesi</dc:creator>
      <dc:date>2018-10-31T07:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: SSL Handshake failure via ABAP Code / SM59</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738510#M35166</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Yes. I do that every time I import the certificates. If it is not  inconvenient, can I request you to try at your end. I just want to ensure if it's me or the site is not at all accessible via SAP. &lt;/P&gt;</description>
      <pubDate>Wed, 31 Oct 2018 12:06:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738510#M35166</guid>
      <dc:creator>manishkhanna</dc:creator>
      <dc:date>2018-10-31T12:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: SSL Handshake failure via ABAP Code / SM59</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738511#M35167</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report works fine (with some release dependent adjustments)&lt;/P&gt;&lt;P&gt;Which version of SAPCRYPTOLIB is installed (Report SSF02)?&lt;/P&gt;&lt;P&gt;regards domi&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2018 16:37:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738511#M35167</guid>
      <dc:creator>Domi</dc:creator>
      <dc:date>2018-11-01T16:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: SSL Handshake failure via ABAP Code / SM59</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738512#M35168</link>
      <description>&lt;P&gt;Aha. That's good news. If you are able to access web page that means there is an issue which can be fixed. Thank you for taking out time for the same&lt;/P&gt;&lt;P&gt;I'll check the cryptolib version and update here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit : &lt;/P&gt;&lt;P&gt;SSFLIB Version 1.840.40 ; CommonCryptoLib (SAPCRYPTOLIB) Version 8.4.32&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2018 03:03:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738512#M35168</guid>
      <dc:creator>manishkhanna</dc:creator>
      <dc:date>2018-11-02T03:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: SSL Handshake failure via ABAP Code / SM59</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738513#M35169</link>
      <description>&lt;P&gt;Hi Domi&lt;/P&gt;&lt;P&gt;I have upgraded SAPCRYPTOLIB to 8.5.23. Still doesn't works. ( Have restarted server and ICM)&lt;/P&gt;&lt;P&gt;Further I've created a new PSE with only 4 certificates. &lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Chain of 3 certificates from iam.bluemix.net&lt;/LI&gt;&lt;LI&gt;github certificate as required&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Below is a side-by-side comparison&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/242467-2018-11-16-10-29-09.jpg" /&gt;&lt;/P&gt;&lt;P&gt;github connects ok where bluemix gives same error. Could you share necessary info on your side that made the report work for you ? Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 05:08:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738513#M35169</guid>
      <dc:creator>manishkhanna</dc:creator>
      <dc:date>2018-11-16T05:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: SSL Handshake failure via ABAP Code / SM59</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738514#M35170</link>
      <description>&lt;P&gt;Thank you all for your inputs. The issue is finally resolved. It was a cipher suit issue. I forced TLS 1.2 and that worked. Appreciate your time and valueable inputs. &lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 10:52:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738514#M35170</guid>
      <dc:creator>manishkhanna</dc:creator>
      <dc:date>2018-11-21T10:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: SSL Handshake failure via ABAP Code / SM59</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738515#M35171</link>
      <description>&lt;P&gt;Hello Manish,&lt;/P&gt;&lt;P&gt;how did you solved the problem. We are facing the same issue. &lt;/P&gt;&lt;P&gt;After an update to CommonCryptoLib Version : 8.5.23 ,Kernel Patch 614 with Kernel 749 and TLS 1.2.&lt;/P&gt;&lt;P&gt;We do not face this ssl handshake(-10)  issue on our sandbox which is 8.5.21 , Kernel Patch 520 and Kernel 749. and TLS 1.0.&lt;/P&gt;&lt;P&gt;Do know the issue, what parameter did you set ?&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Hasan&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 15:24:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ssl-handshake-failure-via-abap-code-sm59/m-p/738515#M35171</guid>
      <dc:creator>h_h_ak</dc:creator>
      <dc:date>2019-01-10T15:24:28Z</dc:date>
    </item>
  </channel>
</rss>

