From: cantor Date: Wed, 30 Jan 2008 17:59:41 +0000 (+0000) Subject: Need to stat resolved path. X-Git-Tag: 1.4.1~366 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fxmltooling.git;a=commitdiff_plain;h=1b732b61275f68abf70c905fc54a57b729ea95da Need to stat resolved path. git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/trunk@462 de75baf8-a10c-0410-a50a-987c0e22f00f --- diff --git a/xmltooling/security/impl/FilesystemCredentialResolver.cpp b/xmltooling/security/impl/FilesystemCredentialResolver.cpp index b555291..65da6e0 100644 --- a/xmltooling/security/impl/FilesystemCredentialResolver.cpp +++ b/xmltooling/security/impl/FilesystemCredentialResolver.cpp @@ -235,14 +235,14 @@ FilesystemCredentialResolver::FilesystemCredentialResolver(const DOMElement* e) XMLToolingConfig::getConfig().getPathResolver()->resolve(m_keypath, PathResolver::XMLTOOLING_CFG_FILE); #ifdef WIN32 struct _stat stat_buf; - if (_stat(kpath.get(), &stat_buf) != 0) + if (_stat(m_keypath.c_str(), &stat_buf) != 0) #else struct stat stat_buf; - if (stat(kpath.get(), &stat_buf) != 0) + if (stat(m_keypath.c_str(), &stat_buf) != 0) #endif { - log.error("key file (%s) can't be opened", kpath.get()); - throw XMLSecurityException("FilesystemCredentialResolver can't access key file ($1)",params(1,kpath.get())); + log.error("key file (%s) can't be opened", m_keypath.c_str()); + throw XMLSecurityException("FilesystemCredentialResolver can't access key file ($1)",params(1,m_keypath.c_str())); } } else { @@ -296,14 +296,14 @@ FilesystemCredentialResolver::FilesystemCredentialResolver(const DOMElement* e) XMLToolingConfig::getConfig().getPathResolver()->resolve(m_crlpath, PathResolver::XMLTOOLING_CFG_FILE); #ifdef WIN32 struct _stat stat_buf; - if (_stat(kpath.get(), &stat_buf) != 0) + if (_stat(m_crlpath.c_str(), &stat_buf) != 0) #else struct stat stat_buf; - if (stat(kpath.get(), &stat_buf) != 0) + if (stat(m_crlpath.c_str(), &stat_buf) != 0) #endif { - log.error("CRL file (%s) can't be opened", kpath.get()); - throw XMLSecurityException("FilesystemCredentialResolver can't access CRL file ($1)",params(1,kpath.get())); + log.error("CRL file (%s) can't be opened", m_crlpath.c_str()); + throw XMLSecurityException("FilesystemCredentialResolver can't access CRL file ($1)",params(1,m_crlpath.c_str())); } } else {