Reply
Highlighted
Member
Posts: 5
Registered: ‎06-05-2017

Getting exception as 'peer not authenticated' while creating recurring billing

Hi,

 

I am still getting peer not authenticated exception even after upgraded into TSL1.2. I already posted a post on community. Below is the link.

 

https://community.developer.authorize.net/t5/Integration-and-Testing/Getting-exception-as-peer-not-a...

 

They suggest below code

 

try {
SSLContext ctx = SSLContext.getInstance("TLSv1.2");
ctx.init(null, null, null);
SSLContext.setDefault(ctx);
} catch (Exception e) {
System.out.println(e.getMessage());
}

Or

final SSLContext ctx = SSLContext.getInstance("TLSv1.2");
ctx.init(null,null, new java.security.SecureRandom());
final SSLSocketFactory socketFactory = ctx.getSocketFactory();
HttpsURLConnection.setDefaultSSLSocketFactory(socketFactory);

 But I am still getting exception.

 

Could any one help me to solve the issue?

 

Highlighted
Posts: 2,765
Topics: 57
Kudos: 247
Blog Posts: 67
Registered: ‎12-05-2011

Re: Getting exception as 'peer not authenticated' while creating recurring billing

Hello @davidarulHello

It's been a while since this was first posted.  Were you able to find a solution?

 

I would recommend subscribing to this topic so that you'll be alerted via email if anyone from the community is able to respond with any comments. To subscribe, click Topic Options at the top of this thread and then select Subscribe. You'll then receive an email once anyone replies.

Thanks,

Richard