RE: Get Client Certificate on non-English System Locale Server
From: JH Shao (jhshao@hotpop.com)
Date: 08/13/02
- Next message: Hasan: "RE: FTP and Web Service stop by itself"
- Previous message: Ken Schaefer: "Re: Web Security"
- In reply to: Cas Irvin [MS]: "RE: Get Client Certificate on non-English System Locale Server"
- Next in thread: GuoZhenying: "Re: Get Client Certificate on non-English System Locale Server"
- Reply: GuoZhenying: "Re: Get Client Certificate on non-English System Locale Server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "JH Shao" <jhshao@hotpop.com> Date: Mon, 12 Aug 2002 20:24:33 -0700
Dear Cas Irvin,
Thank you very much for the advice. Using Codepage=1252, I
can get the client certificate with no more problem. It's
very helpful.
I have one more question regarding getting client
certificate. For this case, IIS is running on Windows XP
Professional with the latest fix. The system locale is
English (United States). The same ASP page with
Codepage=1252 that works for the first case is used here.
First, the whole certificate is acquired. Then, the
certificate is printed as shown below.
var ucert = Request.ClientCertificate("Certificate");
var bcert = PrintStr(ucert);
Function PrintStr(UStr)
Dim lngLoop
Dim strChar
PrintStr = ""
For lngLoop = 1 to Len(UStr)
strChar = Mid(UStr, lngLoop, 1)
varasc = Asc(strChar)
Response.write(" " & varasc)
Next
End Function
What I get is:
63 63 63 63 63 65 63 63 63 63 63 63 63 97 63 32 63 187 63
63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 175 63
63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63
63 63 63 63 63 63 63 63 187 63 63 63 63 63 63 63 63 63 63
63 63 63 63 63 63 63 63 63 63 97 63 96 75 63 63 63 63 63
63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63
63 63 63 63 63 63 63 63 63 63 63 97 65 63 63 63 63 63 110
63 108 63 175 63 63 63 63 63 97 63 175 63 63 63 63 63 63
63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63
63 63 63 63 63 63 63 63 63 63 63 63 63 99 63 5 63 129 63
63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63
63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63
63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63
63 63 63 63 63 63
This is totally wrong. However, this is no problem to get
the "subject" etc. The only problem is the whole
certificate.
Please advise.
Thanks!
JH Shao
>-----Original Message-----
>JH,
>
>I did a little research on this and the only thing I
could come up with was
>how the data is being gathered. I found an example where
Session.Codepage
>affected the output of the data.
>
>Here's an example (it may not apply but I haven't seen
your code)
>
> x = Request.ClientCertificate("issuer")
> Session.CodePage = 1252
> su = Request.ClientCertificate("Subject")
>
>This is incorrect because the certificate is loaded on
the first reference
>(getting the "issuer"), so setting the codepage on the
next line is too
>late. You should either use the <%@ Codepaage= %>
directive, or just
>reorder the above code:
>
> Session.CodePage = 1252
> x = Request.ClientCertificate("issuer")
> su = Request.ClientCertificate("Subject")
>
>Also, in other tests (and this was with Chinese Locale)
setting
>Session.Codepage to 1252 resolved the issue entirely.
>
>Cas Irvin
>IIS Newsgroup Support
>
>Please do not send email directly to this alias. This is
our online account
>name for newsgroup participation only.
>
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>You assume all risk for your use. © 2001 Microsoft
Corporation. All rights
>reserved.
>
>Please remember to subscribe to our security bulletins at
><http://www.microsoft.com/technet/security/notify.asp>
>
>.
>
- Next message: Hasan: "RE: FTP and Web Service stop by itself"
- Previous message: Ken Schaefer: "Re: Web Security"
- In reply to: Cas Irvin [MS]: "RE: Get Client Certificate on non-English System Locale Server"
- Next in thread: GuoZhenying: "Re: Get Client Certificate on non-English System Locale Server"
- Reply: GuoZhenying: "Re: Get Client Certificate on non-English System Locale Server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|