VNIT

Too lazy to think of a slogan

Trang chủ » Diễn Đàn » Lập trình và Phát triển Web » Microsoft .NET » Do I need to use X509Chain to veryfy ServerCertificate.

Chủ đề đã bị khóa, bạn không thể xóa, sửa hay trả lời trong chủ đề này!

First Page Previous Page  1  Next Page Last Page
Locked Do I need to use X509Chain to veryfy ServerCertificate.
0
question Gởi bởi phuongt (6:31 20-02-2012)
Bài: 1,736 / Điểm VCS: 1,686 /

Hi,

I wand to make the SSL connection to https my website( maybe webservice).
Of course I use Certificate and Key Exchange to secure Client/Server connection
But I want only my program to access to https my website

So I call
private X509Certificate2 verifyCert = null;

string defaultGatewayCa = "-----BEGIN CERTIFICATE-----\nUE\AUIfkDWGqpg2QR\n-----END CERTIFICATE-----\n";
this.verifyCert = Util.GetCertFromstring(defaultGatewayCa);
ServicePointManager.ServerCertificateValidationCallback += new System.Net.Security.RemoteCertificateValidationCallback(ServerCertificateValidation);

private bool ServerCertificateValidation(Object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)    {
          return verifyCert.Verify();
}

Now the question is:
I verify Server Certificate signature by using CA certificate ( I assume that this CA has signed Server Certificate)
So do I need X509Chain to veryfy CA certificate up to Root CA?
I don't think I need to use X509Chain, but what purpose X509Chain parameter in delegate function is about?
First Page Previous Page  1  Next Page Last Page

Thống kê

Hiện tại web site có 85,801 thành viên. Xin chào đón thành viên mới nhất meocon_th_90.

Các thành viên đã tạo 62,791 chủ đề và 241,917 bài viết trong 30 box.

Hiện có 0 thành viên và 1 khách đang trực tuyến.

Template by styleshout / Icons by Tango Icon Library and FamFamFam.