/// <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()); }
/// <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); }
/// <exception cref="IOException"></exception> public static void AddStatusRequestExtension(IDictionary extensions, CertificateStatusRequest statusRequest) { extensions[ExtensionType.status_request] = CreateStatusRequestExtension(statusRequest); }