Ответ 1
Задача здесь - найти, какие требования не выполняются. Вы можете использовать это: https://github.com/rodneyviana/blogdemos/blob/master/TestServerCertificate.zip
- Разархивируйте его в любом месте. Убедитесь, что приложение разблокировано (щелкните правой кнопкой мыши, свойства и установите флажок "Разблокировать", если он есть)
- Откройте командную строку в качестве администратора
- Запустите это, чтобы войти в пользовательский контекст системы: c:\sysinternals\PsExec -i -s cmd.exe
- В новом окне приглашения перейдите в папку, в которой вы извлекли инструмент
- Выполнить этот синтаксис: TestServerCertificate [host] [port]
- Это сохранит файл журнала и сертификаты из цепочки сертификатов в временную папку.
См. Пример ниже:
c:\tools>whoami
nt authority\system
c:\tools>TestServerCertificate.exe www.microsoft.com 443
Verify Certificate Details
==========================
Writing logs to C:\WINDOWS\TEMP\certchain_e9ab7362-e5ba-4adc-b47c-7f28c0eddbfc\output.log
c:\tools>notepad C:\WINDOWS\TEMP\certchain_e9ab7362-e5ba-4adc-b47c-7f28c0eddbfc\output.log
Это фактический журнал из приведенной выше команды (без ошибок, конечно):
Getting certificate from www.microsoft.com 443
TLS Protocol: Tls12
Strength 256
Certificate at www.microsoft.com
Thumbprint: 8FBE50987D59F8C023492162238250C2ED18176A
Subject: CN=www.microsoft.com, OU=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=WA, C=US
Friendly Name:
Issuer name: CN=Microsoft IT TLS CA 4, OU=Microsoft IT, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Valid until: 1/16/2020 3:24:02 PM
Certificate is valid: True
Number of extensions: 10
Writing Certificate: C:\WINDOWS\TEMP\certchain_e9ab7362-e5ba-4adc-b47c-7f28c0eddbfc\certificate_8FBE50987D59F8C023492162238250C2ED18176A.cer
WARNING: Certificate was not found in any location store
Chain Information
=================
Chain revocation flag: ExcludeRoot
Chain revocation mode: Online
Chain verification flag: NoFlag
Chain verification time: 8/11/2018 1:57:30 AM
Chain status length: 0
Chain application policy count: 0
Chain certificate policy count: 0
Chain Element Information
Number of chain elements: 3
Intermediate Certificate
==============================================
Element thumbprint: 8A38755D0996823FE8FA3116A277CE446EAC4E99
Element subject: CN=Microsoft IT TLS CA 4, OU=Microsoft IT, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Friendly Name:
Element issuer name: CN=Baltimore CyberTrust Root, OU=CyberTrust, O=Baltimore, C=IE
Element certificate valid until: 5/20/2024 7:52:38 AM
Element certificate is valid: True
Element error status length: 0
Element information:
Number of element extensions: 8
Writing Certificate: C:\WINDOWS\TEMP\certchain_e9ab7362-e5ba-4adc-b47c-7f28c0eddbfc\Intermediate_8A38755D0996823FE8FA3116A277CE446EAC4E99.cer
Information: Certificate was found installed in store(s) - CurrentUser\CA
ROOT Certificate
==============================================
Element thumbprint: D4DE20D05E66FC53FE1A50882C78DB2852CAE474
Element subject: CN=Baltimore CyberTrust Root, OU=CyberTrust, O=Baltimore, C=IE
Friendly Name: DigiCert Baltimore Root
Element issuer name: CN=Baltimore CyberTrust Root, OU=CyberTrust, O=Baltimore, C=IE
Element certificate valid until: 5/12/2025 6:59:00 PM
Element certificate is valid: True
Element error status length: 0
Element information:
Number of element extensions: 3
Writing Certificate: C:\WINDOWS\TEMP\certchain_e9ab7362-e5ba-4adc-b47c-7f28c0eddbfc\ROOT_D4DE20D05E66FC53FE1A50882C78DB2852CAE474.cer
Information: Certificate was found installed in store(s) - CurrentUser\AuthRoot LocalMachine\AuthRoot CurrentUser\Root LocalMachine\Root
============= End of Report =============
Если проблема неясна в журнале, отправьте ее здесь для анализа.
- Для этого требуется.NET 4.5 или новее. Если у вас его нет, добавьте трассировки System.Net в свой файл конфигурации и воспроизведите проблему, а затем опубликуйте файл здесь для анализа: https://docs.microsoft.com/en-us/dotnet/framework/network-programming/как конфигурируемый-сеть трассировка