Re: Container Name value gets corrupted after call to createFilePKCS10.

From: Vishal Agarwal[MSFT] (vishala_at_online.microsoft.com)
Date: 12/19/03


Date: Fri, 19 Dec 2003 09:56:41 -0800

Resending my response as it doesn't appear to be newsgroup.

during createFilePKCS10, after acquiring the CSP Context with the
containerName (guid), a call CryptGetProvParam with PP_UNIQUE_CONTAINER
param is made and the value returned is overwritten over the containerName
property.

Hope this helps,
Thanks,
Vishal [MSFT]

-- 
This posting is provided "AS IS" with no warranties, and confers no rights
"GC" <anonymous@discussions.microsoft.com> wrote in message
news:032101c3c553$14e475e0$a001280a@phx.gbl...
> Hi!
>
> Can someone explain me what is going on (maybe wrong) with
> the Container Name property of the CEnroll Object of MS
> CSP's platform SDK.
>
> I'm performing the following sequence of Steps :
>
> 1) Display the Container Name property :-
>    Result : Valid Guid
>
> 2) Create a PKCS10 request File using createFilePKCS10 call
>
> 3) Again Display the Container Name property :-
>    Result : Garbage
>
> Even if I supply my own Container name in the above
> sequence of steps, it produces junk Data in Step 3.
>
> Tried both with VC++ & VB code.
>
> The VB code snippet is:
>
> Dim objEnroll As CEnroll
> Set objEnroll = New CEnroll
>
> MsgBox (objEnroll.ContainerName)
>
> Dim strDN As String
> strDN = "CN=A"           ' common name
> strDN = strDN & ",OU=B"  ' org unit
> strDN = strDN & ",O=C"    ' organization
> strDN = strDN & ",L=D"     ' locality
> strDN = strDN & ",S=E"  ' state
> strDN = strDN & ",C=F"          ' country/region
>
> Dim strFileName As String
> strFileName = "myPKCS10.req"
>
> objEnroll.createFilePKCS10
> strDN, "1.3.6.1.4.1.311.2.1.21", strFileName
>
> MsgBox (objEnroll.ContainerName)
>
> Thanks in advance!
> GC.


Relevant Pages

  • Container Name value gets corrupted after call to createFilePKCS10.
    ... the Container Name property of the CEnroll Object of MS ... Dim objEnroll As CEnroll ... Dim strFileName As String ...
    (microsoft.public.platformsdk.security)
  • =?iso-8859-1?Q?Re:_Objekt_Identit=E4t?=
    ... Dann verfolge ich die Kanten des Graphen und checke für jeden Knoten zuerst, ob ich ihn schon besucht habe, indem ich im Container nachschaue. ... Also zuerst /alle/ Objekte im Wrapper verpacken und ihnen eine GUID verpassen - weil ich davon ausgehe, dass das Objekt selbst keinen eindeutigen Schlüssel hat, sonst hättest du die Frage ja nicht gestellt - und anschließend nur mit dem Wrapper-Objekten arbeiten und die GUID als Key verwenden. ...
    (microsoft.public.de.german.entwickler.dotnet.framework)
  • Setting default location for computer creation in 2003AD
    ... What I would like to be able to do is produce a script that I can set ... This is the guid for the default computer container. ... I have tried with adsi edit but not sure how to obtain this identifier. ...
    (microsoft.public.win2000.active_directory)
  • Re: Setting default location for computer creation in 2003AD
    ... What I would like to be able to do is produce a script that I can set ... This is the guid for the default computer container. ... Windows Server MVP ...
    (microsoft.public.win2000.active_directory)
  • Re: Translating group policy GUID til DN
    ... The DN of a GPO is simply the ... GUID appended to the CN=policies,CN=system container within your domain. ... for example if the GUID of a GPO is, ... > Can someone give a hint on the possibility to translate a> GPO GUID to DN. ...
    (microsoft.public.win2000.group_policy)