How to validate a server certificate programmably

Discussion in 'ASP .Net Web Services' started by Silan, Feb 26, 2004.

  1. Silan

    Silan Guest

    When we double click a .cer certificate file, a certificate dialog will be popped up. If the certificate has anything wrong the dialog will show a warning message

    Is there a method in the .NET class library which could do such a validation checking and return a boolean
    Silan, Feb 26, 2004
    #1
    1. Advertising

  2. Have a look at the ICertificatePolicy interface in System.Net. It has one method that allows you to validate or deny a server certificate. A simple implementation would just return..

    serverCertificate.Equals( publicKeyCertficate ), where you provide the X509Certifcate of publicKeyCertificate in the constructor ofyour implementaion

    You hook this up with the ServicePointManager.CertificatePolicy property in your application

    hope this helps

    ~harri
    http://www.harrisreynolds.net/weblog
    Harris Reynolds, Feb 26, 2004
    #2
    1. Advertising

  3. Silan

    Jan Tielens Guest

    That's right.

    You can also read following post:
    http://weblogs.asp.net/jan/archive/2003/12/04/41154.aspx

    --
    Greetz

    Jan Tielens
    ________________________________
    Read my weblog: http://weblogs.asp.net/jan


    "Harris Reynolds" <> wrote in message
    news:...
    > Have a look at the ICertificatePolicy interface in System.Net. It has one

    method that allows you to validate or deny a server certificate. A simple
    implementation would just return...
    >
    > serverCertificate.Equals( publicKeyCertficate ), where you provide the

    X509Certifcate of publicKeyCertificate in the constructor ofyour
    implementaion.
    >
    > You hook this up with the ServicePointManager.CertificatePolicy property

    in your application.
    >
    > hope this helps,
    >
    > ~harris
    > http://www.harrisreynolds.net/weblog
    Jan Tielens, Feb 26, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Diego Rivero
    Replies:
    0
    Views:
    349
    Diego Rivero
    Jul 4, 2003
  2. D
    Replies:
    10
    Views:
    989
    John B. Matthews
    Apr 27, 2009
  3. Silan Liu

    How to send and validate a server certificate

    Silan Liu, Feb 22, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    132
    Silan Liu
    Feb 22, 2004
  4. Helena Cai
    Replies:
    0
    Views:
    380
    Helena Cai
    Aug 29, 2004
  5. Replies:
    0
    Views:
    403
Loading...

Share This Page