深入浅出ASP.NET程序设计-源代码
书籍语言: 简体中文
书籍类型: 程序设计
授权方式: 免费软件
书籍大小: 627 KB
源代码在线查看: ch10-02-05.aspx
Ch10-02-05.aspx 获取客户端的证书信息
获取客户端的证书信息
Dim HDC As HttpClientCertificate = Request.ClientCertificate
Response.Write("证书相关信息:" & HDC.Certificate.ToString & "")
Response.Write("证书识别码:" & HDC.Cookie & "")
Response.Write("是否安装证书:" & HDC.IsPresent & "")
Response.Write("颁发单位:" & HDC.Issuer & "")
Response.Write("是否有效:" & HDC.IsValid & "")
Response.Write("密钥大小:" & HDC.KeySize & "")
Response.Write("私钥大小:" & HDC.SecretKeySize & "")
Response.Write("证书序号:" & HDC.SerialNumber & "")
Response.Write("服务器证书颁发单位:" & HDC.ServerIssuer & "")
Response.Write("服务器证书接受方:" & HDC.ServerSubject & "")
Response.Write("客户端证书接受方:" & HDC.Subject & "")
Response.Write("证书生效日期:" & HDC.ValidFrom & "")
Response.Write("证书到期日期:" & HDC.ValidUntil & "")
%>