diff options
Diffstat (limited to 'cpp/src/Ice/OpenSSLJanitors.cpp')
-rw-r--r-- | cpp/src/Ice/OpenSSLJanitors.cpp | 284 |
1 files changed, 142 insertions, 142 deletions
diff --git a/cpp/src/Ice/OpenSSLJanitors.cpp b/cpp/src/Ice/OpenSSLJanitors.cpp index 197b5c6dedd..f28564789b2 100644 --- a/cpp/src/Ice/OpenSSLJanitors.cpp +++ b/cpp/src/Ice/OpenSSLJanitors.cpp @@ -1,142 +1,142 @@ -// **********************************************************************
-//
-// Copyright (c) 2001
-// MutableRealms, Inc.
-// Huntsville, AL, USA
-//
-// All Rights Reserved
-//
-// **********************************************************************
-
-#include <Ice/OpenSSLJanitors.h>
-
-IceSSL::OpenSSL::RSAJanitor::RSAJanitor(RSA* rsa) :
- _rsa(rsa)
-{
- assert(_rsa != 0);
-}
-
-IceSSL::OpenSSL::RSAJanitor::~RSAJanitor()
-{
- if (_rsa)
- {
- RSA_free(_rsa);
- }
-}
-
-void
-IceSSL::OpenSSL::RSAJanitor::clear()
-{
- _rsa = 0;
-}
-
-RSA*
-IceSSL::OpenSSL::RSAJanitor::get() const
-{
- return _rsa;
-}
-
-IceSSL::OpenSSL::EVP_PKEYJanitor::EVP_PKEYJanitor(EVP_PKEY* evp_pkey) :
- _evp_pkey(evp_pkey)
-{
- assert(_evp_pkey != 0);
-}
-
-IceSSL::OpenSSL::EVP_PKEYJanitor::~EVP_PKEYJanitor()
-{
- if (_evp_pkey)
- {
- EVP_PKEY_free(_evp_pkey);
- }
-}
-
-void
-IceSSL::OpenSSL::EVP_PKEYJanitor::clear()
-{
- _evp_pkey = 0;
-}
-
-EVP_PKEY*
-IceSSL::OpenSSL::EVP_PKEYJanitor::get() const
-{
- return _evp_pkey;
-}
-
-IceSSL::OpenSSL::X509_REQJanitor::X509_REQJanitor(X509_REQ* x509_req) :
- _x509_req(x509_req)
-{
- assert(_x509_req != 0);
-}
-
-IceSSL::OpenSSL::X509_REQJanitor::~X509_REQJanitor()
-{
- if (_x509_req)
- {
- X509_REQ_free(_x509_req);
- }
-}
-
-void
-IceSSL::OpenSSL::X509_REQJanitor::clear()
-{
- _x509_req = 0;
-}
-
-X509_REQ*
-IceSSL::OpenSSL::X509_REQJanitor::get() const
-{
- return _x509_req;
-}
-
-IceSSL::OpenSSL::X509Janitor::X509Janitor(X509* x509) :
- _x509(x509)
-{
- assert(_x509 != 0);
-}
-
-IceSSL::OpenSSL::X509Janitor::~X509Janitor()
-{
- if (_x509)
- {
- X509_free(_x509);
- }
-}
-
-void
-IceSSL::OpenSSL::X509Janitor::clear()
-{
- _x509 = 0;
-}
-
-X509*
-IceSSL::OpenSSL::X509Janitor::get() const
-{
- return _x509;
-}
-
-IceSSL::OpenSSL::BIOJanitor::BIOJanitor(BIO* bio) :
- _bio(bio)
-{
- assert(_bio != 0);
-}
-
-IceSSL::OpenSSL::BIOJanitor::~BIOJanitor()
-{
- if (_bio)
- {
- BIO_free(_bio);
- }
-}
-
-void
-IceSSL::OpenSSL::BIOJanitor::clear()
-{
- _bio = 0;
-}
-
-BIO*
-IceSSL::OpenSSL::BIOJanitor::get() const
-{
- return _bio;
-}
-
+// ********************************************************************** +// +// Copyright (c) 2001 +// MutableRealms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <Ice/OpenSSLJanitors.h> + +IceSSL::OpenSSL::RSAJanitor::RSAJanitor(RSA* rsa) : + _rsa(rsa) +{ + assert(_rsa != 0); +} + +IceSSL::OpenSSL::RSAJanitor::~RSAJanitor() +{ + if (_rsa) + { + RSA_free(_rsa); + } +} + +void +IceSSL::OpenSSL::RSAJanitor::clear() +{ + _rsa = 0; +} + +RSA* +IceSSL::OpenSSL::RSAJanitor::get() const +{ + return _rsa; +} + +IceSSL::OpenSSL::EVP_PKEYJanitor::EVP_PKEYJanitor(EVP_PKEY* evp_pkey) : + _evp_pkey(evp_pkey) +{ + assert(_evp_pkey != 0); +} + +IceSSL::OpenSSL::EVP_PKEYJanitor::~EVP_PKEYJanitor() +{ + if (_evp_pkey) + { + EVP_PKEY_free(_evp_pkey); + } +} + +void +IceSSL::OpenSSL::EVP_PKEYJanitor::clear() +{ + _evp_pkey = 0; +} + +EVP_PKEY* +IceSSL::OpenSSL::EVP_PKEYJanitor::get() const +{ + return _evp_pkey; +} + +IceSSL::OpenSSL::X509_REQJanitor::X509_REQJanitor(X509_REQ* x509_req) : + _x509_req(x509_req) +{ + assert(_x509_req != 0); +} + +IceSSL::OpenSSL::X509_REQJanitor::~X509_REQJanitor() +{ + if (_x509_req) + { + X509_REQ_free(_x509_req); + } +} + +void +IceSSL::OpenSSL::X509_REQJanitor::clear() +{ + _x509_req = 0; +} + +X509_REQ* +IceSSL::OpenSSL::X509_REQJanitor::get() const +{ + return _x509_req; +} + +IceSSL::OpenSSL::X509Janitor::X509Janitor(X509* x509) : + _x509(x509) +{ + assert(_x509 != 0); +} + +IceSSL::OpenSSL::X509Janitor::~X509Janitor() +{ + if (_x509) + { + X509_free(_x509); + } +} + +void +IceSSL::OpenSSL::X509Janitor::clear() +{ + _x509 = 0; +} + +X509* +IceSSL::OpenSSL::X509Janitor::get() const +{ + return _x509; +} + +IceSSL::OpenSSL::BIOJanitor::BIOJanitor(BIO* bio) : + _bio(bio) +{ + assert(_bio != 0); +} + +IceSSL::OpenSSL::BIOJanitor::~BIOJanitor() +{ + if (_bio) + { + BIO_free(_bio); + } +} + +void +IceSSL::OpenSSL::BIOJanitor::clear() +{ + _bio = 0; +} + +BIO* +IceSSL::OpenSSL::BIOJanitor::get() const +{ + return _bio; +} + |