Handle empty Key elements.
authorcantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Fri, 25 May 2007 05:47:11 +0000 (05:47 +0000)
committercantor <cantor@de75baf8-a10c-0410-a50a-987c0e22f00f>
Fri, 25 May 2007 05:47:11 +0000 (05:47 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/trunk@336 de75baf8-a10c-0410-a50a-987c0e22f00f

xmltooling/security/impl/FilesystemCredentialResolver.cpp

index 12f4395..efc7436 100644 (file)
@@ -610,7 +610,7 @@ void FilesystemCredentialResolver::attach(SSL_CTX* ctx) const
 
 void FilesystemCredential::addKeyNames(const DOMElement* e)
 {
-    e = XMLHelper::getFirstChildElement(e, Name);
+    e = e ? XMLHelper::getFirstChildElement(e, Name) : NULL;
     while (e) {
         if (e->hasChildNodes()) {
             auto_ptr_char n(e->getFirstChild()->getNodeValue());