Esempio n. 1
0
        internal HttpClientCertificate(HttpWorkerRequest hwr)
        {
#if NET_2_0
            // we don't check hwr for null so we end up throwing a
            // NullReferenceException just like MS implementation
            // if the public ctor for HttpRequest is used
#else
            if (hwr == null)
            {
                throw new ArgumentNullException("hwr");
            }
#endif
            this.hwr = hwr;
            flags    = GetIntNoPresense("CERT_FLAGS");
            if (IsPresent)
            {
                from  = hwr.GetClientCertificateValidFrom();
                until = hwr.GetClientCertificateValidUntil();
            }
            else
            {
                from  = DateTime.Now;
                until = from;
            }
        }
Esempio n. 2
0
		internal HttpClientCertificate (HttpWorkerRequest hwr)
		{
			// we don't check hwr for null so we end up throwing a 
			// NullReferenceException just like MS implementation
			// if the public ctor for HttpRequest is used
			this.hwr = hwr;
			flags = GetIntNoPresense ("CERT_FLAGS");
			if (IsPresent) {
				from = hwr.GetClientCertificateValidFrom ();
				until = hwr.GetClientCertificateValidUntil ();
			} else {
				from = DateTime.Now;
				until = from;
			}
		}