summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp31
1 files changed, 25 insertions, 6 deletions
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp
index 088255970f4..e3c6c3c2d38 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_CredentialsAcquirer.cpp
@@ -21,12 +21,27 @@ ACE_RCSID (SSLIOP,
// -------------------------------------------------------
+#if (defined (TAO_HAS_VERSIONED_NAMESPACE) \
+ && TAO_HAS_VERSIONED_NAMESPACE == 1) \
+ && !(defined (_MSC_VER) && _MSC_VER <= 1200)
+// MSVC++ 6's preprocessor can't handle macro expansions required by
+// the versioned namespace support. *sigh*
+
+# define TAO_SSLIOP_PASSWORD_CALLBACK_NAME ACE_PREPROC_CONCATENATE(TAO_VERSIONED_NAMESPACE_NAME, _TAO_SSLIOP_password_callback)
+
+#else
+
+# define TAO_SSLIOP_PASSWORD_CALLBACK_NAME TAO_SSLIOP_password_callback
+
+#endif /* TAO_HAS_VERSIONED_NAMESPACE == 1 */
+
+
extern "C"
int
-TAO_SSLIOP_password_callback (char *buf,
- int size,
- int /* rwflag */,
- void *userdata)
+TAO_SSLIOP_PASSWORD_CALLBACK_NAME (char *buf,
+ int size,
+ int /* rwflag */,
+ void *userdata)
{
// @@ I'm probably over complicating this implementation, but that's
// what you get when you try to be overly efficient. :-)
@@ -66,6 +81,8 @@ TAO_SSLIOP_password_callback (char *buf,
// -------------------------------------------------------
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
TAO::SSLIOP::CredentialsAcquirer::CredentialsAcquirer (
TAO::SL3::CredentialsCurator_ptr curator,
const CORBA::Any & acquisition_arguments)
@@ -286,7 +303,7 @@ TAO::SSLIOP::CredentialsAcquirer::make_X509 (const ::SSLIOP::File &certificate)
// it to OpenSSL's internal X.509 format.
x = PEM_read_X509 (fp,
0,
- TAO_SSLIOP_password_callback,
+ TAO_SSLIOP_PASSWORD_CALLBACK_NAME,
const_cast<char *> (password));
}
@@ -364,7 +381,7 @@ TAO::SSLIOP::CredentialsAcquirer::make_EVP_PKEY (const ::SSLIOP::File &key)
// OpenSSL's internal private key format.
evp = PEM_read_PrivateKey (fp,
0,
- TAO_SSLIOP_password_callback,
+ TAO_SSLIOP_PASSWORD_CALLBACK_NAME,
const_cast<char *> (password));
}
@@ -375,3 +392,5 @@ TAO::SSLIOP::CredentialsAcquirer::make_EVP_PKEY (const ::SSLIOP::File &key)
return evp;
}
+
+TAO_END_VERSIONED_NAMESPACE_DECL