Import the first data certificate into ColdFusion

I tried to import the certificate from First Data into my ColdFusion 9 installation using keytool:

keytool -importcert -keystore MYCF9Dir\runtime\jre\lib\security\cacerts -trustcacerts -alias firstdata -file FirstData.pem

Import seems to work, however, when I access the WSDL using any ColdFusion function or tag, it throws an "I / O Exception: Fatal Warning Received: handshake_failure". Which tells me that he cannot access the site with the certificates that he has, or cannot find it.

So, am I importing the certificate correctly? And if so, how else can I access this WSDL with ColdFusion?

+3
source share
3 answers

.crt .pem?

keytool -importcert -keystore C:\Coldfusion9\runtime\jre\lib\security\cacerts -trustcacerts -alias myserver -file myserver.crt

.

, .

0

, Java. , ColdFusion, , .

, SSLContext firstdata , - .

Java , :

KeyStore ksjks = KeyStore.getInstance(KeyStore.getDefaultType());
ksjks.load(new FileInputStream("/path/to/your/p12/file"),"password".toCharArray());

KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
kmf.init(ksjks, "password".toCharArray());

SSLContext sslContext = SSLContext.getInstance("SSLv3");
sslContext.init(kmf.getKeyManagers(), null, null);

SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();

:

URL url = new URL("serverUrl");
HttpsURLConnection urlConn = (HttpsURLConnection) url.openConnection();
urlConn.setSSLSocketFactory(sslSocketFactory);

, . !

0

, , - , . .pem, , Cacert ColdFusion, API (), , . .pem PKCS12 OpenSSL - : http://cc.in2p3.fr/docenligne/84/en#0.4 (). CFHTTP CF-, :

        <cfhttp
        url="https://urlToAPI"
        method="POST"
        clientCert="path to the file (.p12)"
        clientCertPassword="password"
        result="result">             

. , -.

0

Source: https://habr.com/ru/post/1655836/


All Articles