Я новичок в работе с CryptoPro. Помогите пожалуйста разобраться, мой java код как в примере Certificates из samples-sources->userSamples,
но при вызове getEncodedCert получаю эксепшен. В качестве HTTP_ADDRESS использую
http://testgost2012.cryptopro.ru/certsrv/Caused by: java.net.ConnectException: Connection refused: connect
at java.base/sun.nio.ch.Net.connect0(Native Method) ~[na:na]
at java.base/sun.nio.ch.Net.connect(Net.java:579) ~[na:na]
at java.base/sun.nio.ch.Net.connect(Net.java:568) ~[na:na]
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:585) ~[na:na]
at java.base/java.net.Socket.connect(Socket.java:633) ~[na:na]
at java.base/java.net.Socket.connect(Socket.java:583) ~[na:na]
at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:183) ~[na:na]
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:498) ~[na:na]
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:603) ~[na:na]
at java.base/sun.net.www.http.HttpClient.<init>(HttpClient.java:246) ~[na:na]
at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:351) ~[na:na]
at java.base/sun.net.www.http.HttpClient.New(HttpClient.java:373) ~[na:na]
at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1309) ~[na:na]
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1242) ~[na:na]
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1128) ~[na:na]
at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:1057) ~[na:na]
at java.base/sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1430) ~[na:na]
at java.base/sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1401) ~[na:na]
at ru.CryptoPro.JCPRequest.pc_0.cl_3.a(Unknown Source) ~[JCPRequest-5.0.42119-A.jar:42119-A]
at ru.CryptoPro.JCPRequest.pc_0.cl_3.a(Unknown Source) ~[JCPRequest-5.0.42119-A.jar:42119-A]
at ru.CryptoPro.JCPRequest.GostCertificateRequest.a(Unknown Source) ~[JCPRequest-5.0.42119-A.jar:42119-A]
at ru.CryptoPro.JCPRequest.GostCertificateRequest.getEncodedCert(Unknown Source) ~[JCPRequest-5.0.42119-A.jar:42119-A]
at com.example.crypto.CertificateService.createRequestAndGetCert(CertificateService.java:252) ~[classes/:na]
Добавленные в проект библиотеки
2022-06-20 23_19_28-jcp.png
(49kb) загружен 2 раз(а).В чем может быть проблема?
Отредактировано пользователем 20 июня 2022 г. 23:23:33(UTC)
| Причина: Не указана