]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_cdsa_utilities/lib/cssmcred.cpp
Security-59754.80.3.tar.gz
[apple/security.git] / OSX / libsecurity_cdsa_utilities / lib / cssmcred.cpp
index 5f877bbccda87756bc048a5deac4826d67dddbea..ee66a633f00965a28a16fe0a763deef7121871e8 100644 (file)
 
 namespace Security {
 
 
 namespace Security {
 
-
-//
-// The null credential constant.
-//
-static const CSSM_ACCESS_CREDENTIALS null_credentials = { "" };        // and more nulls
-#if BUG_GCC
-const AccessCredentials &AccessCredentials::null =
-    *static_cast<const AccessCredentials *>(&null_credentials);
-#else
-const AccessCredentials &AccessCredentials::null =
-    static_cast<const AccessCredentials &>(null_credentials);
-#endif
-
-
 //
 // Scan a SampleGroup for samples with a given CSSM_SAMPLE_TYPE.
 // Collect all matching samples into a list (which is cleared to begin with).
 //
 // Scan a SampleGroup for samples with a given CSSM_SAMPLE_TYPE.
 // Collect all matching samples into a list (which is cleared to begin with).
@@ -67,6 +53,12 @@ bool SampleGroup::collect(CSSM_SAMPLE_TYPE sampleType, list<CssmSample> &matches
 //
 // AccessCredentials
 //
 //
 // AccessCredentials
 //
+const AccessCredentials& AccessCredentials::null_credential()
+{
+    static const CSSM_ACCESS_CREDENTIALS null_credentials = { "" };    // and more nulls
+    return AccessCredentials::overlay(null_credentials);
+}
+
 void AccessCredentials::tag(const char *tagString)
 {
        if (tagString == NULL)
 void AccessCredentials::tag(const char *tagString)
 {
        if (tagString == NULL)