No client certificate was presented during SSL Handshake

R.You

I'd like to ask for explanation. I am using X.509 certificate, and when I tried to post my data to a webservice which I want to communicate with, I am getting the following error: "

No client certificate was presented during SSL Handshake

can you please explain me what is the issue?

NB: I am using .NET Framework 3.5 / C#

What I did exactly is: First I imported the certificate into the store, then I used the code below in order to find it and then recieve the token (using AskForToken function). However, when I send with my data, I got handshake failure.

My first question is why I succeed to get token (if I am not mistaken, the client (which is my application) sent the certificate to the server and got the token, which means the connection has been done well)?

My second question, what do I have to change or check to get rid of this handshake failure.

private static string RequestSecurityToken()
        {
            WSTrustChannelFactory trustChannelFactory = new Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannelFactory(
                        new CertificateWSTrustBinding(SecurityMode.TransportWithMessageCredential),
                        new EndpointAddress(new Uri(stsAddress)));

            trustChannelFactory.TrustVersion = TrustVersion.WSTrust13;

            string thumb = "fe14593dd66b2406c5269d742d04b6e1ab03adb1";
            trustChannelFactory.Credentials.ClientCertificate.SetCertificate(StoreLocation.CurrentUser, StoreName.My, X509FindType.FindByThumbprint, thumb);
            trustChannelFactory.Credentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.PeerOrChainTrust;
            cert = trustChannelFactory.Credentials.ClientCertificate.Certificate;

            var tokenString = AskForToken(serviceURL, trustChannelFactory);
            trustChannelFactory.Close();
            return tokenString;
        }
DerKasper

SSL has a possibility to demand client authentification. So the Client (your application) has to send a certificate that the Server trusts before the connection is established. It seems that this client authentification fails, because your application doesn´t send such a certificate.

Depending on the webservice you try to use it won´t be possible to create such a certificate, because the server only trusts application from e.g. a certain company.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Failed to attach client certificate during ssl handshake in android

From Dev

SSL handshake failed SVN (no SSL certificate)

From Dev

SSL Client-Server with self signed certificate imported at runtime fails on handshake

From Dev

Symfony installation Error: curl: (35) SSL peer handshake failed, the server most likely requires a client certificate to connect

From Dev

Firefox does not offer client certificate: SSL_ERROR_HANDSHAKE_FAILURE_ALERT

From Dev

Retrieve public server certificate key during handshake

From Dev

Client SSL with an Intermediate Certificate

From Dev

SSL Certificate from client

From Dev

Disable client SSL certificate

From Dev

PayPal IPN Listener - SSL Certificate Handshake Failure

From Dev

Is domain name of the server checked during SSL handshake

From Dev

Is domain name of the server checked during SSL handshake

From Dev

Client violating MSS value agreed during handshake

From Dev

Scala https client with SSL certificate

From Dev

SSL Client certificate verification on linphone

From Dev

.NET Mutual SSL handshake 'Client Authentication'

From Dev

Boost Asio SSL Client Handshake Problems

From Dev

.NET Mutual SSL handshake 'Client Authentication'

From Dev

Getting SSL Handshake error even after installing & verifying the certificate

From Dev

SSL certificate handshake exception aborts DownloadManager image download from CloudFront

From Dev

RabbitMQ SSL handshake failure on any connection attempt with certificate authentication

From Dev

2 Way SSL - Client Certificate Not Sent To Server

From Dev

Apache Http Client SSL certificate error

From Dev

Disable SSL client certificate on *some* WebAPI controllers?

From Dev

Unable to get SSL client certificate working in Tornado

From Dev

IO::Socket::SSL client checking server certificate

From Dev

MongoDB C# SSL Client Certificate

From Dev

SSL client certificate auth with ruby (sinatra)

From Dev

What is the correct certificate purpose for SSL client in python?

Related Related

  1. 1

    Failed to attach client certificate during ssl handshake in android

  2. 2

    SSL handshake failed SVN (no SSL certificate)

  3. 3

    SSL Client-Server with self signed certificate imported at runtime fails on handshake

  4. 4

    Symfony installation Error: curl: (35) SSL peer handshake failed, the server most likely requires a client certificate to connect

  5. 5

    Firefox does not offer client certificate: SSL_ERROR_HANDSHAKE_FAILURE_ALERT

  6. 6

    Retrieve public server certificate key during handshake

  7. 7

    Client SSL with an Intermediate Certificate

  8. 8

    SSL Certificate from client

  9. 9

    Disable client SSL certificate

  10. 10

    PayPal IPN Listener - SSL Certificate Handshake Failure

  11. 11

    Is domain name of the server checked during SSL handshake

  12. 12

    Is domain name of the server checked during SSL handshake

  13. 13

    Client violating MSS value agreed during handshake

  14. 14

    Scala https client with SSL certificate

  15. 15

    SSL Client certificate verification on linphone

  16. 16

    .NET Mutual SSL handshake 'Client Authentication'

  17. 17

    Boost Asio SSL Client Handshake Problems

  18. 18

    .NET Mutual SSL handshake 'Client Authentication'

  19. 19

    Getting SSL Handshake error even after installing & verifying the certificate

  20. 20

    SSL certificate handshake exception aborts DownloadManager image download from CloudFront

  21. 21

    RabbitMQ SSL handshake failure on any connection attempt with certificate authentication

  22. 22

    2 Way SSL - Client Certificate Not Sent To Server

  23. 23

    Apache Http Client SSL certificate error

  24. 24

    Disable SSL client certificate on *some* WebAPI controllers?

  25. 25

    Unable to get SSL client certificate working in Tornado

  26. 26

    IO::Socket::SSL client checking server certificate

  27. 27

    MongoDB C# SSL Client Certificate

  28. 28

    SSL client certificate auth with ruby (sinatra)

  29. 29

    What is the correct certificate purpose for SSL client in python?

HotTag

Archive