summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2016-03-08 21:28:16 +0000
committerGordon Sim <gsim@apache.org>2016-03-08 21:28:16 +0000
commit159033fb800b1316170e19c91df40e9a89e7699c (patch)
tree9beab566f597368d1d7428b1db685414a94a38bf
parent8925ce4cb7e9d6e8ad2cefd73f63179646ce1670 (diff)
downloadqpid-python-159033fb800b1316170e19c91df40e9a89e7699c.tar.gz
QPID-7130: [PATCH 4/5] Added getPeerAuthId as an alias for getClientAuthId since
the function returns client auth id on server side and server auth id on client side so the new name is more appropriate. Patch from: Domen Vrankar <domen.vrankar@halcom.si> git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1734162 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/sys/Socket.h1
-rw-r--r--qpid/cpp/src/qpid/sys/posix/BSDSocket.cpp5
-rw-r--r--qpid/cpp/src/qpid/sys/posix/BSDSocket.h1
-rw-r--r--qpid/cpp/src/qpid/sys/ssl/SslSocket.cpp5
-rw-r--r--qpid/cpp/src/qpid/sys/ssl/SslSocket.h1
-rw-r--r--qpid/cpp/src/qpid/sys/windows/WinSocket.cpp5
-rw-r--r--qpid/cpp/src/qpid/sys/windows/WinSocket.h1
7 files changed, 19 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/sys/Socket.h b/qpid/cpp/src/qpid/sys/Socket.h
index ed2c399c98..2cbf0e84c9 100644
--- a/qpid/cpp/src/qpid/sys/Socket.h
+++ b/qpid/cpp/src/qpid/sys/Socket.h
@@ -110,6 +110,7 @@ public:
/* Transport security related: */
virtual int getKeyLen() const = 0;
virtual std::string getClientAuthId() const = 0;
+ virtual std::string getPeerAuthId() const = 0;
virtual std::string getLocalAuthId() const = 0;
};
diff --git a/qpid/cpp/src/qpid/sys/posix/BSDSocket.cpp b/qpid/cpp/src/qpid/sys/posix/BSDSocket.cpp
index 39eebc438e..15c2b30242 100644
--- a/qpid/cpp/src/qpid/sys/posix/BSDSocket.cpp
+++ b/qpid/cpp/src/qpid/sys/posix/BSDSocket.cpp
@@ -276,6 +276,11 @@ std::string BSDSocket::getClientAuthId() const
return std::string();
}
+std::string BSDSocket::getPeerAuthId() const
+{
+ return std::string();
+}
+
std::string BSDSocket::getLocalAuthId() const
{
return "dummy";
diff --git a/qpid/cpp/src/qpid/sys/posix/BSDSocket.h b/qpid/cpp/src/qpid/sys/posix/BSDSocket.h
index 43aae98864..b0d1f1c9c8 100644
--- a/qpid/cpp/src/qpid/sys/posix/BSDSocket.h
+++ b/qpid/cpp/src/qpid/sys/posix/BSDSocket.h
@@ -72,6 +72,7 @@ public:
QPID_COMMON_EXTERN virtual int getKeyLen() const;
QPID_COMMON_EXTERN virtual std::string getClientAuthId() const;
+ QPID_COMMON_EXTERN virtual std::string getPeerAuthId() const;
QPID_COMMON_EXTERN virtual std::string getLocalAuthId() const;
protected:
diff --git a/qpid/cpp/src/qpid/sys/ssl/SslSocket.cpp b/qpid/cpp/src/qpid/sys/ssl/SslSocket.cpp
index 16909f906c..815e2be8e4 100644
--- a/qpid/cpp/src/qpid/sys/ssl/SslSocket.cpp
+++ b/qpid/cpp/src/qpid/sys/ssl/SslSocket.cpp
@@ -401,6 +401,11 @@ std::string SslSocket::getClientAuthId() const
return getAuthId(PeerCertificateGetter(nssSocket));
}
+std::string SslSocket::getPeerAuthId() const
+{
+ return getAuthId(PeerCertificateGetter(nssSocket));
+}
+
std::string SslSocket::getLocalAuthId() const
{
return getAuthId(LocalCertificateGetter(nssSocket));
diff --git a/qpid/cpp/src/qpid/sys/ssl/SslSocket.h b/qpid/cpp/src/qpid/sys/ssl/SslSocket.h
index a18efdd15a..d8f9f43605 100644
--- a/qpid/cpp/src/qpid/sys/ssl/SslSocket.h
+++ b/qpid/cpp/src/qpid/sys/ssl/SslSocket.h
@@ -68,6 +68,7 @@ public:
int getKeyLen() const;
std::string getClientAuthId() const;
+ std::string getPeerAuthId() const;
std::string getLocalAuthId() const;
protected:
diff --git a/qpid/cpp/src/qpid/sys/windows/WinSocket.cpp b/qpid/cpp/src/qpid/sys/windows/WinSocket.cpp
index a68c8978b1..601accd938 100644
--- a/qpid/cpp/src/qpid/sys/windows/WinSocket.cpp
+++ b/qpid/cpp/src/qpid/sys/windows/WinSocket.cpp
@@ -278,6 +278,11 @@ std::string WinSocket::getClientAuthId() const
return std::string();
}
+std::string WinSocket::getPeerAuthId() const
+{
+ return std::string();
+}
+
std::string WinSocket::getLocalAuthId() const
{
return "dummy";
diff --git a/qpid/cpp/src/qpid/sys/windows/WinSocket.h b/qpid/cpp/src/qpid/sys/windows/WinSocket.h
index 05cbd45911..c8c59d5160 100644
--- a/qpid/cpp/src/qpid/sys/windows/WinSocket.h
+++ b/qpid/cpp/src/qpid/sys/windows/WinSocket.h
@@ -100,6 +100,7 @@ public:
QPID_COMMON_EXTERN int getKeyLen() const;
QPID_COMMON_EXTERN std::string getClientAuthId() const;
+ QPID_COMMON_EXTERN std::string getPeerAuthId() const;
QPID_COMMON_EXTERN std::string getLocalAuthId() const;
protected: