RE: Get Client Certificate on non-English System Locale Server

From: JH Shao (jhshao@hotpop.com)
Date: 08/13/02


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>
>
>.
>



Relevant Pages

  • Re: Active Directory Federation Services
    ... How do I get a Microsoft CA to issue me a client cert? ... option for client certificate. ... There is a user certificate, ... I'm not an FSP expert by any means, but I might be able to help here. ...
    (microsoft.public.windows.server.active_directory)
  • Re: SSL client certificate authentication
    ... The list is populated by IE based on the list of root CA certs that the IIS ... > 2> When I install the microsoft certificate services, ... > client certificate is installed in the client machine and gets stored ... > * In the Anonymous access and authentication control section, ...
    (microsoft.public.win2000.security)
  • SSL client certificate authentication
    ... I tried out doing the SSL client certificate authentication in the ... 2> When I install the microsoft certificate services, ...
    (microsoft.public.win2000.security)
  • Re: Windows Mobile + https + clientcertificates?
    ... the Crypto APIs returned the correct certificate? ... client certificate for which you have an associated private key. ... have an HTTP status of 500, internal server error, and no results). ...
    (microsoft.public.windowsce.app.development)
  • Certificate Trust List
    ... EventID 36885 is registered when a user presents a client certificate. ... Patch the server from Windows Update including refreshing trusted root ... Install a client certificate issued by the CA from step 4 to IE6. ... On the server the following event is recorded in the System Log: ...
    (microsoft.public.inetserver.iis.security)

Quantcast