private void AddCrls(IList <Opc.Ua.X509CRL> collection, X509CrlCollectionApiModel model) { foreach (var certApiModel in model.Chain) { var crl = new Opc.Ua.X509CRL(Convert.FromBase64String(certApiModel.Crl)); collection.Add(crl); } }
public async Task <IList <Opc.Ua.X509CRL> > GetCACrlChainAsync(string id) { var result = new List <Opc.Ua.X509CRL>(); var chainApiModel = await _opcServiceClient.GetCertificateGroupIssuerCACrlChainAsync(id).ConfigureAwait(false); foreach (var certApiModel in chainApiModel.Chain) { var crl = new Opc.Ua.X509CRL(Convert.FromBase64String(certApiModel.Crl)); result.Add(crl); } return(result); }
public ActionResult DownloadCrlBase64(string crl) { var byteArray = Convert.FromBase64String(crl); var crlObject = new Opc.Ua.X509CRL(byteArray); var model = new CrlDetailsApiModel() { UpdateTime = crlObject.UpdateTime, NextUpdateTime = crlObject.NextUpdateTime, Issuer = crlObject.Issuer, EncodedBase64 = crl }; return(View(model)); }
public X509CrlApiModel(Opc.Ua.X509CRL crl) { this.Crl = Convert.ToBase64String(crl.RawData); this.Issuer = crl.Issuer; }