[xmlsec] xmlSecCryptoAppKeyLoadMemory

Yeshwanth C cyeshwanth at gmail.com
Tue Dec 19 00:43:43 PST 2006


Hi Folks,
Able to do the signing as well as verification using -

pCertContext = GetCertContext();

 xKeyDataPtr = xmlSecMSCryptoCertAdopt(pCertContext,
xmlSecKeyDataTypePrivate);

 keyPtr = xmlSecKeyCreate();

 xmlSecKeySetValue(keyPtr, xKeyDataPtr);

 dsigCtx->signKey = keyPtr;

Thanks again for your helpful tips and effort.

Regards,

Yesh



On 12/19/06, Yeshwanth C <cyeshwanth at gmail.com> wrote:
>
> Hi Folks,,
> Many thanks for all your suggestions.  The signature is getting verified
> from the "Windows Certificate store using the xmlSecMSCryptCertAdopt
> function and related functions.
>
> I should check up on now signing using similar functions.
> Regards
> Yesh
>
>
>  On 12/19/06, Yeshwanth C <cyeshwanth at gmail.com > wrote:
> >
> > the error I am getting when I send the input as
> > xmlSecKeyDataFormatCertDer is "ASN1 bad tag value met."  when I read the
> > public key blob that I have saved in a file directly
> >
> > What is the header file I should use to use xmlSecMSCryptoCertAdopt
> > Regards and many thanks for your efforts
> > Yesh.
> >
> >
> >  On 12/19/06, Yeshwanth C <cyeshwanth at gmail.com > wrote:
> > >
> > > I just tried it.  It didnt work.
> > > My problem is that I should sign xml with a private key taken from the
> > > windows certificate store.  Then I should take the corresponding public key
> > > and verify the signed xml.
> > >
> > > I have problems signing the xml as well as verifying the signed xml
> > > using windows certificate store.  I would appreciate any sample programs.
> > >
> > > Regards
> > > Yesh
> > >
> > >
> > >  On 12/19/06, Wouter <wsh333 at gmail.com> wrote:
> > > >
> > > > The PCCERT_CONTEXT contains a direct pointer to the DER formatted
> > > > certificate. You can use that as input for type xmlSecKeyDataFormatCertDer.
> > > > That will also make the public key it contains avaible.
> > > >
> > > > Wouter
> > > >
> > > >
> > > > Yeshwanth C wrote:
> > > >
> > > >  typedef struct _CRYPT_BIT_BLOB {
> > > >   DWORD cbData <http:///>;
> > > >   BYTE* pbData <http:///>;
> > > >   DWORD cUnusedBits <http:///>;
> > > > } CRYPT_BIT_BLOB,
> > > > *PCRYPT_BIT_BLOB;
> > > > Thisis one of the structures that gives u the public key
> > > > The public key is in pbData.
> > > > -yesh
> > > >
> > > >
> > > > On 12/18/06, Aleksey Sanin <aleksey at aleksey.com > wrote:
> > > > >
> > > > > What is the binary format you get from MS API?
> > > > >
> > > > > Aleksey
> > > > >
> > > > >
> > > > ------------------------------
> > > >
> > > > _______________________________________________
> > > > xmlsec mailing listxmlsec at aleksey.comhttp://www.aleksey.com/mailman/listinfo/xmlsec
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > xmlsec mailing list
> > > > xmlsec at aleksey.com
> > > > http://www.aleksey.com/mailman/listinfo/xmlsec
> > > >
> > > >
> > > >
> > >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.aleksey.com/pipermail/xmlsec/attachments/20061219/6c1590b6/attachment-0002.htm


More information about the xmlsec mailing list