403 Запрещено — на странице требуется сертификат клиента как часть процесса аутентификации

Я нахожусь в процессе реализации клиента SOAP на PHP. Я получил .pfx сертификат от удаленной компании, реализующей сервис SOAP.

Когда я импортирую это .pfx в Chrome и откройте файл WDSL по адресу: https://api.test.remote.company.com/O/OMS.svc?singlewsdlЯ действительно получаю файл XML.

Так как мне нужно использовать .pem сертификаты для PHP SoapClientЯ преобразовал .pfx со следующим:

openssl pkcs12 -in received.pfx -out converted.pem -clcerts

Поскольку у меня все еще возникали проблемы с моим клиентом, я прибег к выполнению теста с помощью Curl:

curl --verbose --cert converted.pem:MyPassphrase https://api.test.remote.company.com/O/OMS.svc?singlewsdl

Но я получаю сообщение об ошибке 403:

*   Trying 123.4.56.789...
* Connected to api.test.remote.company.com (123.4.56.789) port 443 (#0)
* found 173 certificates in /etc/ssl/certs/ca-certificates.crt
* found 697 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_CBC_SHA384
*    server certificate verification OK
*    server certificate status verification SKIPPED
*    common name: test.api.company.com (matched)
*    server certificate expiration date OK
*    server certificate activation date OK
*    certificate public key: RSA
*    certificate version: #3
*    subject: C=RU,ST=Moscow,L=Moscow,O=AO Company Lab,OU=IT,CN=test.api.company.com
*    start date: Tue, 31 May 2016 00:00:00 GMT
*    expire date: Thu, 08 Jun 2017 23:59:59 GMT
*    issuer: C=US,O=thawte\, Inc.,CN=thawte SSL CA - G2
*    compression: NULL
* ALPN, server did not agree to a protocol
> GET /O/OMS.svc?singlewsdl HTTP/1.1
> Host: api.test.remote.company.com
> User-Agent: curl/7.50.1
> Accept: */*
>
< HTTP/1.1 403 Forbidden ( The page requires a client certificate as part of the authentication process. If you are using a smart card, you will need to insert your smart card to select an appropriate certificate. Otherwise, contact your server administrator.  )
< Connection: close
< Pragma: no-cache
< Cache-Control: no-cache
< Content-Type: text/html
...

Кто-нибудь знает, что происходит и как это можно решить?

1

Решение

Следующая процедура для преобразования .pfx сертификат для .pem решил вопрос:

openssl pkcs12 -in the.pfx -out cert.pem -clcerts -nokeys

openssl pkcs12 -in the.pfx -out key.pem -nocerts

Затем объедините cert.pem а также key.pem файлы в уникальный файл, без каких-либо дополнений.

0

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector