diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2012-12-20 17:48:39 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2012-12-20 17:48:39 +0000 |
| commit | 9b5e57c9e7402a48e3b327de59c840576dce2ebf (patch) | |
| tree | 069757354eb6ad33d46c9bd795c1d57772cc79f3 /cpp | |
| parent | 7156c84f1c6ebc6ad2bfaa9bbbc09f2abf8b295e (diff) | |
| download | qpid-python-9b5e57c9e7402a48e3b327de59c840576dce2ebf.tar.gz | |
NO-JIRA: Stop using boost::filesystem for something that std::fstream can do well enough
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1424607 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
| -rw-r--r-- | cpp/src/qpid/sys/ssl/util.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/cpp/src/qpid/sys/ssl/util.cpp b/cpp/src/qpid/sys/ssl/util.cpp index 3078e894df..de5d638b09 100644 --- a/cpp/src/qpid/sys/ssl/util.cpp +++ b/cpp/src/qpid/sys/ssl/util.cpp @@ -31,8 +31,6 @@ #include <iostream> #include <fstream> -#include <boost/filesystem/operations.hpp> -#include <boost/filesystem/path.hpp> namespace qpid { namespace sys { @@ -82,15 +80,14 @@ SslOptions SslOptions::global; char* readPasswordFromFile(PK11SlotInfo*, PRBool retry, void*) { const std::string& passwordFile = SslOptions::global.certPasswordFile; - if (retry || passwordFile.empty() || !boost::filesystem::exists(passwordFile)) { - return 0; - } else { - std::ifstream file(passwordFile.c_str()); - std::string password; - file >> password; - return PL_strdup(password.c_str()); - } -} + if (retry || passwordFile.empty()) return 0; + std::ifstream file(passwordFile.c_str()); + if (!file) return 0; + + std::string password; + file >> password; + return PL_strdup(password.c_str()); +} void initNSS(const SslOptions& options, bool server) { |
