[haiku-commits] haiku: hrev46911 - src/kits/network/libnetapi headers/os/net

  • From: julian.harnath@xxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 22 Feb 2014 14:52:20 +0100 (CET)

hrev46911 adds 2 changesets to branch 'master'
old head: c2d994b00e6950a03cf4792861146b06d5cbc013
new head: d10ecc2c41869f11dc7e5fa25f78fdeab02a7505
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=d10ecc2+%5Ec2d994b

----------------------------------------------------------------------------

dad4976: Disallow copy-construction of BCertificate.
  
  * Prevents accidential creation of multiple instances with
    ownership of same fPrivate.

d10ecc2: Style fix: add parameter name
  
  * As pointed out by Axel.

                          [ Julian Harnath <julian.harnath@xxxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

3 files changed, 9 insertions(+), 3 deletions(-)
headers/os/net/Certificate.h                | 3 +++
headers/os/net/SecureSocket.h               | 3 ++-
src/kits/network/libnetapi/SecureSocket.cpp | 6 ++++--

############################################################################

Commit:      dad49763d8c3e52c572b1aa15a3c3c7280e7179a
URL:         http://cgit.haiku-os.org/haiku/commit/?id=dad4976
Author:      Julian Harnath <julian.harnath@xxxxxxxxxxxxxx>
Date:        Sat Feb 22 10:59:04 2014 UTC

Disallow copy-construction of BCertificate.

* Prevents accidential creation of multiple instances with
  ownership of same fPrivate.

----------------------------------------------------------------------------

diff --git a/headers/os/net/Certificate.h b/headers/os/net/Certificate.h
index 120541a..003c641 100644
--- a/headers/os/net/Certificate.h
+++ b/headers/os/net/Certificate.h
@@ -26,6 +26,9 @@ private:
        class Private;
                                BCertificate(Private* data);
 
+                               BCertificate(const BCertificate& other);
+                                       // copy-construction not allowed
+
        Private*        fPrivate;
 };
 

############################################################################

Revision:    hrev46911
Commit:      d10ecc2c41869f11dc7e5fa25f78fdeab02a7505
URL:         http://cgit.haiku-os.org/haiku/commit/?id=d10ecc2
Author:      Julian Harnath <julian.harnath@xxxxxxxxxxxxxx>
Date:        Sat Feb 22 13:49:57 2014 UTC

Style fix: add parameter name

* As pointed out by Axel.

----------------------------------------------------------------------------

diff --git a/headers/os/net/SecureSocket.h b/headers/os/net/SecureSocket.h
index b65464f..5b54ed4 100644
--- a/headers/os/net/SecureSocket.h
+++ b/headers/os/net/SecureSocket.h
@@ -20,7 +20,8 @@ public:
                                                                
BSecureSocket(const BSecureSocket& other);
        virtual                                         ~BSecureSocket();
 
-       virtual bool                            
CertificateVerificationFailed(BCertificate&);
+       virtual bool                            
CertificateVerificationFailed(BCertificate&
+                                                                       
certificate);
 
        // BSocket implementation
 
diff --git a/src/kits/network/libnetapi/SecureSocket.cpp 
b/src/kits/network/libnetapi/SecureSocket.cpp
index 8d5cdbc..9373026 100644
--- a/src/kits/network/libnetapi/SecureSocket.cpp
+++ b/src/kits/network/libnetapi/SecureSocket.cpp
@@ -286,11 +286,12 @@ BSecureSocket::WaitForReadable(bigtime_t timeout) const
 
 
 bool
-BSecureSocket::CertificateVerificationFailed(BCertificate&)
+BSecureSocket::CertificateVerificationFailed(BCertificate& certificate)
 {
        // Until apps actually make use of the certificate API, let's keep the 
old
        // behavior and accept all connections, even if the certificate 
validation
        // didn't work.
+       (void)certificate;
        return true;
 }
 
@@ -358,8 +359,9 @@ BSecureSocket::~BSecureSocket()
 
 
 bool
-BSecureSocket::CertificateVerificationFailed(BCertificate&)
+BSecureSocket::CertificateVerificationFailed(BCertificate& certificate)
 {
+       (void)certificate;
        return false;
 }
 


Other related posts: