projects
/
mech_eap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4e20a5e
)
Use unique_ptr if available; else fall back to auto_ptr
author
Dan Breslau
<dbreslau@painless-security.com>
Fri, 28 Oct 2016 20:46:33 +0000
(16:46 -0400)
committer
Dan Breslau
<dbreslau@painless-security.com>
Fri, 28 Oct 2016 20:46:33 +0000
(16:46 -0400)
mech_eap/util_shib.cpp
patch
|
blob
|
history
diff --git
a/mech_eap/util_shib.cpp
b/mech_eap/util_shib.cpp
index
f919fc0
..
875c9a5
100644
(file)
--- a/
mech_eap/util_shib.cpp
+++ b/
mech_eap/util_shib.cpp
@@
-66,6
+66,7
@@
#include <shibresolver/resolver.h>
#include <sstream>
#include <shibresolver/resolver.h>
#include <sstream>
+#include <memory>
using namespace shibsp;
using namespace shibresolver;
using namespace shibsp;
using namespace shibresolver;
@@
-78,6
+79,14
@@
using namespace opensaml;
using namespace xercesc;
#endif
using namespace xercesc;
#endif
+// Use unique_ptr where available; auto_ptr otherwise.
+#if __cplusplus > 199711L
+#define UNIQUE_OR_AUTO_PTR unique_ptr
+#else
+#define UNIQUE_OR_AUTO_PTR auto_ptr
+#endif
+
+
gss_eap_shib_attr_provider::gss_eap_shib_attr_provider(void)
{
m_initialized = false;
gss_eap_shib_attr_provider::gss_eap_shib_attr_provider(void)
{
m_initialized = false;
@@
-123,7
+132,7
@@
gss_eap_shib_attr_provider::initWithGssContext(const gss_eap_attr_ctx *manager,
if (!gss_eap_attr_provider::initWithGssContext(manager, gssCred, gssCtx))
return false;
if (!gss_eap_attr_provider::initWithGssContext(manager, gssCred, gssCtx))
return false;
-
unique_ptr
<ShibbolethResolver> resolver(ShibbolethResolver::create());
+
UNIQUE_OR_AUTO_PTR
<ShibbolethResolver> resolver(ShibbolethResolver::create());
/*
* For now, leave ApplicationID defaulted.
/*
* For now, leave ApplicationID defaulted.