public virtual OcspStatusRequest GetOcspStatusRequest()
 {
     if (!CertificateStatusRequest.IsCorrectType(1, this.mRequest))
     {
         throw new InvalidOperationException("'request' is not an OCSPStatusRequest");
     }
     return((OcspStatusRequest)this.mRequest);
 }
 public CertificateStatusRequest(byte statusType, object request)
 {
     if (!CertificateStatusRequest.IsCorrectType(statusType, request))
     {
         throw new ArgumentException("not an instance of the correct type", "request");
     }
     this.mStatusType = statusType;
     this.mRequest    = request;
 }
        public static byte[] CreateStatusRequestExtension(CertificateStatusRequest statusRequest)
        {
            if (statusRequest == null)
            {
                throw new TlsFatalAlert(80);
            }
            MemoryStream memoryStream = new MemoryStream();

            statusRequest.Encode(memoryStream);
            return(memoryStream.ToArray());
        }
        public static CertificateStatusRequest ReadStatusRequestExtension(byte[] extensionData)
        {
            if (extensionData == null)
            {
                throw new ArgumentNullException("extensionData");
            }
            MemoryStream             memoryStream = new MemoryStream(extensionData, writable: false);
            CertificateStatusRequest result       = CertificateStatusRequest.Parse(memoryStream);

            TlsProtocol.AssertEmpty(memoryStream);
            return(result);
        }
Example #5
0
        /// <exception cref="IOException"></exception>
        public static byte[] CreateStatusRequestExtension(CertificateStatusRequest statusRequest)
        {
            if (statusRequest == null)
            {
                throw new TlsFatalAlert(AlertDescription.internal_error);
            }

            MemoryStream buf = new MemoryStream();

            statusRequest.Encode(buf);

            return(buf.ToArray());
        }
Example #6
0
        public static byte[] CreateStatusRequestExtension(CertificateStatusRequest statusRequest)
        {
            //IL_000b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0011: Expected O, but got Unknown
            if (statusRequest == null)
            {
                throw new TlsFatalAlert(80);
            }
            MemoryStream val = new MemoryStream();

            statusRequest.Encode((Stream)(object)val);
            return(val.ToArray());
        }
Example #7
0
        /// <exception cref="IOException"></exception>
        public static CertificateStatusRequest ReadStatusRequestExtension(byte[] extensionData)
        {
            if (extensionData == null)
            {
                throw new ArgumentNullException("extensionData");
            }

            MemoryStream buf = new MemoryStream(extensionData, false);

            CertificateStatusRequest statusRequest = CertificateStatusRequest.Parse(buf);

            TlsProtocol.AssertEmpty(buf);

            return(statusRequest);
        }
Example #8
0
        public static CertificateStatusRequest ReadStatusRequestExtension(byte[] extensionData)
        {
            //IL_0008: Unknown result type (might be due to invalid IL or missing references)
            //IL_0010: Unknown result type (might be due to invalid IL or missing references)
            //IL_0016: Expected O, but got Unknown
            if (extensionData == null)
            {
                throw new ArgumentNullException("extensionData");
            }
            MemoryStream             val    = new MemoryStream(extensionData, false);
            CertificateStatusRequest result = CertificateStatusRequest.Parse((Stream)(object)val);

            TlsProtocol.AssertEmpty(val);
            return(result);
        }
Example #9
0
 /// <exception cref="IOException"></exception>
 public static void AddStatusRequestExtension(IDictionary extensions, CertificateStatusRequest statusRequest)
 {
     extensions[ExtensionType.status_request] = CreateStatusRequestExtension(statusRequest);
 }
Example #10
0
 public static void AddStatusRequestExtension(IDictionary extensions, CertificateStatusRequest statusRequest)
 {
     extensions.set_Item((object)5, (object)CreateStatusRequestExtension(statusRequest));
 }
 /// <exception cref="IOException"></exception>
 public static void AddStatusRequestExtension(IDictionary extensions, CertificateStatusRequest statusRequest)
 {
     extensions[ExtensionType.status_request] = CreateStatusRequestExtension(statusRequest);
 }
        /// <exception cref="IOException"></exception>
        public static byte[] CreateStatusRequestExtension(CertificateStatusRequest statusRequest)
        {
            if (statusRequest == null)
            {
                throw new TlsFatalAlert(AlertDescription.internal_error);
            }

            MemoryStream buf = new MemoryStream();

            statusRequest.Encode(buf);

            return buf.ToArray();
        }
 public static void AddStatusRequestExtension(IDictionary extensions, CertificateStatusRequest statusRequest)
 {
     extensions[5] = TlsExtensionsUtilities.CreateStatusRequestExtension(statusRequest);
 }