<?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: How to avoid SSL error while using https API call using filename url or proc http procedure? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-SSL-error-while-using-https-API-call-using-filename/m-p/420385#M103456</link>
    <description>&lt;P&gt;Looks like the certificate on the server is bad (has a different hostname). Talk to the responsible sysadmin.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2017 08:08:53 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-12-12T08:08:53Z</dc:date>
    <item>
      <title>How to avoid SSL error while using https API call using filename url or proc http procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-SSL-error-while-using-https-API-call-using-filename/m-p/420325#M103436</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SAS9.4 M0 version, trying to get data using api call.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;filename test url "https://webaddress-dev/api/users/username-ab123"&lt;BR /&gt;user='login' pass=password;&lt;/P&gt;&lt;P&gt;data test_achive;&lt;BR /&gt;infile testlength=len lrecl=32767;&lt;BR /&gt;input line $varying32767. len;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename resp "C:\Users\rkv897\Documents\test.xml";&lt;/P&gt;&lt;P&gt;proc http&lt;BR /&gt;method="GET"&lt;BR /&gt;url="&lt;SPAN&gt;https://webaddress-dev/api/users/username-ab123&lt;/SPAN&gt;"&lt;BR /&gt;out=resp&lt;BR /&gt;WEBPASSWORD="&lt;SPAN&gt;password&lt;/SPAN&gt;"&lt;BR /&gt;WEBUSERNAME="&lt;SPAN&gt;login&lt;/SPAN&gt;";&lt;BR /&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;ERROR: SSL Error: Invalid subject name in partner's certificate. Subject name must match&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;machine name.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In both cases, I am able getting same SSL error. I can get the information in xml&amp;nbsp;format when I&amp;nbsp;enter the same address on the web browser, I do have to override the certificate error.&lt;/P&gt;&lt;P&gt;I have exported the certificate into base64 encoding and converted into .jks file using below command in command prompt.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;d:\SAS\Applications\SASPrivateJavaRuntimeEnvironment\9.4\jre\bin&amp;gt;keytool -importcert -file "C:\Users\&lt;SPAN&gt;dcb123&lt;/SPAN&gt;\Documents\webcertificate.cer" -keystore "C:\Users\dcb123\Documents\keystorefile.jks" -alias "anything"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found some information about proc https connection&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a003286920.html" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a003286920.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Using Hypertext Transfer Protocol Secure (HTTPS)&lt;/P&gt;&lt;DIV class="xis-refProc"&gt;&lt;DIV class="xis-procUsing"&gt;&lt;DIV class="xis-subTopic"&gt;&lt;DIV class="xis-topicContent"&gt;&lt;DIV class="xis-codeBlock"&gt;&lt;PRE class="xis-code"&gt;"C:\Program Files\SAS\SASFoundation\9.2\sas.exe" -CONFIG
"C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASV9.CFG"
-jreoptions (- Djavax.net.ssl.trustStore=C:\Documents and
Settings\mydir\.keystore
-Djavax.net.ssl.trustStorePassword=trustpassword)&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Added the keystorefile.jks as keystore location and password I entered while running the command in the configuration file SASv9.CFG .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still, I got same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got some information from this link too but it doesn't work for SAS9.4 M0.&lt;/P&gt;&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=secref&amp;amp;docsetTarget=n12033intelplatform00install.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=ja" target="_blank"&gt;http://documentation.sas.com/?docsetId=secref&amp;amp;docsetTarget=n12033intelplatform00install.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=ja&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone please help with this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rama&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 00:30:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-SSL-error-while-using-https-API-call-using-filename/m-p/420325#M103436</guid>
      <dc:creator>Rama_V</dc:creator>
      <dc:date>2017-12-12T00:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid SSL error while using https API call using filename url or proc http procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-SSL-error-while-using-https-API-call-using-filename/m-p/420385#M103456</link>
      <description>&lt;P&gt;Looks like the certificate on the server is bad (has a different hostname). Talk to the responsible sysadmin.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 08:08:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-SSL-error-while-using-https-API-call-using-filename/m-p/420385#M103456</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-12-12T08:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid SSL error while using https API call using filename url or proc http procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-SSL-error-while-using-https-API-call-using-filename/m-p/421037#M103590</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I was not using the host name the certificate was issued too. As I entered the domain in the api call ,&amp;nbsp;there was no error. I can get the data using proc http.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;https://webaddress-dev.&lt;STRONG&gt;domainname.com&lt;/STRONG&gt;/api/users/username-ab123&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"Everything looks fine" For some of the data I have to solve Multi byte character issue when reading the xml file.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 23:45:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-SSL-error-while-using-https-API-call-using-filename/m-p/421037#M103590</guid>
      <dc:creator>Rama_V</dc:creator>
      <dc:date>2017-12-13T23:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid SSL error while using https API call using filename url or proc http procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-SSL-error-while-using-https-API-call-using-filename/m-p/451635#M113904</link>
      <description>&lt;P&gt;Maybe just use http://&amp;nbsp; instead of https://&amp;nbsp; can work&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 17:24:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-SSL-error-while-using-https-API-call-using-filename/m-p/451635#M113904</guid>
      <dc:creator>getright</dc:creator>
      <dc:date>2018-04-05T17:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid SSL error while using https API call using filename url or proc http procedure?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-SSL-error-while-using-https-API-call-using-filename/m-p/451712#M113931</link>
      <description>&lt;P&gt;Thank you, but the issue has been resolved.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 23:02:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-SSL-error-while-using-https-API-call-using-filename/m-p/451712#M113931</guid>
      <dc:creator>Rama_V</dc:creator>
      <dc:date>2018-04-05T23:02:25Z</dc:date>
    </item>
  </channel>
</rss>

