HttpRequest.ClientCertificate プロパティ
現在、要求しているクライアントのセキュリティ証明書を取得します。
Public ReadOnly Property ClientCertificate As HttpClientCertificate
[C#]
public HttpClientCertificate ClientCertificate {get;}
[C++]
public: __property HttpClientCertificate* get_ClientCertificate();
[JScript]
public function get ClientCertificate() : HttpClientCertificate;
プロパティ値
クライアントのセキュリティ証明書の設定に関する情報を格納している HttpClientCertificate オブジェクト。
使用例
クライアントの証明書の設定をクライアントに HTML ページで返信する例を次に示します。
Dim cs As HttpClientCertificate = Request.ClientCertificate
Response.Write("<p>Client Certificate settings:</p>")
Response.Write("Certificate = " & cs.Certificate.ToString() & "<br>")
Response.Write("Cookie = " & cs.Cookie & "<br>")
Response.Write("Flags = " & cs.Flags & "<br>")
Response.Write("IsPresent = " & cs.IsPresent & "<br>")
Response.Write("Issuer = " & cs.Issuer & "<br>")
Response.Write("IsValid = " & cs.IsValid & "<br>")
Response.Write("KeySize = " & cs.KeySize & "<br>")
Response.Write("SecretKeySize = " & cs.SecretKeySize & "<br>")
Response.Write("SerialNumber = " & cs.SerialNumber & "<br>")
Response.Write("ServerIssuer = " & cs.ServerIssuer & "<br>")
Response.Write("ServerSubject = " & cs.ServerSubject & "<br>")
Response.Write("Subject = " & cs.Subject & "<br>")
Response.Write("ValidFrom = " & cs.ValidFrom & "<br>")
Response.Write("ValidUntil = " & cs.ValidUntil & "<br>")
Response.Write("What's this = " & cs.ToString() & "<br>")
[C#]
HttpClientCertificate cs = Request.ClientCertificate;
Response.Write("ClientCertificate Settings:<br>");
Response.Write("Certificate = " + cs.Certificate + "<br>");
Response.Write("Cookie = " + cs.Cookie + "<br>");
Response.Write("Flags = " + cs.Flags + "<br>");
Response.Write("IsPresent = " + cs.IsPresent + "<br>");
Response.Write("Issuer = " + cs.Issuer + "<br>");
Response.Write("IsValid = " + cs.IsValid + "<br>");
Response.Write("KeySize = " + cs.KeySize + "<br>");
Response.Write("SecretKeySize = " + cs.SecretKeySize + "<br>");
Response.Write("SerialNumber = " + cs.SerialNumber + "<br>");
Response.Write("ServerIssuer = " + cs.ServerIssuer + "<br>");
Response.Write("ServerSubject = " + cs.ServerSubject + "<br>");
Response.Write("Subject = " + cs.Subject + "<br>");
Response.Write("ValidFrom = " + cs.ValidFrom + "<br>");
Response.Write("ValidUntil = " + cs.ValidUntil + "<br>");
Response.Write("What's this = " + cs.ToString() + "<br>");
[C++]
HttpClientCertificate* cs = Request->ClientCertificate;
Response->Write(S"ClientCertificate Settings:<br>");
Response->Write(String::Format(S"Certificate = {0}<br>", cs->Certificate));
Response->Write(String::Format(S"Cookie = {0}<br>", cs->Cookie));
Response->Write(String::Format(S"Flags = {0}<br>", __box(cs->Flags)));
Response->Write(String::Format(S"IsPresent = {0}<br>", __box(cs->IsPresent)));
Response->Write(String::Format(S"Issuer = {0}<br>", cs->Issuer));
Response->Write(String::Format(S"IsValid = {0}<br>", __box(cs->IsValid)));
Response->Write(String::Format(S"KeySize = {0}<br>", __box(cs->KeySize)));
Response->Write(String::Format(S"SecretKeySize = {0}<br>", __box(cs->SecretKeySize)));
Response->Write(String::Format(S"SerialNumber = {0}<br>", cs->SerialNumber));
Response->Write(String::Format(S"ServerIssuer = {0}<br>", cs->ServerIssuer));
Response->Write(String::Format(S"ServerSubject = {0}<br>", cs->ServerSubject));
Response->Write(String::Format(S"Subject = {0}<br>", cs->Subject));
Response->Write(String::Format(S"ValidFrom = {0}<br>", __box(cs->ValidFrom)));
Response->Write(String::Format(S"ValidUntil = {0}<br>", __box(cs->ValidUntil)));
Response->Write(String::Format(S"What's this = {0}<br>", cs));
[JScript]
var cs : HttpClientCertificate = Request.ClientCertificate
Response.Write("<p>Client Certificate settings:</p>")
Response.Write("Certificate = " + cs.Certificate.ToString() + "<br>")
Response.Write("Cookie = " + cs.Cookie + "<br>")
Response.Write("Flags = " + cs.Flags + "<br>")
Response.Write("IsPresent = " + cs.IsPresent + "<br>")
Response.Write("Issuer = " + cs.Issuer + "<br>")
Response.Write("IsValid = " + cs.IsValid + "<br>")
Response.Write("KeySize = " + cs.KeySize + "<br>")
Response.Write("SecretKeySize = " + cs.SecretKeySize + "<br>")
Response.Write("SerialNumber = " + cs.SerialNumber + "<br>")
Response.Write("ServerIssuer = " + cs.ServerIssuer + "<br>")
Response.Write("ServerSubject = " + cs.ServerSubject + "<br>")
Response.Write("Subject = " + cs.Subject + "<br>")
Response.Write("ValidFrom = " + cs.ValidFrom + "<br>")
Response.Write("ValidUntil = " + cs.ValidUntil + "<br>")
Response.Write("What//s this = " + cs.ToString() + "<br>")
必要条件
プラットフォーム: Windows 2000, Windows XP Professional, Windows Server 2003 ファミリ