summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2012-12-20 17:48:39 +0000
committerAndrew Stitcher <astitcher@apache.org>2012-12-20 17:48:39 +0000
commit833fdab54b0b4f8bd33d40c42865074a7173c618 (patch)
treec4b7205912a0cd209801ff020df26402ff59d641 /qpid/cpp/src
parentd88d95ce9f0873b50aca546aa911c564e71556fb (diff)
downloadqpid-python-833fdab54b0b4f8bd33d40c42865074a7173c618.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@1424607 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/sys/ssl/util.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/qpid/cpp/src/qpid/sys/ssl/util.cpp b/qpid/cpp/src/qpid/sys/ssl/util.cpp
index 3078e894df..de5d638b09 100644
--- a/qpid/cpp/src/qpid/sys/ssl/util.cpp
+++ b/qpid/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)
{