Tempo-limite do aperto de mão SSL

Tenho 2 Certificados de autenticação de cliente emitidos pela mesma autoridade de certificação. Um deles permite-me ligar a um serviço web HTTPS, mas o outro não quando eu uso um código semelhante ao seguinte:

HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create( endPointUrl );
X509Store store = new X509Store( StoreName.My, StoreLocation.LocalMachine );
store.Open( OpenFlags.MaxAllowed );
X509CertificateCollection col = (X509CertificateCollection)store.Certificates.Find( X509FindType.FindBySerialNumber, certificateSerialNumber, true );
httpWebRequest.ClientCertificates.Add( col[0] );
httpWebRequest.Method = "POST";
httpWebRequest.ContentType = contentType;
httpWebRequest.KeepAlive = false;
httpWebRequest.Timeout = 3000;
httpWebRequest.ContentLength = message.Length;
httpRequestStream = httpWebRequest.GetRequestStream();

ao tentar obter o fluxo de Pedidos, recebo uma excepção de operação inválida com a mensagem"a operação expirou".

usei o sistema. Net. trace ao tentar ligar-se ao certificado Que falha e o registo mostra uma ligação tempo-limite antes de "tentar reiniciar a sessão usando o certificado fornecido pelo Usuário"e logo após o primeiro Inicializesecuritycontext.

a Wireshark mostra o seguinte:

"TCP","j-link > https [SYN] Seq=0 Win=65535 Len=0 MSS=1260 SACK_PERM=1"
"TCP","https > j-link [SYN, ACK] Seq=0 Ack=1 Win=32768 Len=0 MSS=1380"
"TCP","j-link > https [ACK] Seq=1 Ack=1 Win=65535 Len=0"
"TLSv1","Client Hello"
"TLSv1","Server Hello"
"TCP","[TCP segment of a reassembled PDU]"
"TCP","j-link > https [ACK] Seq=78 Ack=2521 Win=65535 Len=0"
"TLSv1","Certificate, Certificate Request, Server Hello Done"
"TCP","j-link > https [ACK] Seq=78 Ack=3187 Win=64869 Len=0"
"TCP","j-link > https [FIN, ACK] Seq=78 Ack=3187 Win=64869 Len=0"
"TCP","https > j-link [ACK] Seq=3187 Ack=79 Win=32768 Len=0"
"TLSv1","Alert (Level: Warning, Description: Close Notify)"
"TCP","j-link > https [RST, ACK] Seq=79 Ack=3194 Win=0 Len=0"

Posso ligar-me usando o OpenSSL a partir da linha de comandos, usando ambos os certificados depois de os exportar e convertendo-os para o formato PEM.

Todas as sugestões seriam muito apreciadas.

Author: WhiteKnight, 2012-02-15

1 answers

Obrigado à perguntado Shawn que me ajudou a corrigir o problema de tempo-limite, que foi devido à conexão que levou mais de 60 segundos para falhar.

Depois obtive um " o pedido foi interrompido: não foi possível criar o canal de segurança SSL/TLS."error, which was solved by using the Windows HTTP Services Certificate Configuration Tool and information I obtained here .

 1
Author: WhiteKnight, 2017-05-23 10:30:58