Re: [xmlsec] How to get Certificate from signed xml file

2006-05-02 Thread Aleksey Sanin


But I still don't find a way the export this certificate to my local machine 
for example c:\mycert.cer.


http://www.aleksey.com/xmlsec/api/xmlsec-openssl-x509.html#XMLSECOPENSSLKEYDATAX509GETCERT


Aleksey
___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


RE: [xmlsec] How to get Certificate from signed xml file

2006-05-02 Thread Jürgen Heiss
Hi Aleksey,

Well now I got my Certificate from signed xml ;o)
Using the following code.

key = dsigCtx.signKey;
size = xmlSecPtrListGetSize(key->dataList);
sdata = (*((dsigCtx).signKey)).dataList;
for(pos = 0; pos < size; ++pos) 
{
tmp = (xmlSecKeyDataPtr)xmlSecPtrListGetItem(key->dataList, 
pos);
if((tmp != NULL) && (tmp->id == sdata->id)) 
return(xmlSecPtrListSet(key->dataList, data, pos));
} 

But I still don't find a way the export this certificate to my local machine 
for example c:\mycert.cer.

Thanks for any help


-Original Message-
From: Aleksey Sanin [mailto:[EMAIL PROTECTED] 
Sent: Dienstag, 02. Mai 2006 17:45
To: Jürgen Heiss
Cc: xmlsec@aleksey.com
Subject: Re: [xmlsec] How to get Certificate from signed xml file



> Well i find my certificate, but how to export now?

I believe you found the key, not certificate. Look at KeyData objects in this 
key.


Aleksey



___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


Re: [xmlsec] FW: Free/Destroy versus Memory Leak

2006-05-02 Thread Aleksey Sanin



Edward Shallow wrote:

Almost there. Can't find msvcrt.lib

Not in MSSDK or VC6 ???

Ed


This is MS runtime library... Yet another MS download:

http://wiki.tcl.tk/11431

Aleksey

___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


RE: [xmlsec] FW: Free/Destroy versus Memory Leak

2006-05-02 Thread Edward Shallow
Almost there. Can't find msvcrt.lib

Not in MSSDK or VC6 ???

Ed

.
.
.
enveloped.c
errors.c
io.c
keyinfo.c
keys.c
keysdata.c
keysmngr.c
list.c
membuf.c
nodeset.c
parser.c
soap.c
strings.c
templates.c
Generating Code...
Compiling...
transforms.c
x509.c
xkms.c
xmldsig.c
xmlenc.c
xmlsec.c
xmltree.c
xpath.c
xslt.c
Generating Code...
link.exe /nologo /LIBPATH:binaries
/LIBPATH:c:\XMLSec\xmlsec1-1.2.9\lib /DEBUG /DLL /VERSION:1.2
/IMPLIB:binaries\libxmls
ec.lib /OUT:binaries\libxmlsec.dll  libxmlsec.int\app.obj
libxmlsec.int\base64.obj libxmlsec.int\bn.obj libxmlsec.int\buffer.obj
libxmlsec.int\c14n.obj  libxmlsec.int\dl.obj  libxmlsec.int\enveloped.obj
libxmlsec.int\errors.obj  libxmlsec.int\io.obj  libxmls
ec.int\keyinfo.obj  libxmlsec.int\keys.obj  libxmlsec.int\keysdata.obj
libxmlsec.int\keysmngr.obj  libxmlsec.int\list.obj  libxml
sec.int\membuf.obj  libxmlsec.int\nodeset.obj  libxmlsec.int\parser.obj
libxmlsec.int\soap.obj  libxmlsec.int\strings.obj  libxml
sec.int\templates.obj  libxmlsec.int\transforms.obj  libxmlsec.int\x509.obj
libxmlsec.int\xkms.obj  libxmlsec.int\xmldsig.obj  li
bxmlsec.int\xmlenc.obj  libxmlsec.int\xmlsec.obj  libxmlsec.int\xmltree.obj
libxmlsec.int\xpath.obj  libxmlsec.int\xslt.obj libxm
lsec.int\xmlsec-ltdl.obj  libxml2.lib libxslt.lib
LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'
NMAKE : fatal error U1077: 'link.exe' : return code '0x450'
Stop. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Edward Shallow
Sent: May 2, 2006 11:06 PM
To: 'Aleksey Sanin'
Cc: xmlsec@aleksey.com; [EMAIL PROTECTED]
Subject: RE: [xmlsec] FW: Free/Destroy versus Memory Leak

PostScript:

I am downloading the Platform SDK. That should do it. I'll ket you know.

Ed 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Edward Shallow
Sent: May 2, 2006 10:47 PM
To: 'Aleksey Sanin'
Cc: xmlsec@aleksey.com; [EMAIL PROTECTED]
Subject: RE: [xmlsec] FW: Free/Destroy versus Memory Leak

The link to the Visual Studio C++ 2003 Toolkit (free) provided to me by
Dmitry (thanks) contains ***NO*** nmake.exe

I had a tough time finding this old one. Any suggestions ?

Ed

-Original Message-
From: Aleksey Sanin [mailto:[EMAIL PROTECTED]
Sent: May 2, 2006 9:51 PM
To: [EMAIL PROTECTED]
Cc: xmlsec@aleksey.com; [EMAIL PROTECTED]
Subject: Re: [xmlsec] FW: Free/Destroy versus Memory Leak

> C:\XMLSec\xmlsec1-1.2.9\win32>nmake
> 
> Microsoft (R) Program Maintenance Utility   Version 1.50
> Copyright (c) Microsoft Corp 1988-94. All rights reserved.
> 
> makefile(571) : fatal error U1088: invalid separator '::' on inference 
> rule Stop.

The nmake you run is *very* old (version 1.50 from 1994). It is not from
MSVC .NET 2003.


Aleksey


___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


RE: [xmlsec] FW: Free/Destroy versus Memory Leak

2006-05-02 Thread Edward Shallow
PostScript:

I am downloading the Platform SDK. That should do it. I'll ket you know.

Ed 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Edward Shallow
Sent: May 2, 2006 10:47 PM
To: 'Aleksey Sanin'
Cc: xmlsec@aleksey.com; [EMAIL PROTECTED]
Subject: RE: [xmlsec] FW: Free/Destroy versus Memory Leak

The link to the Visual Studio C++ 2003 Toolkit (free) provided to me by
Dmitry (thanks) contains ***NO*** nmake.exe

I had a tough time finding this old one. Any suggestions ?

Ed

-Original Message-
From: Aleksey Sanin [mailto:[EMAIL PROTECTED]
Sent: May 2, 2006 9:51 PM
To: [EMAIL PROTECTED]
Cc: xmlsec@aleksey.com; [EMAIL PROTECTED]
Subject: Re: [xmlsec] FW: Free/Destroy versus Memory Leak

> C:\XMLSec\xmlsec1-1.2.9\win32>nmake
> 
> Microsoft (R) Program Maintenance Utility   Version 1.50
> Copyright (c) Microsoft Corp 1988-94. All rights reserved.
> 
> makefile(571) : fatal error U1088: invalid separator '::' on inference 
> rule Stop.

The nmake you run is *very* old (version 1.50 from 1994). It is not from
MSVC .NET 2003.


Aleksey


___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


Re: [xmlsec] FW: Free/Destroy versus Memory Leak

2006-05-02 Thread Aleksey Sanin




I had a tough time finding this old one. Any suggestions ?


http://www.microsoft.com/msdownload/platformsdk/sdkupdate/

Aleksey

___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


RE: [xmlsec] FW: Free/Destroy versus Memory Leak

2006-05-02 Thread Edward Shallow
The link to the Visual Studio C++ 2003 Toolkit (free) provided to me by
Dmitry (thanks) contains ***NO*** nmake.exe

I had a tough time finding this old one. Any suggestions ?

Ed

-Original Message-
From: Aleksey Sanin [mailto:[EMAIL PROTECTED] 
Sent: May 2, 2006 9:51 PM
To: [EMAIL PROTECTED]
Cc: xmlsec@aleksey.com; [EMAIL PROTECTED]
Subject: Re: [xmlsec] FW: Free/Destroy versus Memory Leak

> C:\XMLSec\xmlsec1-1.2.9\win32>nmake
> 
> Microsoft (R) Program Maintenance Utility   Version 1.50
> Copyright (c) Microsoft Corp 1988-94. All rights reserved.
> 
> makefile(571) : fatal error U1088: invalid separator '::' on inference 
> rule Stop.

The nmake you run is *very* old (version 1.50 from 1994). It is not from
MSVC .NET 2003.


Aleksey


___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


Re: [xmlsec] FW: Free/Destroy versus Memory Leak

2006-05-02 Thread Aleksey Sanin

C:\XMLSec\xmlsec1-1.2.9\win32>nmake

Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

makefile(571) : fatal error U1088: invalid separator '::' on inference rule
Stop.


The nmake you run is *very* old (version 1.50 from 1994). It is not
from MSVC .NET 2003.


Aleksey
___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


RE: [xmlsec] FW: Free/Destroy versus Memory Leak

2006-05-02 Thread Edward Shallow
Hi Aleksey,

This is why I avoid this like the plague ...

As you directed I setup bin, include, and lib sub-dirs of xmlsec_prefix and
copied dependent dirs in from Igor's site

I installed nmake and Visual Studio C++ 2003 (cl.exe) and updated the
ENVIRONMENT variables

I slightly edited mycfg.bat and ran it ... All looks good

I get his when running nmake from the win32 sub-dir ???

Ideas ...

Output follows ...

C:\XMLSec\xmlsec1-1.2.9\win32>nmake

Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

makefile(571) : fatal error U1088: invalid separator '::' on inference rule
Stop.

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Aleksey Sanin
Sent: May 2, 2006 10:44 AM
To: [EMAIL PROTECTED]
Cc: xmlsec@aleksey.com; [EMAIL PROTECTED]
Subject: Re: [xmlsec] FW: Free/Destroy versus Memory Leak


> You do not see it with the sign ? 
I do see memory growth with both sign and verify... but I don't see anything
in Purify.

> Do you think it could be the environment around xmlsec ?  
I highly doubt that.

> Might this not leak on a freshly installed XP machine ?
Same. It *might* depend on Service Pack though but it definitely leaks on
SP2 I have.

> Has the CVS been updated with this patch ? 
Yes.

> Is it in the daily snapshot ? 
I need to update my script to generate snapshots... Unfortunately it is
broken after some changes on GNOME CVS server.

> 
> I will have to wait for Igor to recompile and re-post.
> 
Well, you can try to compile xmlsec yourself... it is very simple:
1) Get libxml2/libxslt binaries from Igor's website. Unpack them somewhere,
say into c:\sdk\ folder so you get something like this:

c:\sdk\
   bin\
   include\
   lib\

2) Get xmlsec sources from CVS.

3) Go to the xmlsec\win32 folder and edit the mycfg.bat file. Main thing to
change is to put the "c:\sdk" path from 1) into XMLSEC_PREFIX variable. Then
adjust other parameters as needed (e.g. check the list of enabled crypto
engines).

