Example #1
0
        /// <summary>
        /// Static constructor so that we can load the certificate map from EWR prior to usage.
        /// </summary>
        static CertificateStore()
        {
            s_ewrCertLookup = ExtendedWeakReference.RecoverOrCreate(typeof(_CertLookup_), (uint)0, ExtendedWeakReference.c_SurvivePowerdown);

            if (s_ewrCertLookup.Target == null)
            {
                s_ewrCertLookup.Priority = (int)ExtendedWeakReference.PriorityLevel.Critical;

                s_personalCertData = new _CertLookup_();

                s_ewrCertLookup.Target = s_personalCertData;
            }
            else
            {
                s_personalCertData = s_ewrCertLookup.Target as _CertLookup_;
            }

            s_ewrCALookup = ExtendedWeakReference.RecoverOrCreate(typeof(_CertLookup_), (uint)1, ExtendedWeakReference.c_SurvivePowerdown);

            if (s_ewrCALookup.Target == null)
            {
                s_ewrCALookup.Priority = (int)ExtendedWeakReference.PriorityLevel.Critical;

                s_CACertData = new _CALookup_();

                s_ewrCALookup.Target = s_CACertData;
            }
            else
            {
                s_CACertData = s_ewrCALookup.Target as _CALookup_;
            }
        }
Example #2
0
 public static void ClearCACertificates()
 {
     s_CACertData         = new _CALookup_();
     s_ewrCALookup.Target = s_CACertData;
 }
Example #3
0
 public static void ClearCACertificates()
 {
     s_CACertData = new _CALookup_();
     s_ewrCALookup.Target = s_CACertData;
 }
Example #4
0
        /// <summary>
        /// Static constructor so that we can load the certificate map from EWR prior to usage.
        /// </summary>
        static CertificateStore()
        {
            s_ewrCertLookup = ExtendedWeakReference.RecoverOrCreate(typeof(_CertLookup_), (uint)0, ExtendedWeakReference.c_SurvivePowerdown);

            if (s_ewrCertLookup.Target == null)
            {
                s_ewrCertLookup.Priority = (int)ExtendedWeakReference.PriorityLevel.Critical;

                s_personalCertData = new _CertLookup_();

                s_ewrCertLookup.Target = s_personalCertData;
            }
            else
            {
                s_personalCertData = s_ewrCertLookup.Target as _CertLookup_;
            }

            s_ewrCALookup = ExtendedWeakReference.RecoverOrCreate(typeof(_CertLookup_), (uint)1, ExtendedWeakReference.c_SurvivePowerdown);

            if (s_ewrCALookup.Target == null)
            {
                s_ewrCALookup.Priority = (int)ExtendedWeakReference.PriorityLevel.Critical;

                s_CACertData = new _CALookup_();

                s_ewrCALookup.Target = s_CACertData;
            }
            else
            {
                s_CACertData = s_ewrCALookup.Target as _CALookup_;
            }

        }