X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltooling%2Fsecurity%2Fimpl%2FFilesystemCredentialResolver.cpp;h=0c0bbffc156ca14cfcc70de837f18d3cc79b0319;hb=b3887773bcb867e8fb7cad376279f2a9ee39dda2;hp=65da6e0ac85b4e9b84d76c1e4c1f3f7faea59424;hpb=1b732b61275f68abf70c905fc54a57b729ea95da;p=shibboleth%2Fxmltooling.git diff --git a/xmltooling/security/impl/FilesystemCredentialResolver.cpp b/xmltooling/security/impl/FilesystemCredentialResolver.cpp index 65da6e0..0c0bbff 100644 --- a/xmltooling/security/impl/FilesystemCredentialResolver.cpp +++ b/xmltooling/security/impl/FilesystemCredentialResolver.cpp @@ -73,8 +73,7 @@ namespace xmltooling { FilesystemCredential( FilesystemCredentialResolver* resolver, XSECCryptoKey* key, const std::vector& xseccerts, XSECCryptoX509CRL* crl=NULL ) : BasicX509Credential(key, xseccerts, crl), m_resolver(resolver), m_usage(UNSPECIFIED_CREDENTIAL) { - if (!m_xseccerts.empty()) - extractNames(m_xseccerts.front(), m_keyNames); + extract(); initKeyInfo(); } virtual ~FilesystemCredential() { @@ -166,6 +165,7 @@ namespace xmltooling { static const XMLCh format[] = UNICODE_LITERAL_6(f,o,r,m,a,t); static const XMLCh Key[] = UNICODE_LITERAL_3(K,e,y); static const XMLCh _key[] = UNICODE_LITERAL_3(k,e,y); + static const XMLCh keyName[] = UNICODE_LITERAL_7(k,e,y,N,a,m,e); static const XMLCh Name[] = UNICODE_LITERAL_4(N,a,m,e); static const XMLCh password[] = UNICODE_LITERAL_8(p,a,s,s,w,o,r,d); static const XMLCh Path[] = UNICODE_LITERAL_4(P,a,t,h); @@ -192,6 +192,11 @@ FilesystemCredentialResolver::FilesystemCredentialResolver(const DOMElement* e) path->appendChild(e->getOwnerDocument()->createTextNode(e->getAttributeNS(NULL,_key))); if (e->hasAttributeNS(NULL,password)) child->setAttributeNS(NULL,password,e->getAttributeNS(NULL,password)); + if (e->hasAttributeNS(NULL,keyName)) { + path = e->getOwnerDocument()->createElementNS(NULL,Name); + child->appendChild(path); + path->appendChild(e->getOwnerDocument()->createTextNode(e->getAttributeNS(NULL,keyName))); + } } if (e->hasAttributeNS(NULL,_certificate)) { child = e->getOwnerDocument()->createElementNS(NULL,Certificate);