BookmarkSubscribeRSS Feed
khandelwalanmol
Fluorite | Level 6

I have been trying to Call an API and fetch a access token. Have been dealing with certificate error. Here is the error log: 

ERROR:

OpenSSL error 336134278 (0x14090086) occurred in SSL_connect/accept at line 5388, the error message is "error:14090086:SSL
routines:ssl3_get_server_certificate:certificate verify failed".
ERROR: Secure communications error status 807ff008 description "OpenSSL error 336134278 (0x14090086) occurred in SSL_connect/accept
at line 5388, the error message is "error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed"."
ERROR: Encryption run-time execution error
ERROR: Call to tcpSockContinueSSL failed.

 

Here is my code for the call.

options set=SSL_USE_SNI="0" set=SSL_SNI_HOSTNAME="api.bcda.cms.gov"  ;	
proc http
   		url="https://api.bcda.cms.gov/auth/token" AUTH_BASIC
   		WEBUSERNAME="&client_id."
   		WEBPASSWORD="&client_secret."
   		out=apitoken
   		method="POST";
 		
   		headers "Accept"="application/json";
	run;

Any suggestions?

3 REPLIES 3
ChrisHemedinger
Community Manager

Perhaps the SSLPARMS statement can help. See this topic: Accept Self-signed certificate with PROC HTTP 

 

The SSLPARMS statement can help specify behavior for verifying certificates. Adding the SSLREQCERT= value may help.

Something like:

 

sslparms "sslreqcert"="allow";
 
Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
khandelwalanmol
Fluorite | Level 6
Passed the ssl parm statement. Having same certificate error.
Sajid01
Meteorite | Level 14

Hello @khandelwalanmol 
Apparently certificate verification has failed.
Please have a look here. https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/secref/n183v6l7w6dphwn1giqjw725640c.htm

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 762 views
  • 0 likes
  • 3 in conversation