4) Run mycfg.bat, check output.

5) Run nmake, check output. Run 'nmake check' to execute xmlsec unit tests.

6) Pickup binaries from xmlsec\win32\binaries folder.



Aleksey


___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


Re: [xmlsec] How to get Certificate from signed xml file

2006-05-02 Thread Aleksey Sanin




Well i find my certificate, but how to export now?


I believe you found the key, not certificate. Look at
KeyData objects in this key.


Aleksey


___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


[xmlsec] How to get Certificate from signed xml file

2006-05-02 Thread Jürgen Heiss
Hi,

How I can get the certificate from a signed xml file and save this vertificate 
as a file on my local machine?

Thanks for any help
___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


Re: [xmlsec] How to get Certificate from signed xml file

2006-05-02 Thread Aleksey Sanin

You can get to signature key, from key you can get access
to "KeyData" objects. Then you need to iterate through
the list and find one for certificate (note, this part
is crypto specific!). Then you can get a handle no native
"crypto" certificate (e.g. for OpenSSL it will be X509*).


Aleksey

Jürgen Heiss wrote:

Hi Aleksey,

Well I have access to the xmlsecDsigCtx, but I didn't find any possiblity to 
get access to the certificate itself or to save the certificate ;o(



-Original Message-
From: Aleksey Sanin [mailto:[EMAIL PROTECTED] 
Sent: Dienstag, 02. Mai 2006 16:45

To: Jürgen Heiss
Cc: Alexandre Kalendarev; xmlsec@aleksey.com
Subject: Re: [xmlsec] How to get Certificate from signed xml file

If you are writing a program in C then you have access to the signature 
certificates through xmlSecDsigCtx data structure. Check the documentation for 
more details.

Aleksey





___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


Re: [xmlsec] How to get Certificate from signed xml file

2006-05-02 Thread Aleksey Sanin

If you are writing a program in C then you have access to
the signature certificates through xmlSecDsigCtx data
structure. Check the documentation for more details.

Aleksey



___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


Re: [xmlsec] FW: Free/Destroy versus Memory Leak

2006-05-02 Thread Aleksey Sanin


You do not see it with the sign ? 

I do see memory growth with both sign and verify... but I don't see
anything in Purify.

Do you think it could be the environment around xmlsec ?  

I highly doubt that.


Might this not leak on a freshly installed XP machine ?

Same. It *might* depend on Service Pack though but it definitely leaks
on SP2 I have.

Has the CVS been updated with this patch ? 

Yes.

Is it in the daily snapshot ? 

I need to update my script to generate snapshots... Unfortunately it is
broken after some changes on GNOME CVS server.



I will have to wait for Igor to recompile and re-post.


Well, you can try to compile xmlsec yourself... it is very simple:
1) Get libxml2/libxslt binaries from Igor's website. Unpack them
somewhere, say into c:\sdk\ folder so you get something like this:

   c:\sdk\
  bin\
  include\
  lib\

2) Get xmlsec sources from CVS.

