• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfhttp fails with "peer not authenticated" under ssl for p12 cert + unexpected keystore behaviour

New Here ,
Jul 28, 2013 Jul 28, 2013

Copy link to clipboard

Copied

Hi

We are trying to work with a 3rd party server product that has a REST API so we are using cfhttp to interact with it.  We want to implement two-way SSL for the calls so that it is only our app that is able to make calls to the REST API.  So we put a password protected .p12 cert into C:\ColdFusion9\runtime\jre\lib\security and from the same location import the p12 into the keystore via the command:

..\..\bin\keytool -importkeystore -srckeystore CAAT_Client.p12 -destkeystore cacerts.jks -srcstoretype pkcs12 -deststoretype JKS -alias contentanlystclient -destalias CAAT_ClientP12 -deststorepass changeit -destkeypass changeit

The process asks for the password for the cert and then seems to import it.  I say seems because it is not in the list when I do:

..\..\bin\keytool -storepass changeit -list -keystore cacerts

However, if I try to reimport the cert it says: Existing entry alias contentanlystclient exists, overwrite? [no]:

It seems that maybe the -list command only lists .cer certs rather than .p12 certs too (this is the stange keystore behaviour referenced in the title).

So it seems the cert exists.  However when we call the REST API using cfhttp with https we get the error:

I/O Exception: peer not authenticated

We tried adding the JVM argument -Dcoldfusion.disablejsafe=true as suggested in http://www.raymondcamden.com/index.cfm/2011/1/12/Diagnosing-a-CFHTTP-issue--peer-not-authenticated but it made no difference (the post is for a different issue but thought it was worth a try.  Also tried changing the ssl.TrustManagerFactory.algorithm in C:\CF9\runtime\jre\lib\security\java.security to no avail).

We need to make sure access to the 3rd party app is locked down to our CF app but we're at our wits end trying to work out why it is not working.  Any assistance would be greatly appreciated.

Thanks


Nathan

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 21, 2015 Jun 21, 2015

Copy link to clipboard

Copied

LATEST

Добрый день!

У меня то же похожая темя на счет сертификата, у меня не получается конвертировать p12 сертификат в jks формат

Этот сертификат был создан 2 года назад в программе Adobe Flash Pro

Помогите пожалуйста конвертировать серт в jks или подскажите как это делается.

Пробовал разные варианты:

keytool -genkey -alias 1 -keystore yourcertificate.jks

keytool -delete -alias 1 -keystore yourcertificate.jks

keytool -v -importkeystore -srckeystore D:\flash_Android.p12 -srcstoretype PKCS12 -destkeystore yourcertificate.jks -deststoretype JKS

и разные другие методы конвертации с p12 на jks, но при загрузке приложения, Google Play ругается что не соответствует сертификат.

может кто сталкивался с такой проблемой?

Подскажите пожалуйста

Заранее благодарен!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation