Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

RE: [Bulk] Re: ErrorsCallback ???: msg#00006

text.xml.xmlsec

Subject: RE: [Bulk] Re: ErrorsCallback ???

PostScript ...

A call to the following works fine after any libxml2 function throwing
an error. I tried it after a failed xmlsec function call and received
nothing (i.e. Python None aka NULL)

Ed



errMsg = self.checkLibxml2Error()

...

def checkLibxml2Error(self):
libxml2 = self.env.libxml2
errMsg = None
errorPtr = libxml2.xmlGetLastError()
if errorPtr != 0:
try:
error = xmlError.from_address(errorPtr) #
set up pointer to a libxml2 xmlError structure
errMsg = 'level ' + str(error.level) + ' error in domain ' +
str(error.domain) + ' code ' + str(error.code) + error.message, ' at line '
+ str(error.line)
except:
errMsg = 'Fatal error in xmlGetLastError function'
return errMsg



-----Original Message-----
From: Edward Shallow [mailto:ed.shallow@xxxxxxxxxx]
Sent: January 5, 2006 11:02 PM
To: 'Aleksey Sanin'
Subject: RE: [Bulk] Re: [xmlsec] ErrorsCallback ???

Re 2, Yes that sounds good !!! I'll try the xmlGetLastError support for
xmlsec as well. I am already using it for libxml2 parsing errors.

Re 1, Yes I am using Python with the ctypes module to directly access
libxml2 and xmlsec. I can set the breakpoint on Linux but my problem is
mscrypto and on Windows I am using Igor's binaries. I have never compiled
under Windows, don't have the patience or the software.

I doubt there is a coding problem as everything is coming back for openssl
and sometimes is coming back for mscrypto (Verify calls)

Ed

-----Original Message-----
From: xmlsec-bounces@xxxxxxxxxxx [mailto:xmlsec-bounces@xxxxxxxxxxx] On
Behalf Of Aleksey Sanin
Sent: January 5, 2006 7:51 PM
To: ed.shallow@xxxxxxxxxx
Cc: xmlsec@xxxxxxxxxxx
Subject: [Bulk] Re: [xmlsec] ErrorsCallback ???

1) Are you using xmlsec directly or via python? If you have C/C++ app,
simply set a breakpoint in the error callback and then trace it back to the
error origin. You'll see the exact place where NULL shows up.

2) The default callback sets the reported error in to libxml2 thus you can
use xmlGetLastError() directly. If you have a custom callback then you can
do similar thing yourself.

Aleksey


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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation