none
SSL root certificate not trusted Error RRS feed

  • Question

  • I have created my certificate by OpenSSL, and then it was placed in my server.

    When I connected to the server by web browser such as IE and chrome, it works well, although it's shown warning message.

    But, when I developed client program using webrequest.GetResponseStream(), I met error.

    I traced that error message and found why is my server is not trusted provider.

    I try to find turnnoff option to check trusted provider but, I can't.

    How can I use ssl protocol in my client with my own certificate?

     

     

    Thursday, April 7, 2011 6:26 AM

Answers

  • Have you tried setting the CertificatePolicy on the ServiceManager:

     

     

    ServicePointManager.CertificatePolicy = new AcceptAllCertificatePolicy();

    internal class AcceptAllCertificatePolicy : ICertificatePolicy
    {
      public AcceptAllCertificatePolicy()
      {
      }

      public bool CheckValidationResult(ServicePoint sPoint,
         X509Certificate cert, WebRequest wRequest,int certProb)
      {
        // Always accept
        return true;
      }
    }

     


    Christopher Cericola
    • Marked as answer by Jung Won-Chon Friday, April 8, 2011 12:49 AM
    Thursday, April 7, 2011 12:58 PM

All replies

  • Have you tried setting the CertificatePolicy on the ServiceManager:

     

     

    ServicePointManager.CertificatePolicy = new AcceptAllCertificatePolicy();

    internal class AcceptAllCertificatePolicy : ICertificatePolicy
    {
      public AcceptAllCertificatePolicy()
      {
      }

      public bool CheckValidationResult(ServicePoint sPoint,
         X509Certificate cert, WebRequest wRequest,int certProb)
      {
        // Always accept
        return true;
      }
    }

     


    Christopher Cericola
    • Marked as answer by Jung Won-Chon Friday, April 8, 2011 12:49 AM
    Thursday, April 7, 2011 12:58 PM
  • Hello Christopher Cericola,

     

    Thank you for your reply.

    I solved my problem. :)

     

    Best Regards,

    Jung Won-Chon

    Friday, April 8, 2011 12:51 AM