Categories
System Administration

RFC 5105, enum.at Client Toolkit and Xerces 3

I recently got a request for help concerning the generation of ENUM Validation Tokens according to RFC 5105.

In order to check what went wrong, I had to re-install the software I used while writing that RFC. That wasn’t so easy as the upgrade from Xerces 2 to Xerces 3 made a few changes to the XML Signing module necessary:

— xs/XSEC.xs 2007-05-03 15:07:48.000000000 +0200
+++ xs/XSEC.xs 2010-09-29 14:18:13.197703784 +0200
@@ -156,7 +156,7 @@
return XSIGN_FAIL_PRIVKEYREAD;
}

– if (!stricmp(type, “dsa”)) {
+ if (!strcasecmp(type, “dsa”)) {
// Check type is correct
if (pkey->type != EVP_PKEY_DSA) {
STRINIT(error, “DSA Key requested, but OpenSSL loaded something else”);
@@ -355,12 +355,15 @@
XMLCh tempStr[100];
XMLString::transcode(“LS”, tempStr, 99);
DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(tempStr);
– DOMWriter *serializer = ((DOMImplementationLS*)impl)->createDOMWriter();
+ DOMLSSerializer *serializer = ((DOMImplementationLS*)impl)->createLSSerializer();

XMLFormatTarget *fTarget = new MemBufFormatTarget;

+ DOMLSOutput* theOutput = ((DOMImplementationLS*)impl)->createLSOutput();
+ theOutput->setByteStream(fTarget);
+
try {
– serializer->writeNode(fTarget, *doc);
+ serializer->write(doc, theOutput);
}
catch (const XMLException& e) {
STRINIT(error, “DOMWriter XMLException: “);