3) Go to the xmlsec\win32 folder and edit the mycfg.bat file. Main
thing to change is to put the "c:\sdk" path from 1) into XMLSEC_PREFIX
variable. Then adjust other parameters as needed (e.g. check the
list of enabled crypto engines).

4) Run mycfg.bat, check output.

5) Run nmake, check output. Run 'nmake check' to execute xmlsec
unit tests.

6) Pickup binaries from xmlsec\win32\binaries folder.



Aleksey


___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec


RE: [xmlsec] FW: Free/Destroy versus Memory Leak

2006-05-02 Thread Edward Shallow
You do not see it with the sign ? Do you think it could be the environment
around xmlsec ? Might this not leak on a freshly installed XP machine ?

Has the CVS been updated with this patch ? Is it in the daily snapshot ? 

I will have to wait for Igor to recompile and re-post.

Ed  

-Original Message-
From: Aleksey Sanin [mailto:[EMAIL PROTECTED] 
Sent: May 2, 2006 12:17 AM
To: [EMAIL PROTECTED]
Cc: xmlsec@aleksey.com
Subject: Re: [xmlsec] FW: Free/Destroy versus Memory Leak

OK, I believe that the attached patch fixes the memory leak though I don't
see it in Purify. Please, let me know if it works for you or not.

Thank you in advance!
Aleksey



___
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec