bool SetCustoms() { string str = x509names.Text; if (!string.IsNullOrEmpty(str)) { if (str.IndexOf('/') == -1 && str.IndexOf('=') == -1) { return(false); } string[] parts = str.Split('/'); foreach (string part in parts) { if (part == "") { continue; } string[] nv = part.Split('='); string name = nv[0]; string value = nv[1]; bind.Add(name, value); } } return(true); }
public void LoadCertificate(Al.Security.X509.X509Certificate cert) { System.Collections.IList oids = cert.SubjectDN.GetOidList(); System.Collections.IList values = cert.SubjectDN.GetValueList(); bind = new x509NameBind(); for (int i = 0; i < oids.Count; i++) { bind.Add(((Al.Security.Asn1.DerObjectIdentifier)oids[i]).Id, (string)values[i]); } LoadNames(); }