From 28008a746a31abb7909dd86cb0cd413ac8943b0b Mon Sep 17 00:00:00 2001 From: jmpoep Date: Thu, 7 Dec 2023 16:51:07 +0800 Subject: first commit --- utils/ipn_sqlclr/LogItem.cs | 11 + utils/ipn_sqlclr/Taggant.cs | 274 +++ utils/ipn_sqlclr/TaggantWebService.cs | 159 ++ utils/ipn_sqlclr/VmpLicenseKey.cs | 36 + ...UpdateCertificateStatusResponseType1.datasource | 10 + .../CertificateManagementService.wsdl | 94 + .../CertificateManagementService.xsd | 187 ++ .../certificateManagementService/Reference.cs | 1639 +++++++++++++ .../certificateManagementService/Reference.map | 7 + ...questKeyRecoveryResponseMessageType1.datasource | 10 + .../SearchCertificateResponseType1.datasource | 10 + ...UpdateCertificateStatusResponseType1.datasource | 10 + .../policyService/CertificateEnrollmentPolicy.wsdl | 37 + .../policyService/CertificateEnrollmentPolicy.xsd | 388 +++ .../Web References/policyService/Reference.cs | 2512 ++++++++++++++++++++ .../Web References/policyService/Reference.map | 7 + .../policyService/getPoliciesResponse.datasource | 10 + .../PrepSignDataResponse.datasource | 10 + .../Web References/signDataService/Reference.cs | 793 ++++++ .../Web References/signDataService/Reference.map | 7 + .../Web References/signDataService/SignerAPI.wsdl | 75 + .../Web References/signDataService/SignerAPI.xsd | 127 + .../ToBeSignedClientPKCS7BlobType.datasource | 10 + .../VerifySignedDataResponse.datasource | 10 + .../userManagementService/Reference.map | 7 + .../UserManagementService.wsdl | 126 + .../UserManagementService.xsd | 198 ++ .../veriSignCertIssuingService/Reference.cs | 1045 ++++++++ .../veriSignCertIssuingService/Reference.map | 16 + ...tSecurityTokenResponseCollectionType.datasource | 10 + .../RequestSecurityTokenResponseType.datasource | 10 + .../veriSignCertIssuingService/VS_WSTEP.xsd | 83 + .../certificateService.wsdl | 38 + .../oasis-200401-wss-wssecurity-secext-1.xsd | 187 ++ .../oasis-200401-wss-wssecurity-utility-1.xsd | 90 + .../veriSignCertIssuingService/ws-addr.xsd | 101 + .../ws-authorization.xsd | 30 + .../veriSignCertIssuingService/ws-policy.xsd | 64 + .../veriSignCertIssuingService/ws-trust-1.wsdl | 54 + .../veriSignCertIssuingService/ws-trust-1.xsd | 359 +++ .../veriSignCertIssuingService/xml.xsd | 270 +++ .../xmldsig-core-schema.xsd | 213 ++ utils/ipn_sqlclr/XmlReaderSpy.cs | 280 +++ utils/ipn_sqlclr/ipn_sqlclr.sqlproj | 130 + utils/ipn_sqlclr/keygen.cs | 212 ++ 45 files changed, 9956 insertions(+) create mode 100644 utils/ipn_sqlclr/LogItem.cs create mode 100644 utils/ipn_sqlclr/Taggant.cs create mode 100644 utils/ipn_sqlclr/TaggantWebService.cs create mode 100644 utils/ipn_sqlclr/VmpLicenseKey.cs create mode 100644 utils/ipn_sqlclr/Web References/certificateManagementService/BulkUpdateCertificateStatusResponseType1.datasource create mode 100644 utils/ipn_sqlclr/Web References/certificateManagementService/CertificateManagementService.wsdl create mode 100644 utils/ipn_sqlclr/Web References/certificateManagementService/CertificateManagementService.xsd create mode 100644 utils/ipn_sqlclr/Web References/certificateManagementService/Reference.cs create mode 100644 utils/ipn_sqlclr/Web References/certificateManagementService/Reference.map create mode 100644 utils/ipn_sqlclr/Web References/certificateManagementService/RequestKeyRecoveryResponseMessageType1.datasource create mode 100644 utils/ipn_sqlclr/Web References/certificateManagementService/SearchCertificateResponseType1.datasource create mode 100644 utils/ipn_sqlclr/Web References/certificateManagementService/UpdateCertificateStatusResponseType1.datasource create mode 100644 utils/ipn_sqlclr/Web References/policyService/CertificateEnrollmentPolicy.wsdl create mode 100644 utils/ipn_sqlclr/Web References/policyService/CertificateEnrollmentPolicy.xsd create mode 100644 utils/ipn_sqlclr/Web References/policyService/Reference.cs create mode 100644 utils/ipn_sqlclr/Web References/policyService/Reference.map create mode 100644 utils/ipn_sqlclr/Web References/policyService/getPoliciesResponse.datasource create mode 100644 utils/ipn_sqlclr/Web References/signDataService/PrepSignDataResponse.datasource create mode 100644 utils/ipn_sqlclr/Web References/signDataService/Reference.cs create mode 100644 utils/ipn_sqlclr/Web References/signDataService/Reference.map create mode 100644 utils/ipn_sqlclr/Web References/signDataService/SignerAPI.wsdl create mode 100644 utils/ipn_sqlclr/Web References/signDataService/SignerAPI.xsd create mode 100644 utils/ipn_sqlclr/Web References/signDataService/ToBeSignedClientPKCS7BlobType.datasource create mode 100644 utils/ipn_sqlclr/Web References/signDataService/VerifySignedDataResponse.datasource create mode 100644 utils/ipn_sqlclr/Web References/userManagementService/Reference.map create mode 100644 utils/ipn_sqlclr/Web References/userManagementService/UserManagementService.wsdl create mode 100644 utils/ipn_sqlclr/Web References/userManagementService/UserManagementService.xsd create mode 100644 utils/ipn_sqlclr/Web References/veriSignCertIssuingService/Reference.cs create mode 100644 utils/ipn_sqlclr/Web References/veriSignCertIssuingService/Reference.map create mode 100644 utils/ipn_sqlclr/Web References/veriSignCertIssuingService/RequestSecurityTokenResponseCollectionType.datasource create mode 100644 utils/ipn_sqlclr/Web References/veriSignCertIssuingService/RequestSecurityTokenResponseType.datasource create mode 100644 utils/ipn_sqlclr/Web References/veriSignCertIssuingService/VS_WSTEP.xsd create mode 100644 utils/ipn_sqlclr/Web References/veriSignCertIssuingService/certificateService.wsdl create mode 100644 utils/ipn_sqlclr/Web References/veriSignCertIssuingService/oasis-200401-wss-wssecurity-secext-1.xsd create mode 100644 utils/ipn_sqlclr/Web References/veriSignCertIssuingService/oasis-200401-wss-wssecurity-utility-1.xsd create mode 100644 utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-addr.xsd create mode 100644 utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-authorization.xsd create mode 100644 utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-policy.xsd create mode 100644 utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-trust-1.wsdl create mode 100644 utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-trust-1.xsd create mode 100644 utils/ipn_sqlclr/Web References/veriSignCertIssuingService/xml.xsd create mode 100644 utils/ipn_sqlclr/Web References/veriSignCertIssuingService/xmldsig-core-schema.xsd create mode 100644 utils/ipn_sqlclr/XmlReaderSpy.cs create mode 100644 utils/ipn_sqlclr/ipn_sqlclr.sqlproj create mode 100644 utils/ipn_sqlclr/keygen.cs (limited to 'utils/ipn_sqlclr') diff --git a/utils/ipn_sqlclr/LogItem.cs b/utils/ipn_sqlclr/LogItem.cs new file mode 100644 index 0000000..d6fbcf9 --- /dev/null +++ b/utils/ipn_sqlclr/LogItem.cs @@ -0,0 +1,11 @@ +using System.Xml; + +namespace ipn_sqlclr +{ + public class LogItem + { + public int MsgId { get; set; } + public XmlDocument[] Xml { get; set; } + public string[] P { get; set; } + } +} diff --git a/utils/ipn_sqlclr/Taggant.cs b/utils/ipn_sqlclr/Taggant.cs new file mode 100644 index 0000000..c989252 --- /dev/null +++ b/utils/ipn_sqlclr/Taggant.cs @@ -0,0 +1,274 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Data.SqlTypes; +using System.IO; +using System.Security.Cryptography.X509Certificates; +using System.Xml; +using Microsoft.SqlServer.Server; +using Org.BouncyCastle.Crypto; +using Org.BouncyCastle.Crypto.Generators; +using Org.BouncyCastle.OpenSsl; +using Org.BouncyCastle.Security; +using System.Linq; + +namespace ipn_sqlclr +{ + public class TaggantConfig : Dictionary + { + public X509Certificate ClientCertificate { get; set; } + } + public partial class UserDefinedFunctions + { + public static X509Certificate LocateCertificate(string subjectName) + { + var certStore = new X509Store(StoreName.My, StoreLocation.LocalMachine); + certStore.Open(OpenFlags.ReadOnly); + X509Certificate2Collection certCollection = certStore.Certificates.Find(X509FindType.FindBySubjectName, subjectName, true); + certStore.Close(); + + if (0 == certCollection.Count) + { + throw new ArgumentException(string.Format("No valid client certificate found at LocalMachine.My by SubjectName '{0}'", subjectName), "subjectName"); + } + if (1 == certCollection.Count) + { + return certCollection[0]; + } + throw new ArgumentException(string.Format("More than one client certificate found at LocalMachine.My by SubjectName '{0}'", subjectName), "subjectName"); + + } + public static TaggantConfig GetTaggantConfig(SqlInt32 taggantConfigId) + { + var config = new TaggantConfig(); + using (var conn = new SqlConnection("context connection=true")) + { + conn.Open(); + var readConfigCmd = conn.CreateCommand(); + readConfigCmd.Parameters.Add(new SqlParameter("@taggantConfigId", taggantConfigId.Value)); + readConfigCmd.CommandText = + "SELECT Name, Value FROM dbo.TaggantConfig WHERE ID=@taggantConfigId"; + using (var reader = readConfigCmd.ExecuteReader()) + { + while(reader.Read()) + { + config[reader.GetString(0)] = reader[1] as string; + } + } + } + config.ClientCertificate = LocateCertificate(config["ClientCertificate"]); + return config; + } + + [SqlFunction] + public static SqlString TaggantPrivateKeyGenerateNew() + { + var g = new RsaKeyPairGenerator(); + g.Init(new KeyGenerationParameters(new SecureRandom(), 2048)); + var pair = g.GenerateKeyPair(); + + using (var sw = new StringWriter()) + { + new PemWriter(sw).WriteObject(pair); + sw.Flush(); + return new SqlString(sw.ToString()); + } + } + + [SqlProcedure] + public static int TaggantCertRevoke(SqlInt32 taggantConfigId, SqlInt32 customerId) + { + var tc = GetTaggantConfig(taggantConfigId); + var log = new List(); + try + { + string mail; + using (var conn = new SqlConnection("context connection=true")) + { + conn.Open(); + var readCustomerCmd = conn.CreateCommand(); + readCustomerCmd.Parameters.Add(new SqlParameter("@CustomerID", customerId.Value)); + readCustomerCmd.CommandText = + "SELECT EMail FROM dbo.Customer WHERE ID=@CustomerID"; + using (var reader = readCustomerCmd.ExecuteReader()) + { + if (reader.Read()) + { + mail = reader[0] as string; + } + else + { + throw new ArgumentException("Customer not found", "customerId"); + } + if (string.IsNullOrWhiteSpace(mail)) + throw new InvalidOperationException("Customer EMail is not set"); + } + } + log.Add(new LogItem { MsgId = 1033, P = new[] { customerId.ToString(), tc["CertificateProfileOid"] } }); + + TaggantWebService.CertRevoke(tc, mail, log); + return 0; + } + catch (Exception ex) + { + log.Add(new LogItem { MsgId = 15, P = new[] { ex.Source, ex.Message, ex.StackTrace } }); + throw; + } + finally + { + FlushLog("TaggantCertRevoke", new SqlInt32(2), customerId, log); + } + } + + [SqlProcedure] + public static int TaggantCertEnsure(SqlInt32 taggantConfigId, SqlInt32 customerId) + { + var tc = GetTaggantConfig(taggantConfigId); + var log = new List(); + var id = "ipn" + customerId.Value; + string taggantCert = null; + try + { + string mail; + string privateKey; + using (var conn = new SqlConnection("context connection=true")) + { + conn.Open(); + var readCustomerCmd = conn.CreateCommand(); + readCustomerCmd.Parameters.Add(new SqlParameter("@CustomerID", customerId.Value)); + readCustomerCmd.CommandText = + "SELECT EMail, PrivateKeyCert, TaggantCert FROM dbo.Customer WHERE ID=@CustomerID"; + using (var reader = readCustomerCmd.ExecuteReader()) + { + if (reader.Read()) + { + mail = reader[0] as string; + privateKey = reader[1] as string; + taggantCert = reader[2] as string; + } + else + { + throw new ArgumentException("Customer not found", "customerId"); + } + if (string.IsNullOrWhiteSpace(mail)) + throw new InvalidOperationException("Customer EMail is not set"); + if (string.IsNullOrWhiteSpace(privateKey)) + throw new InvalidOperationException("Customer PrivateKeyCert is not set"); + if (!string.IsNullOrWhiteSpace(taggantCert)) + return 0; // ensured + } + } + log.Add(new LogItem { MsgId = 14, P = new[] { customerId.ToString(), mail, tc["CertificateProfileOid"] } }); + + taggantCert = TaggantWebService.CertRequestNew(tc, id, mail, privateKey, log); + using (var conn = new SqlConnection("context connection=true")) + { + conn.Open(); + var writeCustomerCmd = conn.CreateCommand(); + writeCustomerCmd.Parameters.Add(new SqlParameter("@CustomerID", customerId.Value)); + writeCustomerCmd.Parameters.Add(new SqlParameter("@TaggantCert", taggantCert)); + writeCustomerCmd.CommandText = + "UPDATE dbo.Customer SET TaggantCert=@TaggantCert WHERE ID=@CustomerID"; + writeCustomerCmd.ExecuteNonQuery(); + } + return 1; // created new + } + catch (Exception ex) + { + log.Add(new LogItem { MsgId = 15, P = new[] { ex.Source, ex.Message, ex.StackTrace, taggantCert } }); + throw; + } + finally + { + FlushLog("TaggantCertEnsure", new SqlInt32(2), customerId, log); + } + } + + private static void FlushLog(string src, SqlInt32 refKindId, SqlInt32 refId, IEnumerable log) + { + using (var conn = new SqlConnection("context connection=true")) + { + conn.Open(); + foreach (var li in log) + { + var insLogCmd = conn.CreateCommand(); + insLogCmd.Parameters.Add(new SqlParameter("@RefKindID", refKindId)); + insLogCmd.Parameters.Add(new SqlParameter("@RefID", refId)); + insLogCmd.Parameters.Add(new SqlParameter("@MsgID", li.MsgId)); + int i; + for (i = 0; i < 2; i++) + { + insLogCmd.Parameters.Add( + new SqlParameter(string.Format("@xml{0}", i), SqlDbType.Xml) + { + Value = (li.Xml == null || li.Xml[i] == null) + ? DBNull.Value + : (object)new SqlXml(new XmlTextReader(li.Xml[i].InnerXml, XmlNodeType.Document, null)) + }); + } + insLogCmd.Parameters.Add(new SqlParameter("@P0", src)); + i = 1; + foreach (var p in li.P) + { + insLogCmd.Parameters.Add(new SqlParameter(string.Format("@P{0}", i++), p)); + } + for (; i <= 8; i++) + { + insLogCmd.Parameters.Add(new SqlParameter(string.Format("@P{0}", i), DBNull.Value)); + } + + insLogCmd.CommandText = + "INSERT dbo.Log(RefID, RefKindID, MsgID, xml, xml2, P0, P1, P2, P3, P4, P5, P6, P7, P8)" + + " VALUES(@RefID, @RefKindID, @MsgID, @xml0, @xml1, @P0, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8)"; + + insLogCmd.ExecuteNonQuery(); + } + } + } + + [SqlProcedure] + public static SqlInt32 TaggantGetPolicies(SqlInt32 taggantConfigId) + { + var tc = GetTaggantConfig(taggantConfigId); + var log = new List(); + try + { + var meta = new[] + { + new SqlMetaData("defaultName", SqlDbType.NVarChar, -1), + new SqlMetaData("groupId", SqlDbType.Int), + new SqlMetaData("oIdReferenceId", SqlDbType.Int), + new SqlMetaData("certificateProfileId", SqlDbType.NVarChar, -1) + }; + SqlDataRecord[] records = TaggantWebService.GetPolicies(tc, log).Select(x => + { + var r = new SqlDataRecord(meta); + r.SetSqlString(0, x.defaultName); + r.SetSqlInt32(1, (int)x.group); + r.SetSqlInt32(2, x.oIDReferenceID); + r.SetSqlString(3, x.value); + return r; + }).ToArray(); + + if (SqlContext.Pipe != null) + { + SqlContext.Pipe.SendResultsStart(new SqlDataRecord(meta)); + foreach (var r in records) + SqlContext.Pipe.SendResultsRow(r); + SqlContext.Pipe.SendResultsEnd(); + } + return records.Length; + } + catch (Exception ex) + { + log.Add(new LogItem { MsgId = 15, P = new[] { ex.Source, ex.Message, ex.StackTrace } }); + throw; + } + finally + { + FlushLog("TaggantGetPolicies", new SqlInt32(), new SqlInt32(), log); + } + } + } +} diff --git a/utils/ipn_sqlclr/TaggantWebService.cs b/utils/ipn_sqlclr/TaggantWebService.cs new file mode 100644 index 0000000..e4157e7 --- /dev/null +++ b/utils/ipn_sqlclr/TaggantWebService.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Xml; +using certificateManagementService; +using Org.BouncyCastle.Asn1.X509; +using Org.BouncyCastle.Crypto; +using Org.BouncyCastle.OpenSsl; +using Org.BouncyCastle.Pkcs; +using Org.BouncyCastle.Security; +using Org.BouncyCastle.X509; +using policyService; +using veriSignCertIssuingService; +using ItemChoiceType = certificateManagementService.ItemChoiceType; + +namespace ipn_sqlclr +{ + public static class TaggantWebService + { + public static void CertRevoke(TaggantConfig tc, string id, List log) + { + var es = new certificateManagementService.certificateManagementService(tc.ClientCertificate, tc["ManagementUrl"]); + try + { + var updateCertificateStatusRequest = new UpdateCertificateStatusRequestType + { + clientTransactionID = "ipn_sqlclr " + new SecureRandom().Next(), + operationType = OperationTypeEnum.Revoke, + revocationReasonSpecified = false, + ItemElementName = ItemChoiceType.seatId, + Item = id, + //certificateIssuer = "?", + //challenge = "?", + //comment = "?", + version = tc["ManagementVersion"] + }; + /*var updateResponse =*/ es.updateCertificateStatus(updateCertificateStatusRequest); + } + finally + { + LogXml("updateCertificateStatus", es, log); + } + } + public static string CertRequestNew(TaggantConfig tc, string id, string mail, string privateKey, List log) + { + var csr = CreateCsr(tc, privateKey); + log.Add(new LogItem {MsgId = 16, P = new[] {csr}}); + + var es = new veriSignCertIssuingService.veriSignCertIssuingService(tc.ClientCertificate, tc["EnrollmentUrl"]); + try + { + var requestSecurityTokenType = new RequestSecurityTokenType + { + Item = new RequestVSSecurityTokenEnrollmentType + { + clientTransactionID = "ipn_sqlclr " + new SecureRandom().Next(), + certificateProfileID = tc["CertificateProfileOid"], + requestType = RequestTypeEnum.httpdocsoasisopenorgwssxwstrust200512Issue, + version = tc["EnrollVersion"], + tokenType = TokenType.httpdocsoasisopenorgwss200401oasis200401wssx509tokenprofile10PKCS7, + binarySecurityToken = new[] + { + new BinarySecurityTokenType + { + ValueType = "http://schemas.verisign.com/pkiservices/2009/07/PKCS10", + EncodingType = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#base64binary", + Value = csr + } + }, + nameValuePair = new[] + { + new NameValueType {name = "seat_id", value = mail}, + new NameValueType {name = "common_name", value = string.Format("VMProtect Client {0}", id)}, + new NameValueType {name = "mail_lastName", value = "Client"}, + new NameValueType {name = "mail_firstName", value = string.Format("{0} VMProtect", id)}, + new NameValueType {name = "emailAddress", value = mail}, + new NameValueType {name = "mail_email", value = mail}, + new NameValueType {name = "country", value = "ru"} + } + } + }; + var enrollmentResponse = es.RequestSecurityToken(requestSecurityTokenType); + var certs = ((AttributedString)(enrollmentResponse.Item.requestedVSSecurityToken.Items[0])).Value; + var certPkcs7 = Convert.FromBase64String(certs); + var parser = new X509CertificateParser(); + var cert = parser.ReadCertificate(certPkcs7); + using (var pw = new StringWriter()) + { + new PemWriter(pw).WriteObject(cert); + pw.Flush(); + return pw.ToString(); + } + } + finally + { + LogXml("RequestSecurityToken", es, log); + } + } + + private static string CreateCsr(TaggantConfig tc, string privateKey) + { + AsymmetricCipherKeyPair pair; + using (var reader = new StringReader(privateKey)) + pair = (AsymmetricCipherKeyPair) new PemReader(reader).ReadObject(); + + var csr = new Pkcs10CertificationRequest(tc["CsrAlgorithm"], new X509Name(tc["CsrSubject"]), pair.Public, null, pair.Private); + using (var pw = new StringWriter()) + { + new PemWriter(pw).WriteObject(csr); + pw.Flush(); + return pw.ToString(); + } + } + + public static IEnumerable GetPolicies(TaggantConfig tc, List log) + { + var ps = new policyService.policyService(tc.ClientCertificate, tc["PolicyUrl"]); + try + { + var rp = ps.requestPolicies(new getPolicies {version = tc["PolicyVersion"]}); + return rp.oIDs; + } + finally + { + LogXml("requestPolicies", ps, log); + } + } + + private static void LogXml(string src, XmlReaderSpyService ss, ICollection log) + { + var req = new XmlDocument(); + var resp = new XmlDocument(); + var reqs = ss.GetRequestXml(); + var resps = ss.GetResponseXml(); + try + { + req.LoadXml(reqs); + } + catch (Exception) + { + req = null; + } + try + { + resp.LoadXml(resps); + } + catch (Exception) + { + resp = null; + } + if (req != null && string.IsNullOrWhiteSpace(req.InnerXml)) + req = null; + if (resp != null && string.IsNullOrWhiteSpace(resp.InnerXml)) + resp = null; + if (!string.IsNullOrWhiteSpace(reqs) || !string.IsNullOrWhiteSpace(resps)) + log.Add(new LogItem {MsgId = 17, P = new[] {src, reqs, resps}, Xml = new[] {req, resp}}); + } + } +} diff --git a/utils/ipn_sqlclr/VmpLicenseKey.cs b/utils/ipn_sqlclr/VmpLicenseKey.cs new file mode 100644 index 0000000..2b0ec8a --- /dev/null +++ b/utils/ipn_sqlclr/VmpLicenseKey.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections; +using System.Data.SqlTypes; +using Microsoft.SqlServer.Server; + +namespace ipn_sqlclr +{ + public partial class UserDefinedFunctions + { + [SqlFunction] + public static SqlString VmpLicenseKeyGenerateNew(SqlInt32 productId, SqlString customerName, SqlString eMail, SqlDateTime maxBuildDt) + { + return new SqlString (Keygen.GenerateKey(productId.Value, customerName.Value, eMail.Value, maxBuildDt.Value)); + } + + [SqlFunction(FillRowMethodName = "FillRowVmpLicenseParseKey", + TableDefinition = "[productId] int,[customerName] nvarchar(max),[eMail] nvarchar(max),maxBuildDT datetime")] + public static IEnumerable VmpLicenseParseKey(String key) + { + yield return key; + } + + public static void FillRowVmpLicenseParseKey(Object obj, out SqlInt32 productId, out SqlString customerName, out SqlString eMail, out SqlDateTime maxBuildDt) + { + var key = (string)obj; + int productIdTmp; + string customerNameTmp, eMailTmp; + DateTime maxBuildDtTmp; + Keygen.ParseKey(key, out productIdTmp, out customerNameTmp, out eMailTmp, out maxBuildDtTmp); + productId = productIdTmp; + customerName = customerNameTmp; + eMail = eMailTmp; + maxBuildDt = maxBuildDtTmp; + } + } +} diff --git a/utils/ipn_sqlclr/Web References/certificateManagementService/BulkUpdateCertificateStatusResponseType1.datasource b/utils/ipn_sqlclr/Web References/certificateManagementService/BulkUpdateCertificateStatusResponseType1.datasource new file mode 100644 index 0000000..239ee25 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/certificateManagementService/BulkUpdateCertificateStatusResponseType1.datasource @@ -0,0 +1,10 @@ + + + + taggantWrapper.certificateManagementService.BulkUpdateCertificateStatusResponseType, Web References.certificateManagementService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/certificateManagementService/CertificateManagementService.wsdl b/utils/ipn_sqlclr/Web References/certificateManagementService/CertificateManagementService.wsdl new file mode 100644 index 0000000..6c27b2a --- /dev/null +++ b/utils/ipn_sqlclr/Web References/certificateManagementService/CertificateManagementService.wsdl @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/certificateManagementService/CertificateManagementService.xsd b/utils/ipn_sqlclr/Web References/certificateManagementService/CertificateManagementService.xsd new file mode 100644 index 0000000..d38f2f8 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/certificateManagementService/CertificateManagementService.xsd @@ -0,0 +1,187 @@ + + + + + XML Schema for + certificateManagementService Web Services + version 1.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/certificateManagementService/Reference.cs b/utils/ipn_sqlclr/Web References/certificateManagementService/Reference.cs new file mode 100644 index 0000000..25ef2d8 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/certificateManagementService/Reference.cs @@ -0,0 +1,1639 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// +// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.34014. +// + +using System.Security.Cryptography.X509Certificates; +using ipn_sqlclr; + +#pragma warning disable 1591 + +namespace certificateManagementService { + using System; + using System.Web.Services; + using System.Diagnostics; + using System.Web.Services.Protocols; + using System.Xml.Serialization; + using System.ComponentModel; + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Web.Services.WebServiceBindingAttribute(Name="certificateManagementServiceSOAP", Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public partial class certificateManagementService : XmlReaderSpyService + { + + private System.Threading.SendOrPostCallback updateCertificateStatusOperationCompleted; + + private System.Threading.SendOrPostCallback bulkUpdateCertificateStatusOperationCompleted; + + private System.Threading.SendOrPostCallback keyRecoveryOperationCompleted; + + private System.Threading.SendOrPostCallback searchCertificateOperationCompleted; + + private bool useDefaultCredentialsSetExplicitly; + + /// + public certificateManagementService(X509Certificate clientCert, string url) + : base(clientCert, url) + { + this.Url = url; + ClientCertificates.Add(clientCert); + } + + public new string Url { + get { + return base.Url; + } + set { + if ((((this.IsLocalFileSystemWebService(base.Url) == true) + && (this.useDefaultCredentialsSetExplicitly == false)) + && (this.IsLocalFileSystemWebService(value) == false))) { + base.UseDefaultCredentials = false; + } + base.Url = value; + } + } + + public new bool UseDefaultCredentials { + get { + return base.UseDefaultCredentials; + } + set { + base.UseDefaultCredentials = value; + this.useDefaultCredentialsSetExplicitly = true; + } + } + + /// + public event updateCertificateStatusCompletedEventHandler updateCertificateStatusCompleted; + + /// + public event bulkUpdateCertificateStatusCompletedEventHandler bulkUpdateCertificateStatusCompleted; + + /// + public event keyRecoveryCompletedEventHandler keyRecoveryCompleted; + + /// + public event searchCertificateCompletedEventHandler searchCertificateCompleted; + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.verisign.com/pkiservices/2009/07/management/updateCertificateStatu" + + "s", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)] + [return: System.Xml.Serialization.XmlElementAttribute("updateCertificateStatusResponse", Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public UpdateCertificateStatusResponseType updateCertificateStatus([System.Xml.Serialization.XmlElementAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] UpdateCertificateStatusRequestType updateCertificateStatusRequest) { + object[] results = this.Invoke("updateCertificateStatus", new object[] { + updateCertificateStatusRequest}); + return ((UpdateCertificateStatusResponseType)(results[0])); + } + + /// + public void updateCertificateStatusAsync(UpdateCertificateStatusRequestType updateCertificateStatusRequest) { + this.updateCertificateStatusAsync(updateCertificateStatusRequest, null); + } + + /// + public void updateCertificateStatusAsync(UpdateCertificateStatusRequestType updateCertificateStatusRequest, object userState) { + if ((this.updateCertificateStatusOperationCompleted == null)) { + this.updateCertificateStatusOperationCompleted = new System.Threading.SendOrPostCallback(this.OnupdateCertificateStatusOperationCompleted); + } + this.InvokeAsync("updateCertificateStatus", new object[] { + updateCertificateStatusRequest}, this.updateCertificateStatusOperationCompleted, userState); + } + + private void OnupdateCertificateStatusOperationCompleted(object arg) { + if ((this.updateCertificateStatusCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.updateCertificateStatusCompleted(this, new updateCertificateStatusCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.verisign.com/pkiservices/2009/07/management/bulkUpdateCertificateS" + + "tatus", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)] + [return: System.Xml.Serialization.XmlElementAttribute("bulkUpdateCertificateStatusResponse", Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public BulkUpdateCertificateStatusResponseType bulkUpdateCertificateStatus([System.Xml.Serialization.XmlElementAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] BulkUpdateCertificateStatusRequestType bulkUpdateCertificateStatusRequest) { + object[] results = this.Invoke("bulkUpdateCertificateStatus", new object[] { + bulkUpdateCertificateStatusRequest}); + return ((BulkUpdateCertificateStatusResponseType)(results[0])); + } + + /// + public void bulkUpdateCertificateStatusAsync(BulkUpdateCertificateStatusRequestType bulkUpdateCertificateStatusRequest) { + this.bulkUpdateCertificateStatusAsync(bulkUpdateCertificateStatusRequest, null); + } + + /// + public void bulkUpdateCertificateStatusAsync(BulkUpdateCertificateStatusRequestType bulkUpdateCertificateStatusRequest, object userState) { + if ((this.bulkUpdateCertificateStatusOperationCompleted == null)) { + this.bulkUpdateCertificateStatusOperationCompleted = new System.Threading.SendOrPostCallback(this.OnbulkUpdateCertificateStatusOperationCompleted); + } + this.InvokeAsync("bulkUpdateCertificateStatus", new object[] { + bulkUpdateCertificateStatusRequest}, this.bulkUpdateCertificateStatusOperationCompleted, userState); + } + + private void OnbulkUpdateCertificateStatusOperationCompleted(object arg) { + if ((this.bulkUpdateCertificateStatusCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.bulkUpdateCertificateStatusCompleted(this, new bulkUpdateCertificateStatusCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.verisign.com/pkiservices/2009/07/management/keyRecovery", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)] + [return: System.Xml.Serialization.XmlElementAttribute("requestKeyRecoveryResponseMessage", Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public RequestKeyRecoveryResponseMessageType keyRecovery([System.Xml.Serialization.XmlElementAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] RequestKeyRecoveryMessageType requestKeyRecoveryMessage) { + object[] results = this.Invoke("keyRecovery", new object[] { + requestKeyRecoveryMessage}); + return ((RequestKeyRecoveryResponseMessageType)(results[0])); + } + + /// + public void keyRecoveryAsync(RequestKeyRecoveryMessageType requestKeyRecoveryMessage) { + this.keyRecoveryAsync(requestKeyRecoveryMessage, null); + } + + /// + public void keyRecoveryAsync(RequestKeyRecoveryMessageType requestKeyRecoveryMessage, object userState) { + if ((this.keyRecoveryOperationCompleted == null)) { + this.keyRecoveryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnkeyRecoveryOperationCompleted); + } + this.InvokeAsync("keyRecovery", new object[] { + requestKeyRecoveryMessage}, this.keyRecoveryOperationCompleted, userState); + } + + private void OnkeyRecoveryOperationCompleted(object arg) { + if ((this.keyRecoveryCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.keyRecoveryCompleted(this, new keyRecoveryCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.verisign.com/pkiservices/2009/07/management/searchCertificate", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)] + [return: System.Xml.Serialization.XmlElementAttribute("searchCertificateResponse", Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public SearchCertificateResponseType searchCertificate([System.Xml.Serialization.XmlElementAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] SearchCertificateRequestType searchCertificateRequest) { + object[] results = this.Invoke("searchCertificate", new object[] { + searchCertificateRequest}); + return ((SearchCertificateResponseType)(results[0])); + } + + /// + public void searchCertificateAsync(SearchCertificateRequestType searchCertificateRequest) { + this.searchCertificateAsync(searchCertificateRequest, null); + } + + /// + public void searchCertificateAsync(SearchCertificateRequestType searchCertificateRequest, object userState) { + if ((this.searchCertificateOperationCompleted == null)) { + this.searchCertificateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnsearchCertificateOperationCompleted); + } + this.InvokeAsync("searchCertificate", new object[] { + searchCertificateRequest}, this.searchCertificateOperationCompleted, userState); + } + + private void OnsearchCertificateOperationCompleted(object arg) { + if ((this.searchCertificateCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.searchCertificateCompleted(this, new searchCertificateCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + public new void CancelAsync(object userState) { + base.CancelAsync(userState); + } + + private bool IsLocalFileSystemWebService(string url) { + if (((url == null) + || (url == string.Empty))) { + return false; + } + System.Uri wsUri = new System.Uri(url); + if (((wsUri.Port >= 1024) + && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) { + return true; + } + return false; + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public partial class UpdateCertificateStatusRequestType { + + private string clientTransactionIDField; + + private string versionField; + + private string certificateIssuerField; + + private RevokeReasonCodeEnum revocationReasonField; + + private bool revocationReasonFieldSpecified; + + private string challengeField; + + private string commentField; + + private string itemField; + + private ItemChoiceType itemElementNameField; + + private OperationTypeEnum operationTypeField; + + private System.Xml.XmlElement[] anyField; + + /// + public string clientTransactionID { + get { + return this.clientTransactionIDField; + } + set { + this.clientTransactionIDField = value; + } + } + + /// + public string version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + + /// + public string certificateIssuer { + get { + return this.certificateIssuerField; + } + set { + this.certificateIssuerField = value; + } + } + + /// + public RevokeReasonCodeEnum revocationReason { + get { + return this.revocationReasonField; + } + set { + this.revocationReasonField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool revocationReasonSpecified { + get { + return this.revocationReasonFieldSpecified; + } + set { + this.revocationReasonFieldSpecified = value; + } + } + + /// + public string challenge { + get { + return this.challengeField; + } + set { + this.challengeField = value; + } + } + + /// + public string comment { + get { + return this.commentField; + } + set { + this.commentField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("certificateSerialNumber", typeof(string))] + [System.Xml.Serialization.XmlElementAttribute("seatId", typeof(string))] + [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemElementName")] + public string Item { + get { + return this.itemField; + } + set { + this.itemField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public ItemChoiceType ItemElementName { + get { + return this.itemElementNameField; + } + set { + this.itemElementNameField = value; + } + } + + /// + public OperationTypeEnum operationType { + get { + return this.operationTypeField; + } + set { + this.operationTypeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public enum RevokeReasonCodeEnum { + + /// + Unspecified, + + /// + KeyCompromise, + + /// + CACompromise, + + /// + AffiliationChanged, + + /// + CessationOfOperation, + + /// + PrivilegeWithdrawn, + + /// + AACompromise, + + /// + Superseded, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management", IncludeInSchema=false)] + public enum ItemChoiceType { + + /// + certificateSerialNumber, + + /// + seatId, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public enum OperationTypeEnum { + + /// + Revoke, + + /// + Suspend, + + /// + Resume, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public partial class CertificateSearchResultType { + + private byte[] certificateField; + + private string seatIdField; + + private string commonNameField; + + private string accountIdField; + + private string profileOIDField; + + private string emailAddressField; + + private CertificateStatusEnum statusField; + + private long revokeAtField; + + private bool revokeAtFieldSpecified; + + private RevokeReasonCodeEnum revokeReasonField; + + private bool revokeReasonFieldSpecified; + + private long validFromField; + + private long validToField; + + private string serialNumberField; + + private bool isEscrowedField; + + private System.Xml.XmlElement[] anyField; + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] + public byte[] certificate { + get { + return this.certificateField; + } + set { + this.certificateField = value; + } + } + + /// + public string seatId { + get { + return this.seatIdField; + } + set { + this.seatIdField = value; + } + } + + /// + public string commonName { + get { + return this.commonNameField; + } + set { + this.commonNameField = value; + } + } + + /// + public string accountId { + get { + return this.accountIdField; + } + set { + this.accountIdField = value; + } + } + + /// + public string profileOID { + get { + return this.profileOIDField; + } + set { + this.profileOIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string emailAddress { + get { + return this.emailAddressField; + } + set { + this.emailAddressField = value; + } + } + + /// + public CertificateStatusEnum status { + get { + return this.statusField; + } + set { + this.statusField = value; + } + } + + /// + public long revokeAt { + get { + return this.revokeAtField; + } + set { + this.revokeAtField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool revokeAtSpecified { + get { + return this.revokeAtFieldSpecified; + } + set { + this.revokeAtFieldSpecified = value; + } + } + + /// + public RevokeReasonCodeEnum revokeReason { + get { + return this.revokeReasonField; + } + set { + this.revokeReasonField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool revokeReasonSpecified { + get { + return this.revokeReasonFieldSpecified; + } + set { + this.revokeReasonFieldSpecified = value; + } + } + + /// + public long validFrom { + get { + return this.validFromField; + } + set { + this.validFromField = value; + } + } + + /// + public long validTo { + get { + return this.validToField; + } + set { + this.validToField = value; + } + } + + /// + public string serialNumber { + get { + return this.serialNumberField; + } + set { + this.serialNumberField = value; + } + } + + /// + public bool isEscrowed { + get { + return this.isEscrowedField; + } + set { + this.isEscrowedField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public enum CertificateStatusEnum { + + /// + VALID, + + /// + EXPIRED, + + /// + REVOKED, + + /// + SUSPENDED, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public partial class SearchCertificateResponseType { + + private string clientTransactionIDField; + + private string serverTransactionIDField; + + private int certificateCountField; + + private CertificateSearchResultType[] certificateListField; + + private bool moreCertificateAvailableField; + + private bool moreCertificateAvailableFieldSpecified; + + private string versionField; + + private System.Xml.XmlElement[] anyField; + + /// + public string clientTransactionID { + get { + return this.clientTransactionIDField; + } + set { + this.clientTransactionIDField = value; + } + } + + /// + public string serverTransactionID { + get { + return this.serverTransactionIDField; + } + set { + this.serverTransactionIDField = value; + } + } + + /// + public int certificateCount { + get { + return this.certificateCountField; + } + set { + this.certificateCountField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("certificateInformation", IsNullable=false)] + public CertificateSearchResultType[] certificateList { + get { + return this.certificateListField; + } + set { + this.certificateListField = value; + } + } + + /// + public bool moreCertificateAvailable { + get { + return this.moreCertificateAvailableField; + } + set { + this.moreCertificateAvailableField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool moreCertificateAvailableSpecified { + get { + return this.moreCertificateAvailableFieldSpecified; + } + set { + this.moreCertificateAvailableFieldSpecified = value; + } + } + + /// + public string version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public partial class SearchCertificateRequestType { + + private string clientTransactionIDField; + + private string seatIdField; + + private string accountIdField; + + private string profileOIDField; + + private string commonNameField; + + private CertificateStatusEnum statusField; + + private bool statusFieldSpecified; + + private string emailAddressField; + + private string serialNumberField; + + private byte[] issuingCAField; + + private long validFromField; + + private bool validFromFieldSpecified; + + private long validToField; + + private bool validToFieldSpecified; + + private int startIndexField; + + private bool startIndexFieldSpecified; + + private string versionField; + + private System.Xml.XmlElement[] anyField; + + /// + public string clientTransactionID { + get { + return this.clientTransactionIDField; + } + set { + this.clientTransactionIDField = value; + } + } + + /// + public string seatId { + get { + return this.seatIdField; + } + set { + this.seatIdField = value; + } + } + + /// + public string accountId { + get { + return this.accountIdField; + } + set { + this.accountIdField = value; + } + } + + /// + public string profileOID { + get { + return this.profileOIDField; + } + set { + this.profileOIDField = value; + } + } + + /// + public string commonName { + get { + return this.commonNameField; + } + set { + this.commonNameField = value; + } + } + + /// + public CertificateStatusEnum status { + get { + return this.statusField; + } + set { + this.statusField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool statusSpecified { + get { + return this.statusFieldSpecified; + } + set { + this.statusFieldSpecified = value; + } + } + + /// + public string emailAddress { + get { + return this.emailAddressField; + } + set { + this.emailAddressField = value; + } + } + + /// + public string serialNumber { + get { + return this.serialNumberField; + } + set { + this.serialNumberField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] + public byte[] issuingCA { + get { + return this.issuingCAField; + } + set { + this.issuingCAField = value; + } + } + + /// + public long validFrom { + get { + return this.validFromField; + } + set { + this.validFromField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool validFromSpecified { + get { + return this.validFromFieldSpecified; + } + set { + this.validFromFieldSpecified = value; + } + } + + /// + public long validTo { + get { + return this.validToField; + } + set { + this.validToField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool validToSpecified { + get { + return this.validToFieldSpecified; + } + set { + this.validToFieldSpecified = value; + } + } + + /// + public int startIndex { + get { + return this.startIndexField; + } + set { + this.startIndexField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool startIndexSpecified { + get { + return this.startIndexFieldSpecified; + } + set { + this.startIndexFieldSpecified = value; + } + } + + /// + public string version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public partial class RequestKeyRecoveryResponseMessageType { + + private string clientTransactionIDField; + + private string serverTransactionIDField; + + private int adminApprovalPendingCountField; + + private bool adminApprovalPendingCountFieldSpecified; + + private string pKCS12PasswordField; + + private string[] pKCS12MessageField; + + private string versionField; + + private System.Xml.XmlElement[] anyField; + + /// + public string clientTransactionID { + get { + return this.clientTransactionIDField; + } + set { + this.clientTransactionIDField = value; + } + } + + /// + public string serverTransactionID { + get { + return this.serverTransactionIDField; + } + set { + this.serverTransactionIDField = value; + } + } + + /// + public int adminApprovalPendingCount { + get { + return this.adminApprovalPendingCountField; + } + set { + this.adminApprovalPendingCountField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool adminApprovalPendingCountSpecified { + get { + return this.adminApprovalPendingCountFieldSpecified; + } + set { + this.adminApprovalPendingCountFieldSpecified = value; + } + } + + /// + public string pKCS12Password { + get { + return this.pKCS12PasswordField; + } + set { + this.pKCS12PasswordField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("pKCS12Message")] + public string[] pKCS12Message { + get { + return this.pKCS12MessageField; + } + set { + this.pKCS12MessageField = value; + } + } + + /// + public string version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public partial class RequestKeyRecoveryMessageType { + + private string clientTransactionIDField; + + private string pKCS12PasswordField; + + private string certificateSerialNumberField; + + private string certificateIssuerField; + + private string adminIDField; + + private string versionField; + + private System.Xml.XmlElement[] anyField; + + /// + public string clientTransactionID { + get { + return this.clientTransactionIDField; + } + set { + this.clientTransactionIDField = value; + } + } + + /// + public string pKCS12Password { + get { + return this.pKCS12PasswordField; + } + set { + this.pKCS12PasswordField = value; + } + } + + /// + public string certificateSerialNumber { + get { + return this.certificateSerialNumberField; + } + set { + this.certificateSerialNumberField = value; + } + } + + /// + public string certificateIssuer { + get { + return this.certificateIssuerField; + } + set { + this.certificateIssuerField = value; + } + } + + /// + public string adminID { + get { + return this.adminIDField; + } + set { + this.adminIDField = value; + } + } + + /// + public string version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public partial class BulkUpdateCertificateStatusResponseType { + + private string clientTransactionIDField; + + private string serverTransactionIDField; + + private string versionField; + + private int successCodeField; + + private string successMsgField; + + private int revocationCountField; + + private System.Xml.XmlElement[] anyField; + + /// + public string clientTransactionID { + get { + return this.clientTransactionIDField; + } + set { + this.clientTransactionIDField = value; + } + } + + /// + public string serverTransactionID { + get { + return this.serverTransactionIDField; + } + set { + this.serverTransactionIDField = value; + } + } + + /// + public string version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + + /// + public int successCode { + get { + return this.successCodeField; + } + set { + this.successCodeField = value; + } + } + + /// + public string successMsg { + get { + return this.successMsgField; + } + set { + this.successMsgField = value; + } + } + + /// + public int revocationCount { + get { + return this.revocationCountField; + } + set { + this.revocationCountField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public partial class BulkUpdateCertificateStatusRequestType { + + private string clientTransactionIDField; + + private string versionField; + + private RevokeReasonCodeEnum revocationReasonField; + + private bool revocationReasonFieldSpecified; + + private string commentField; + + private string[] itemsField; + + private ItemsChoiceType[] itemsElementNameField; + + private OperationTypeEnum operationTypeField; + + private System.Xml.XmlElement[] anyField; + + /// + public string clientTransactionID { + get { + return this.clientTransactionIDField; + } + set { + this.clientTransactionIDField = value; + } + } + + /// + public string version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + + /// + public RevokeReasonCodeEnum revocationReason { + get { + return this.revocationReasonField; + } + set { + this.revocationReasonField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool revocationReasonSpecified { + get { + return this.revocationReasonFieldSpecified; + } + set { + this.revocationReasonFieldSpecified = value; + } + } + + /// + public string comment { + get { + return this.commentField; + } + set { + this.commentField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("certificateSerialNumber", typeof(string))] + [System.Xml.Serialization.XmlElementAttribute("profileOID", typeof(string))] + [System.Xml.Serialization.XmlElementAttribute("seatId", typeof(string))] + [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")] + public string[] Items { + get { + return this.itemsField; + } + set { + this.itemsField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")] + [System.Xml.Serialization.XmlIgnoreAttribute()] + public ItemsChoiceType[] ItemsElementName { + get { + return this.itemsElementNameField; + } + set { + this.itemsElementNameField = value; + } + } + + /// + public OperationTypeEnum operationType { + get { + return this.operationTypeField; + } + set { + this.operationTypeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management", IncludeInSchema=false)] + public enum ItemsChoiceType { + + /// + certificateSerialNumber, + + /// + profileOID, + + /// + seatId, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/management")] + public partial class UpdateCertificateStatusResponseType { + + private string clientTransactionIDField; + + private string serverTransactionIDField; + + private string versionField; + + private int successCodeField; + + private string successMsgField; + + private int revocationCountField; + + private System.Xml.XmlElement[] anyField; + + /// + public string clientTransactionID { + get { + return this.clientTransactionIDField; + } + set { + this.clientTransactionIDField = value; + } + } + + /// + public string serverTransactionID { + get { + return this.serverTransactionIDField; + } + set { + this.serverTransactionIDField = value; + } + } + + /// + public string version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + + /// + public int successCode { + get { + return this.successCodeField; + } + set { + this.successCodeField = value; + } + } + + /// + public string successMsg { + get { + return this.successMsgField; + } + set { + this.successMsgField = value; + } + } + + /// + public int revocationCount { + get { + return this.revocationCountField; + } + set { + this.revocationCountField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + public delegate void updateCertificateStatusCompletedEventHandler(object sender, updateCertificateStatusCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class updateCertificateStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal updateCertificateStatusCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public UpdateCertificateStatusResponseType Result { + get { + this.RaiseExceptionIfNecessary(); + return ((UpdateCertificateStatusResponseType)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + public delegate void bulkUpdateCertificateStatusCompletedEventHandler(object sender, bulkUpdateCertificateStatusCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class bulkUpdateCertificateStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal bulkUpdateCertificateStatusCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public BulkUpdateCertificateStatusResponseType Result { + get { + this.RaiseExceptionIfNecessary(); + return ((BulkUpdateCertificateStatusResponseType)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + public delegate void keyRecoveryCompletedEventHandler(object sender, keyRecoveryCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class keyRecoveryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal keyRecoveryCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public RequestKeyRecoveryResponseMessageType Result { + get { + this.RaiseExceptionIfNecessary(); + return ((RequestKeyRecoveryResponseMessageType)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + public delegate void searchCertificateCompletedEventHandler(object sender, searchCertificateCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class searchCertificateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal searchCertificateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public SearchCertificateResponseType Result { + get { + this.RaiseExceptionIfNecessary(); + return ((SearchCertificateResponseType)(this.results[0])); + } + } + } +} + +#pragma warning restore 1591 \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/certificateManagementService/Reference.map b/utils/ipn_sqlclr/Web References/certificateManagementService/Reference.map new file mode 100644 index 0000000..fea64f8 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/certificateManagementService/Reference.map @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/certificateManagementService/RequestKeyRecoveryResponseMessageType1.datasource b/utils/ipn_sqlclr/Web References/certificateManagementService/RequestKeyRecoveryResponseMessageType1.datasource new file mode 100644 index 0000000..d971d87 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/certificateManagementService/RequestKeyRecoveryResponseMessageType1.datasource @@ -0,0 +1,10 @@ + + + + taggantWrapper.certificateManagementService.RequestKeyRecoveryResponseMessageType, Web References.certificateManagementService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/certificateManagementService/SearchCertificateResponseType1.datasource b/utils/ipn_sqlclr/Web References/certificateManagementService/SearchCertificateResponseType1.datasource new file mode 100644 index 0000000..128e0e4 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/certificateManagementService/SearchCertificateResponseType1.datasource @@ -0,0 +1,10 @@ + + + + taggantWrapper.certificateManagementService.SearchCertificateResponseType, Web References.certificateManagementService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/certificateManagementService/UpdateCertificateStatusResponseType1.datasource b/utils/ipn_sqlclr/Web References/certificateManagementService/UpdateCertificateStatusResponseType1.datasource new file mode 100644 index 0000000..53bc7ff --- /dev/null +++ b/utils/ipn_sqlclr/Web References/certificateManagementService/UpdateCertificateStatusResponseType1.datasource @@ -0,0 +1,10 @@ + + + + taggantWrapper.certificateManagementService.UpdateCertificateStatusResponseType, Web References.certificateManagementService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/policyService/CertificateEnrollmentPolicy.wsdl b/utils/ipn_sqlclr/Web References/policyService/CertificateEnrollmentPolicy.wsdl new file mode 100644 index 0000000..2c51dd3 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/policyService/CertificateEnrollmentPolicy.wsdl @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/policyService/CertificateEnrollmentPolicy.xsd b/utils/ipn_sqlclr/Web References/policyService/CertificateEnrollmentPolicy.xsd new file mode 100644 index 0000000..6e58e09 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/policyService/CertificateEnrollmentPolicy.xsd @@ -0,0 +1,388 @@ + + + + + XML Schema for policyService Web Services + version 2.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/policyService/Reference.cs b/utils/ipn_sqlclr/Web References/policyService/Reference.cs new file mode 100644 index 0000000..a6973d8 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/policyService/Reference.cs @@ -0,0 +1,2512 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// +// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.34014. +// + +using System.Security.Cryptography.X509Certificates; +using System.Xml; +using ipn_sqlclr; + +#pragma warning disable 1591 + +namespace policyService { + using System; + using System.Web.Services; + using System.Diagnostics; + using System.Web.Services.Protocols; + using System.Xml.Serialization; + using System.ComponentModel; + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Web.Services.WebServiceBindingAttribute(Name="requestPoliciesServiceSOAP", Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class policyService : XmlReaderSpyService + { + + private System.Threading.SendOrPostCallback requestPoliciesOperationCompleted; + + /// + public policyService(X509Certificate clientCert, string url) : base(clientCert, url) + { + } + + /// + public event requestPoliciesCompletedEventHandler requestPoliciesCompleted; + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.verisign.com/pkiservices/2009/07/policy/requestPolicies", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)] + [return: System.Xml.Serialization.XmlElementAttribute("getPoliciesResponse", Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public getPoliciesResponse requestPolicies([System.Xml.Serialization.XmlElementAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] getPolicies getPolicies) { + object[] results = this.Invoke("requestPolicies", new object[] { + getPolicies}); + return ((getPoliciesResponse)(results[0])); + } + + /// + public void requestPoliciesAsync(getPolicies getPolicies) { + this.requestPoliciesAsync(getPolicies, null); + } + + /// + public void requestPoliciesAsync(getPolicies getPolicies, object userState) { + if ((this.requestPoliciesOperationCompleted == null)) { + this.requestPoliciesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnrequestPoliciesOperationCompleted); + } + this.InvokeAsync("requestPolicies", new object[] { + getPolicies}, this.requestPoliciesOperationCompleted, userState); + } + + private void OnrequestPoliciesOperationCompleted(object arg) { + if ((this.requestPoliciesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.requestPoliciesCompleted(this, new requestPoliciesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + public new void CancelAsync(object userState) { + base.CancelAsync(userState); + } + + private bool IsLocalFileSystemWebService(string url) { + if (((url == null) + || (url == string.Empty))) { + return false; + } + System.Uri wsUri = new System.Uri(url); + if (((wsUri.Port >= 1024) + && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) { + return true; + } + return false; + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class getPolicies { + + private string versionField; + + private string clientTransactionIDField; + + private Client clientField; + + private RequestFilter requestFilterField; + + private bool signResponseField; + + private bool signResponseFieldSpecified; + + /// + public string version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + + /// + public string clientTransactionID { + get { + return this.clientTransactionIDField; + } + set { + this.clientTransactionIDField = value; + } + } + + /// + public Client client { + get { + return this.clientField; + } + set { + this.clientField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public RequestFilter requestFilter { + get { + return this.requestFilterField; + } + set { + this.requestFilterField = value; + } + } + + /// + public bool signResponse { + get { + return this.signResponseField; + } + set { + this.signResponseField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool signResponseSpecified { + get { + return this.signResponseFieldSpecified; + } + set { + this.signResponseFieldSpecified = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class Client { + + private System.Nullable lastUpdatetimeField; + + private string preferredLanguageField; + + private System.Xml.XmlElement[] anyField; + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public System.Nullable lastUpdatetime { + get { + return this.lastUpdatetimeField; + } + set { + this.lastUpdatetimeField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="language", IsNullable=true)] + public string preferredLanguage { + get { + return this.preferredLanguageField; + } + set { + this.preferredLanguageField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class OID { + + private string valueField; + + private int oIDReferenceIDField; + + private uint groupField; + + private string defaultNameField; + + private System.Xml.XmlElement[] anyField; + + /// + public string value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + + /// + public int oIDReferenceID { + get { + return this.oIDReferenceIDField; + } + set { + this.oIDReferenceIDField = value; + } + } + + /// + public uint group { + get { + return this.groupField; + } + set { + this.groupField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string defaultName { + get { + return this.defaultNameField; + } + set { + this.defaultNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class CA { + + private string[] urisField; + + private byte[] certificateField; + + private string cAIssuerNameField; + + private int cAReferenceIDField; + + private System.Nullable cATypeField; + + private byte[][] intermediateCACertificatesField; + + private byte[] rootCACertificateField; + + private System.Xml.XmlElement[] anyField; + + /// + [System.Xml.Serialization.XmlElementAttribute("uris", DataType="anyURI")] + public string[] uris { + get { + return this.urisField; + } + set { + this.urisField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] + public byte[] certificate { + get { + return this.certificateField; + } + set { + this.certificateField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string cAIssuerName { + get { + return this.cAIssuerNameField; + } + set { + this.cAIssuerNameField = value; + } + } + + /// + public int cAReferenceID { + get { + return this.cAReferenceIDField; + } + set { + this.cAReferenceIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public System.Nullable cAType { + get { + return this.cATypeField; + } + set { + this.cATypeField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("intermediateCACertificates", DataType="base64Binary")] + public byte[][] intermediateCACertificates { + get { + return this.intermediateCACertificatesField; + } + set { + this.intermediateCACertificatesField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] + public byte[] rootCACertificate { + get { + return this.rootCACertificateField; + } + set { + this.rootCACertificateField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public enum CAType { + + /// + @public, + + /// + @private, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class MigrationOIDCollection { + + private string[] migratedFromOIDField; + + private string migratedToOIDField; + + private System.Xml.XmlElement[] anyField; + + /// + [System.Xml.Serialization.XmlElementAttribute("migratedFromOID")] + public string[] migratedFromOID { + get { + return this.migratedFromOIDField; + } + set { + this.migratedFromOIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string migratedToOID { + get { + return this.migratedToOIDField; + } + set { + this.migratedToOIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class ApplicationInstructionsType { + + private string fileContentTypeField; + + private string urlField; + + private System.Xml.XmlElement[] anyField; + + /// + public string fileContentType { + get { + return this.fileContentTypeField; + } + set { + this.fileContentTypeField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="anyURI")] + public string url { + get { + return this.urlField; + } + set { + this.urlField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class SeatInfoType { + + private AttributeValueType attributeNameValueField; + + private AttributeNameValuePropertyType attributeNameValuePropertyField; + + private System.Xml.XmlElement[] anyField; + + /// + public AttributeValueType attributeNameValue { + get { + return this.attributeNameValueField; + } + set { + this.attributeNameValueField = value; + } + } + + /// + public AttributeNameValuePropertyType attributeNameValueProperty { + get { + return this.attributeNameValuePropertyField; + } + set { + this.attributeNameValuePropertyField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class AttributeValueType { + + private bool mandatoryField; + + private bool mandatoryFieldSpecified; + + private string typeField; + + private string valueField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public bool mandatory { + get { + return this.mandatoryField; + } + set { + this.mandatoryField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool mandatorySpecified { + get { + return this.mandatoryFieldSpecified; + } + set { + this.mandatoryFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string type { + get { + return this.typeField; + } + set { + this.typeField = value; + } + } + + /// + [System.Xml.Serialization.XmlTextAttribute()] + public string Value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class AttributeNameValuePropertyType { + + private string valueField; + + private string sourceField; + + private string sourceAttributeNameField; + + private System.Nullable mandatoryField; + + private System.Nullable overridableField; + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + + /// + public string source { + get { + return this.sourceField; + } + set { + this.sourceField = value; + } + } + + /// + public string sourceAttributeName { + get { + return this.sourceAttributeNameField; + } + set { + this.sourceAttributeNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public System.Nullable mandatory { + get { + return this.mandatoryField; + } + set { + this.mandatoryField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public System.Nullable overridable { + get { + return this.overridableField; + } + set { + this.overridableField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class PollingTimeType { + + private int nextUpdateHoursField; + + /// + public int nextUpdateHours { + get { + return this.nextUpdateHoursField; + } + set { + this.nextUpdateHoursField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class PollingPolicyType { + + private PollingTimeType gatewayPollingTimeField; + + private System.Xml.XmlElement[] anyField; + + /// + public PollingTimeType gatewayPollingTime { + get { + return this.gatewayPollingTimeField; + } + set { + this.gatewayPollingTimeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class DirectoryInfoType { + + private string directoryTypeField; + + private string domainNameField; + + private string itemField; + + private ItemChoiceType itemElementNameField; + + private System.Xml.XmlElement[] anyField; + + /// + public string directoryType { + get { + return this.directoryTypeField; + } + set { + this.directoryTypeField = value; + } + } + + /// + public string domainName { + get { + return this.domainNameField; + } + set { + this.domainNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("hostName", typeof(string))] + [System.Xml.Serialization.XmlElementAttribute("ipAddress", typeof(string))] + [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemElementName")] + public string Item { + get { + return this.itemField; + } + set { + this.itemField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public ItemChoiceType ItemElementName { + get { + return this.itemElementNameField; + } + set { + this.itemElementNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy", IncludeInSchema=false)] + public enum ItemChoiceType { + + /// + hostName, + + /// + ipAddress, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class AuthorizationInfoType { + + private string[] userAuthorizationCollectionField; + + private DirectoryInfoType directoryInfoField; + + private System.Xml.XmlElement[] anyField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("authorizedGroup", IsNullable=false)] + public string[] userAuthorizationCollection { + get { + return this.userAuthorizationCollectionField; + } + set { + this.userAuthorizationCollectionField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public DirectoryInfoType directoryInfo { + get { + return this.directoryInfoField; + } + set { + this.directoryInfoField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class RAPolicy { + + private bool registerUserField; + + private bool verifyUserField; + + private PublishCert publishCertField; + + private AuthorizationInfoType[] authorizationInfoField; + + private PollingPolicyType pollingPolicyField; + + private System.Xml.XmlElement[] anyField; + + /// + public bool registerUser { + get { + return this.registerUserField; + } + set { + this.registerUserField = value; + } + } + + /// + public bool verifyUser { + get { + return this.verifyUserField; + } + set { + this.verifyUserField = value; + } + } + + /// + public PublishCert publishCert { + get { + return this.publishCertField; + } + set { + this.publishCertField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("authorizationInfo")] + public AuthorizationInfoType[] authorizationInfo { + get { + return this.authorizationInfoField; + } + set { + this.authorizationInfoField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public PollingPolicyType pollingPolicy { + get { + return this.pollingPolicyField; + } + set { + this.pollingPolicyField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public enum PublishCert { + + /// + yes, + + /// + no, + + /// + clientProvided, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class ServiceEndpointType { + + private string typeField; + + private string endpointURIField; + + private System.Xml.XmlElement[] anyField; + + /// + public string type { + get { + return this.typeField; + } + set { + this.typeField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="anyURI")] + public string endpointURI { + get { + return this.endpointURIField; + } + set { + this.endpointURIField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class PersonalInfoType { + + private string nameField; + + private string emailField; + + private string phoneField; + + private System.Xml.XmlElement[] anyField; + + /// + public string name { + get { + return this.nameField; + } + set { + this.nameField = value; + } + } + + /// + public string email { + get { + return this.emailField; + } + set { + this.emailField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string phone { + get { + return this.phoneField; + } + set { + this.phoneField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class SystemInformation { + + private AttributeNameValuePairType[] searchCertificateDataField; + + private PublishCert cACertPublishField; + + private bool cACertPublishFieldSpecified; + + private CACertPublishNameValuePair cACertPublishNameValuePairField; + + private bool cACertPublishNameValuePairFieldSpecified; + + private DeliveryFormat certificateDeliveryFormatField; + + private PersonalInfoType adminInfoField; + + private ServiceEndpointType[] serviceEndpointListField; + + private string duplicateCertPolicyField; + + private string supersededPolicyOIDField; + + private System.Xml.XmlElement[] anyField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("searchAttributeNameValuePair", IsNullable=false)] + public AttributeNameValuePairType[] searchCertificateData { + get { + return this.searchCertificateDataField; + } + set { + this.searchCertificateDataField = value; + } + } + + /// + public PublishCert cACertPublish { + get { + return this.cACertPublishField; + } + set { + this.cACertPublishField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool cACertPublishSpecified { + get { + return this.cACertPublishFieldSpecified; + } + set { + this.cACertPublishFieldSpecified = value; + } + } + + /// + public CACertPublishNameValuePair cACertPublishNameValuePair { + get { + return this.cACertPublishNameValuePairField; + } + set { + this.cACertPublishNameValuePairField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool cACertPublishNameValuePairSpecified { + get { + return this.cACertPublishNameValuePairFieldSpecified; + } + set { + this.cACertPublishNameValuePairFieldSpecified = value; + } + } + + /// + public DeliveryFormat certificateDeliveryFormat { + get { + return this.certificateDeliveryFormatField; + } + set { + this.certificateDeliveryFormatField = value; + } + } + + /// + public PersonalInfoType adminInfo { + get { + return this.adminInfoField; + } + set { + this.adminInfoField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + [System.Xml.Serialization.XmlArrayItemAttribute("serviceEndpoint", IsNullable=false)] + public ServiceEndpointType[] serviceEndpointList { + get { + return this.serviceEndpointListField; + } + set { + this.serviceEndpointListField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string duplicateCertPolicy { + get { + return this.duplicateCertPolicyField; + } + set { + this.duplicateCertPolicyField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string supersededPolicyOID { + get { + return this.supersededPolicyOIDField; + } + set { + this.supersededPolicyOIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class AttributeNameValuePairType { + + private string attributeNameField; + + private AttributeValueType attributeNameValueField; + + private AttributeNameValuePropertyType attributeNameValuePropertyField; + + /// + public string attributeName { + get { + return this.attributeNameField; + } + set { + this.attributeNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public AttributeValueType attributeNameValue { + get { + return this.attributeNameValueField; + } + set { + this.attributeNameValueField = value; + } + } + + /// + public AttributeNameValuePropertyType attributeNameValueProperty { + get { + return this.attributeNameValuePropertyField; + } + set { + this.attributeNameValuePropertyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public enum CACertPublishNameValuePair { + + /// + [System.Xml.Serialization.XmlEnumAttribute("$publish_flag")] + publish_flag, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public enum DeliveryFormat { + + /// + [System.Xml.Serialization.XmlEnumAttribute("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X5" + + "09v3")] + httpdocsoasisopenorgwss200401oasis200401wssx509tokenprofile10X509v3, + + /// + [System.Xml.Serialization.XmlEnumAttribute("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#PK" + + "CS7")] + httpdocsoasisopenorgwss200401oasis200401wssx509tokenprofile10PKCS7, + + /// + [System.Xml.Serialization.XmlEnumAttribute("http://schemas.verisign.com/pkiservices/2009/07/PKCS12")] + httpschemasverisigncompkiservices200907PKCS12, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class ClientPolicy { + + private string clientNameField; + + private int maxPinLengthField; + + private bool maxPinLengthFieldSpecified; + + private int minPinLengthField; + + private bool minPinLengthFieldSpecified; + + private int noOfBadAttemptsField; + + private bool noOfBadAttemptsFieldSpecified; + + private int certRenewalOverlapField; + + private bool certRenewalOverlapFieldSpecified; + + private bool renewExpiredCertsField; + + private bool renewExpiredCertsFieldSpecified; + + private string certRenewalMsgField; + + private bool certCleanUpField; + + private bool certCleanUpFieldSpecified; + + private PublishCert certPublishField; + + private System.Xml.XmlElement[] anyField; + + /// + public string clientName { + get { + return this.clientNameField; + } + set { + this.clientNameField = value; + } + } + + /// + public int maxPinLength { + get { + return this.maxPinLengthField; + } + set { + this.maxPinLengthField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool maxPinLengthSpecified { + get { + return this.maxPinLengthFieldSpecified; + } + set { + this.maxPinLengthFieldSpecified = value; + } + } + + /// + public int minPinLength { + get { + return this.minPinLengthField; + } + set { + this.minPinLengthField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool minPinLengthSpecified { + get { + return this.minPinLengthFieldSpecified; + } + set { + this.minPinLengthFieldSpecified = value; + } + } + + /// + public int noOfBadAttempts { + get { + return this.noOfBadAttemptsField; + } + set { + this.noOfBadAttemptsField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool noOfBadAttemptsSpecified { + get { + return this.noOfBadAttemptsFieldSpecified; + } + set { + this.noOfBadAttemptsFieldSpecified = value; + } + } + + /// + public int certRenewalOverlap { + get { + return this.certRenewalOverlapField; + } + set { + this.certRenewalOverlapField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool certRenewalOverlapSpecified { + get { + return this.certRenewalOverlapFieldSpecified; + } + set { + this.certRenewalOverlapFieldSpecified = value; + } + } + + /// + public bool renewExpiredCerts { + get { + return this.renewExpiredCertsField; + } + set { + this.renewExpiredCertsField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool renewExpiredCertsSpecified { + get { + return this.renewExpiredCertsFieldSpecified; + } + set { + this.renewExpiredCertsFieldSpecified = value; + } + } + + /// + public string certRenewalMsg { + get { + return this.certRenewalMsgField; + } + set { + this.certRenewalMsgField = value; + } + } + + /// + public bool certCleanUp { + get { + return this.certCleanUpField; + } + set { + this.certCleanUpField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool certCleanUpSpecified { + get { + return this.certCleanUpFieldSpecified; + } + set { + this.certCleanUpFieldSpecified = value; + } + } + + /// + public PublishCert certPublish { + get { + return this.certPublishField; + } + set { + this.certPublishField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class KeyEscrowPolicyType { + + private bool keyEscrowEnabledField; + + private bool keyRecoveryDualAdminApprovalRequiredField; + + private bool keyRecoveryDualAdminApprovalRequiredFieldSpecified; + + private string keyEscrowDeploymentModeField; + + private System.Nullable doKeyRecoveryForAdditionalEnrollRequestField; + + private System.Xml.XmlElement[] anyField; + + /// + public bool keyEscrowEnabled { + get { + return this.keyEscrowEnabledField; + } + set { + this.keyEscrowEnabledField = value; + } + } + + /// + public bool keyRecoveryDualAdminApprovalRequired { + get { + return this.keyRecoveryDualAdminApprovalRequiredField; + } + set { + this.keyRecoveryDualAdminApprovalRequiredField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool keyRecoveryDualAdminApprovalRequiredSpecified { + get { + return this.keyRecoveryDualAdminApprovalRequiredFieldSpecified; + } + set { + this.keyRecoveryDualAdminApprovalRequiredFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public string keyEscrowDeploymentMode { + get { + return this.keyEscrowDeploymentModeField; + } + set { + this.keyEscrowDeploymentModeField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public System.Nullable doKeyRecoveryForAdditionalEnrollRequest { + get { + return this.doKeyRecoveryForAdditionalEnrollRequestField; + } + set { + this.doKeyRecoveryForAdditionalEnrollRequestField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class PrivateKeyInfo { + + private int keysizeField; + + private KeyEscrowPolicyType keyEscrowPolicyField; + + private bool keyexportableField; + + private bool keyprotectField; + + private bool keyprotectFieldSpecified; + + private System.Nullable algorithmOIDReferenceField; + + private string[] cryptoProvidersField; + + /// + public int keysize { + get { + return this.keysizeField; + } + set { + this.keysizeField = value; + } + } + + /// + public KeyEscrowPolicyType keyEscrowPolicy { + get { + return this.keyEscrowPolicyField; + } + set { + this.keyEscrowPolicyField = value; + } + } + + /// + public bool keyexportable { + get { + return this.keyexportableField; + } + set { + this.keyexportableField = value; + } + } + + /// + public bool keyprotect { + get { + return this.keyprotectField; + } + set { + this.keyprotectField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool keyprotectSpecified { + get { + return this.keyprotectFieldSpecified; + } + set { + this.keyprotectFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public System.Nullable algorithmOIDReference { + get { + return this.algorithmOIDReferenceField; + } + set { + this.algorithmOIDReferenceField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + [System.Xml.Serialization.XmlArrayItemAttribute("provider", IsNullable=false)] + public string[] cryptoProviders { + get { + return this.cryptoProvidersField; + } + set { + this.cryptoProvidersField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class extensionValueType { + + private bool mandatoryField; + + private bool mandatoryFieldSpecified; + + private string typeField; + + private string valueField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public bool mandatory { + get { + return this.mandatoryField; + } + set { + this.mandatoryField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool mandatorySpecified { + get { + return this.mandatoryFieldSpecified; + } + set { + this.mandatoryFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string type { + get { + return this.typeField; + } + set { + this.typeField = value; + } + } + + /// + [System.Xml.Serialization.XmlTextAttribute()] + public string Value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class extensionSyntax { + + private object[] itemsField; + + private System.Xml.XmlElement[] anyField; + + /// + [System.Xml.Serialization.XmlElementAttribute("extensionAttributeNameValuePair", typeof(AttributeNameValuePairType))] + [System.Xml.Serialization.XmlElementAttribute("extensionValue", typeof(extensionValueType))] + public object[] Items { + get { + return this.itemsField; + } + set { + this.itemsField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class Extension { + + private int extensionOIDReferenceField; + + private bool extensionCriticalFlagField; + + private extensionSyntax extensionSyntaxField; + + /// + public int extensionOIDReference { + get { + return this.extensionOIDReferenceField; + } + set { + this.extensionOIDReferenceField = value; + } + } + + /// + public bool extensionCriticalFlag { + get { + return this.extensionCriticalFlagField; + } + set { + this.extensionCriticalFlagField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public extensionSyntax extensionSyntax { + get { + return this.extensionSyntaxField; + } + set { + this.extensionSyntaxField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class subjectNameAttribute { + + private System.Nullable subjectNameAttributecountField; + + private AttributeNameValuePairType[] subjectNameAttributeNameValuePairField; + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public System.Nullable subjectNameAttributecount { + get { + return this.subjectNameAttributecountField; + } + set { + this.subjectNameAttributecountField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("subjectNameAttributeNameValuePair")] + public AttributeNameValuePairType[] subjectNameAttributeNameValuePair { + get { + return this.subjectNameAttributeNameValuePairField; + } + set { + this.subjectNameAttributeNameValuePairField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class subjectName { + + private subjectNameAttribute[] subjectNameAttributeField; + + private bool overrideSubjectNameFormatField; + + private System.Xml.XmlElement[] anyField; + + /// + [System.Xml.Serialization.XmlElementAttribute("subjectNameAttribute")] + public subjectNameAttribute[] subjectNameAttribute { + get { + return this.subjectNameAttributeField; + } + set { + this.subjectNameAttributeField = value; + } + } + + /// + public bool overrideSubjectNameFormat { + get { + return this.overrideSubjectNameFormatField; + } + set { + this.overrideSubjectNameFormatField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class OverrideValidity { + + private bool overrideFlagField; + + private bool overrideFlagFieldSpecified; + + private validityNameValuePairNames[] overrideNameValuePairField; + + /// + public bool overrideFlag { + get { + return this.overrideFlagField; + } + set { + this.overrideFlagField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool overrideFlagSpecified { + get { + return this.overrideFlagFieldSpecified; + } + set { + this.overrideFlagFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("overrideNameValuePair")] + public validityNameValuePairNames[] overrideNameValuePair { + get { + return this.overrideNameValuePairField; + } + set { + this.overrideNameValuePairField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public enum validityNameValuePairNames { + + /// + [System.Xml.Serialization.XmlEnumAttribute("$overrideValidityDays")] + overrideValidityDays, + + /// + [System.Xml.Serialization.XmlEnumAttribute("$overrideValidityStartDate")] + overrideValidityStartDate, + + /// + [System.Xml.Serialization.XmlEnumAttribute("$overrideValidityEndDate")] + overrideValidityEndDate, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class CertificateValidity { + + private ulong validityPeriodDaysField; + + private ulong renewalPeriodDaysField; + + /// + public ulong validityPeriodDays { + get { + return this.validityPeriodDaysField; + } + set { + this.validityPeriodDaysField = value; + } + } + + /// + public ulong renewalPeriodDays { + get { + return this.renewalPeriodDaysField; + } + set { + this.renewalPeriodDaysField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class Attributes { + + private int policySchemaField; + + private CertificateValidity certificateValidityField; + + private OverrideValidity certificateOverrideValidityField; + + private subjectName subjectNameInfoField; + + private Extension[] extensionsField; + + private PrivateKeyInfo privateKeyAttributesField; + + private ClientPolicy clientPolicyField; + + private SystemInformation systemInfoField; + + private RAPolicy rAPolicyField; + + private SeatInfoType seatIdInfoField; + + private ApplicationInstructionsType applicationInstructionsField; + + private string deploymentModeField; + + private string statusField; + + private MigrationOIDCollection migrationOIDsField; + + private System.Xml.XmlElement[] anyField; + + /// + public int policySchema { + get { + return this.policySchemaField; + } + set { + this.policySchemaField = value; + } + } + + /// + public CertificateValidity certificateValidity { + get { + return this.certificateValidityField; + } + set { + this.certificateValidityField = value; + } + } + + /// + public OverrideValidity certificateOverrideValidity { + get { + return this.certificateOverrideValidityField; + } + set { + this.certificateOverrideValidityField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public subjectName subjectNameInfo { + get { + return this.subjectNameInfoField; + } + set { + this.subjectNameInfoField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + [System.Xml.Serialization.XmlArrayItemAttribute(IsNullable=false)] + public Extension[] extensions { + get { + return this.extensionsField; + } + set { + this.extensionsField = value; + } + } + + /// + public PrivateKeyInfo privateKeyAttributes { + get { + return this.privateKeyAttributesField; + } + set { + this.privateKeyAttributesField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public ClientPolicy clientPolicy { + get { + return this.clientPolicyField; + } + set { + this.clientPolicyField = value; + } + } + + /// + public SystemInformation systemInfo { + get { + return this.systemInfoField; + } + set { + this.systemInfoField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public RAPolicy rAPolicy { + get { + return this.rAPolicyField; + } + set { + this.rAPolicyField = value; + } + } + + /// + public SeatInfoType seatIdInfo { + get { + return this.seatIdInfoField; + } + set { + this.seatIdInfoField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public ApplicationInstructionsType applicationInstructions { + get { + return this.applicationInstructionsField; + } + set { + this.applicationInstructionsField = value; + } + } + + /// + public string deploymentMode { + get { + return this.deploymentModeField; + } + set { + this.deploymentModeField = value; + } + } + + /// + public string status { + get { + return this.statusField; + } + set { + this.statusField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public MigrationOIDCollection migrationOIDs { + get { + return this.migrationOIDsField; + } + set { + this.migrationOIDsField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class CertificateEnrollmentPolicy { + + private int policyOIDReferenceField; + + private int[] cAsField; + + private Attributes attributesField; + + /// + public int policyOIDReference { + get { + return this.policyOIDReferenceField; + } + set { + this.policyOIDReferenceField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("cAReference", IsNullable=false)] + public int[] cAs { + get { + return this.cAsField; + } + set { + this.cAsField = value; + } + } + + /// + public Attributes attributes { + get { + return this.attributesField; + } + set { + this.attributesField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class Response { + + private string policyIDField; + + private string policyFriendlyNameField; + + private System.Nullable nextUpdateHoursField; + + private bool policiesNotChangedField; + + private CertificateEnrollmentPolicy[] policiesField; + + private System.Xml.XmlElement[] anyField; + + /// + public string policyID { + get { + return this.policyIDField; + } + set { + this.policyIDField = value; + } + } + + /// + public string policyFriendlyName { + get { + return this.policyFriendlyNameField; + } + set { + this.policyFriendlyNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] + public System.Nullable nextUpdateHours { + get { + return this.nextUpdateHoursField; + } + set { + this.nextUpdateHoursField = value; + } + } + + /// + public bool policiesNotChanged { + get { + return this.policiesNotChangedField; + } + set { + this.policiesNotChangedField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + [System.Xml.Serialization.XmlArrayItemAttribute("policy", IsNullable=false)] + public CertificateEnrollmentPolicy[] policies { + get { + return this.policiesField; + } + set { + this.policiesField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class RequestFilter { + + private string[] policyIDsField; + + private System.Xml.XmlElement[] anyField; + + /// + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + [System.Xml.Serialization.XmlArrayItemAttribute("oid", IsNullable=false)] + public string[] policyIDs { + get { + return this.policyIDsField; + } + set { + this.policyIDsField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.verisign.com/pkiservices/2009/07/policy")] + public partial class getPoliciesResponse { + + private string clientTransactionIDField; + + private string serverTransactionIDField; + + private Response responseField; + + private CA[] cAsField; + + private OID[] oIDsField; + + private byte[] signedEnrollmentPolicyField; + + /// + public string clientTransactionID { + get { + return this.clientTransactionIDField; + } + set { + this.clientTransactionIDField = value; + } + } + + /// + public string serverTransactionID { + get { + return this.serverTransactionIDField; + } + set { + this.serverTransactionIDField = value; + } + } + + /// + public Response response { + get { + return this.responseField; + } + set { + this.responseField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + [System.Xml.Serialization.XmlArrayItemAttribute("cA", IsNullable=false)] + public CA[] cAs { + get { + return this.cAsField; + } + set { + this.cAsField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] + [System.Xml.Serialization.XmlArrayItemAttribute("oID", IsNullable=false)] + public OID[] oIDs { + get { + return this.oIDsField; + } + set { + this.oIDsField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] + public byte[] signedEnrollmentPolicy { + get { + return this.signedEnrollmentPolicyField; + } + set { + this.signedEnrollmentPolicyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + public delegate void requestPoliciesCompletedEventHandler(object sender, requestPoliciesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class requestPoliciesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal requestPoliciesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public getPoliciesResponse Result { + get { + this.RaiseExceptionIfNecessary(); + return ((getPoliciesResponse)(this.results[0])); + } + } + } +} + +#pragma warning restore 1591 \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/policyService/Reference.map b/utils/ipn_sqlclr/Web References/policyService/Reference.map new file mode 100644 index 0000000..104777c --- /dev/null +++ b/utils/ipn_sqlclr/Web References/policyService/Reference.map @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/policyService/getPoliciesResponse.datasource b/utils/ipn_sqlclr/Web References/policyService/getPoliciesResponse.datasource new file mode 100644 index 0000000..ab499c5 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/policyService/getPoliciesResponse.datasource @@ -0,0 +1,10 @@ + + + + taggantWrapper.policyService.getPoliciesResponse, Web References.policyService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/signDataService/PrepSignDataResponse.datasource b/utils/ipn_sqlclr/Web References/signDataService/PrepSignDataResponse.datasource new file mode 100644 index 0000000..5132a84 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/signDataService/PrepSignDataResponse.datasource @@ -0,0 +1,10 @@ + + + + taggantWrapper.signDataService.PrepSignDataResponse, Web References.signDataService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/signDataService/Reference.cs b/utils/ipn_sqlclr/Web References/signDataService/Reference.cs new file mode 100644 index 0000000..6bac516 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/signDataService/Reference.cs @@ -0,0 +1,793 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// +// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.34014. +// + +using System.Security.Cryptography.X509Certificates; + +#pragma warning disable 1591 + +namespace signDataService { + using System; + using System.Web.Services; + using System.Diagnostics; + using System.Web.Services.Protocols; + using System.Xml.Serialization; + using System.ComponentModel; + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Web.Services.WebServiceBindingAttribute(Name="signDataServiceSOAP", Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] + public partial class signDataService : System.Web.Services.Protocols.SoapHttpClientProtocol { + + private System.Threading.SendOrPostCallback prepSignDataOperationCompleted; + + private System.Threading.SendOrPostCallback verifySignedDataOperationCompleted; + + private System.Threading.SendOrPostCallback noOpOperationCompleted; + + private bool useDefaultCredentialsSetExplicitly; + + /// + public signDataService(X509Certificate clientCert, string url) + { + this.Url = url; + ClientCertificates.Add(clientCert); + } + + public new string Url { + get { + return base.Url; + } + set { + if ((((this.IsLocalFileSystemWebService(base.Url) == true) + && (this.useDefaultCredentialsSetExplicitly == false)) + && (this.IsLocalFileSystemWebService(value) == false))) { + base.UseDefaultCredentials = false; + } + base.Url = value; + } + } + + public new bool UseDefaultCredentials { + get { + return base.UseDefaultCredentials; + } + set { + base.UseDefaultCredentials = value; + this.useDefaultCredentialsSetExplicitly = true; + } + } + + /// + public event prepSignDataCompletedEventHandler prepSignDataCompleted; + + /// + public event verifySignedDataCompletedEventHandler verifySignedDataCompleted; + + /// + public event noOpCompletedEventHandler noOpCompleted; + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.symantec.com/pkiservices/2011/11/sign/signDataOperations/prepSignD" + + "ataRequest", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)] + [return: System.Xml.Serialization.XmlElementAttribute("PrepSignDataResponse", Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] + public PrepSignDataResponse prepSignData([System.Xml.Serialization.XmlElementAttribute(Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] PrepSignDataRequest PrepSignDataRequest) { + object[] results = this.Invoke("prepSignData", new object[] { + PrepSignDataRequest}); + return ((PrepSignDataResponse)(results[0])); + } + + /// + public void prepSignDataAsync(PrepSignDataRequest PrepSignDataRequest) { + this.prepSignDataAsync(PrepSignDataRequest, null); + } + + /// + public void prepSignDataAsync(PrepSignDataRequest PrepSignDataRequest, object userState) { + if ((this.prepSignDataOperationCompleted == null)) { + this.prepSignDataOperationCompleted = new System.Threading.SendOrPostCallback(this.OnprepSignDataOperationCompleted); + } + this.InvokeAsync("prepSignData", new object[] { + PrepSignDataRequest}, this.prepSignDataOperationCompleted, userState); + } + + private void OnprepSignDataOperationCompleted(object arg) { + if ((this.prepSignDataCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.prepSignDataCompleted(this, new prepSignDataCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.symantec.com/pkiservices/2011/11/sign/signDataOperations/verifySig" + + "nedDataRequest", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)] + [return: System.Xml.Serialization.XmlElementAttribute("VerifySignedDataResponse", Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] + public VerifySignedDataResponse verifySignedData([System.Xml.Serialization.XmlElementAttribute(Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] VerifySignedDataRequest VerifySignedDataRequest) { + object[] results = this.Invoke("verifySignedData", new object[] { + VerifySignedDataRequest}); + return ((VerifySignedDataResponse)(results[0])); + } + + /// + public void verifySignedDataAsync(VerifySignedDataRequest VerifySignedDataRequest) { + this.verifySignedDataAsync(VerifySignedDataRequest, null); + } + + /// + public void verifySignedDataAsync(VerifySignedDataRequest VerifySignedDataRequest, object userState) { + if ((this.verifySignedDataOperationCompleted == null)) { + this.verifySignedDataOperationCompleted = new System.Threading.SendOrPostCallback(this.OnverifySignedDataOperationCompleted); + } + this.InvokeAsync("verifySignedData", new object[] { + VerifySignedDataRequest}, this.verifySignedDataOperationCompleted, userState); + } + + private void OnverifySignedDataOperationCompleted(object arg) { + if ((this.verifySignedDataCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.verifySignedDataCompleted(this, new verifySignedDataCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.symantec.com/pkiservices/2011/11/sign/signDataOperations/noOpReque" + + "st", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)] + [return: System.Xml.Serialization.XmlElementAttribute("ToBeSignedClientPKCS7BlobType", Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] + public ToBeSignedClientPKCS7BlobType noOp([System.Xml.Serialization.XmlElementAttribute(Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] ToBeSignedPKCS7BlobType ToBeSignedPKCS7BlobType) { + object[] results = this.Invoke("noOp", new object[] { + ToBeSignedPKCS7BlobType}); + return ((ToBeSignedClientPKCS7BlobType)(results[0])); + } + + /// + public void noOpAsync(ToBeSignedPKCS7BlobType ToBeSignedPKCS7BlobType) { + this.noOpAsync(ToBeSignedPKCS7BlobType, null); + } + + /// + public void noOpAsync(ToBeSignedPKCS7BlobType ToBeSignedPKCS7BlobType, object userState) { + if ((this.noOpOperationCompleted == null)) { + this.noOpOperationCompleted = new System.Threading.SendOrPostCallback(this.OnnoOpOperationCompleted); + } + this.InvokeAsync("noOp", new object[] { + ToBeSignedPKCS7BlobType}, this.noOpOperationCompleted, userState); + } + + private void OnnoOpOperationCompleted(object arg) { + if ((this.noOpCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.noOpCompleted(this, new noOpCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + public new void CancelAsync(object userState) { + base.CancelAsync(userState); + } + + private bool IsLocalFileSystemWebService(string url) { + if (((url == null) + || (url == string.Empty))) { + return false; + } + System.Uri wsUri = new System.Uri(url); + if (((wsUri.Port >= 1024) + && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) { + return true; + } + return false; + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] + public partial class PrepSignDataRequest { + + private string clientTransactionIDField; + + private SignDataInfoType signDataInfoField; + + private byte[] toBeSignDataField; + + private string versionField; + + /// + public string clientTransactionID { + get { + return this.clientTransactionIDField; + } + set { + this.clientTransactionIDField = value; + } + } + + /// + public SignDataInfoType signDataInfo { + get { + return this.signDataInfoField; + } + set { + this.signDataInfoField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] + public byte[] toBeSignData { + get { + return this.toBeSignDataField; + } + set { + this.toBeSignDataField = value; + } + } + + /// + public string version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] + public partial class SignDataInfoType { + + private string descriptionField; + + private CertificateFilterType certificateFilterField; + + private HashAlgorithmType hashAlgorithmField; + + private string urlFilterField; + + /// + public string description { + get { + return this.descriptionField; + } + set { + this.descriptionField = value; + } + } + + /// + public CertificateFilterType certificateFilter { + get { + return this.certificateFilterField; + } + set { + this.certificateFilterField = value; + } + } + + /// + public HashAlgorithmType hashAlgorithm { + get { + return this.hashAlgorithmField; + } + set { + this.hashAlgorithmField = value; + } + } + + /// + public string urlFilter { + get { + return this.urlFilterField; + } + set { + this.urlFilterField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] + public partial class CertificateFilterType { + + private string[] profileIDFilterSetField; + + private UserFilterType[] userFilterSetField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("profileOID", IsNullable=false)] + public string[] profileIDFilterSet { + get { + return this.profileIDFilterSetField; + } + set { + this.profileIDFilterSetField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("userFilter", IsNullable=false)] + public UserFilterType[] userFilterSet { + get { + return this.userFilterSetField; + } + set { + this.userFilterSetField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] + public partial class UserFilterType { + + private UserAttributeNameType userAttributeNameField; + + private string userAttributeValueField; + + private bool ignoreCaseField; + + private bool ignoreCaseFieldSpecified; + + /// + public UserAttributeNameType userAttributeName { + get { + return this.userAttributeNameField; + } + set { + this.userAttributeNameField = value; + } + } + + /// + public string userAttributeValue { + get { + return this.userAttributeValueField; + } + set { + this.userAttributeValueField = value; + } + } + + /// + public bool ignoreCase { + get { + return this.ignoreCaseField; + } + set { + this.ignoreCaseField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ignoreCaseSpecified { + get { + return this.ignoreCaseFieldSpecified; + } + set { + this.ignoreCaseFieldSpecified = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] + public enum UserAttributeNameType { + + /// + CN, + + /// + Email, + + /// + UID, + + /// + rfc822Name, + + /// + UPN, + + /// + DNSName, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] + public enum HashAlgorithmType { + + /// + sha512, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] + public partial class PrepSignDataResponse { + + private string clientTransactionIDField; + + private string serverTransactionIDField; + + private byte[] pkcs7SignedBlobField; + + private string versionField; + + /// + public string clientTransactionID { + get { + return this.clientTransactionIDField; + } + set { + this.clientTransactionIDField = value; + } + } + + /// + public string serverTransactionID { + get { + return this.serverTransactionIDField; + } + set { + this.serverTransactionIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] + public byte[] pkcs7SignedBlob { + get { + return this.pkcs7SignedBlobField; + } + set { + this.pkcs7SignedBlobField = value; + } + } + + /// + public string version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] + public partial class VerifySignedDataRequest { + + private string clientTransactionIDField; + + private byte[] clientPkcs7SignedBlobField; + + private string versionField; + + /// + public string clientTransactionID { + get { + return this.clientTransactionIDField; + } + set { + this.clientTransactionIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] + public byte[] clientPkcs7SignedBlob { + get { + return this.clientPkcs7SignedBlobField; + } + set { + this.clientPkcs7SignedBlobField = value; + } + } + + /// + public string version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] + public partial class VerifySignedDataResponse { + + private string clientTransactionIDField; + + private string serverTransactionIDField; + + private StatusType statusField; + + private string versionField; + + /// + public string clientTransactionID { + get { + return this.clientTransactionIDField; + } + set { + this.clientTransactionIDField = value; + } + } + + /// + public string serverTransactionID { + get { + return this.serverTransactionIDField; + } + set { + this.serverTransactionIDField = value; + } + } + + /// + public StatusType status { + get { + return this.statusField; + } + set { + this.statusField = value; + } + } + + /// + public string version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] + public enum StatusType { + + /// + SUCCESS, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] + public partial class ToBeSignedPKCS7BlobType { + + private SignDataInfoType signDataInfoField; + + private string organizationField; + + private string requestIdField; + + private byte[] hashValueField; + + private string versionField; + + /// + public SignDataInfoType signDataInfo { + get { + return this.signDataInfoField; + } + set { + this.signDataInfoField = value; + } + } + + /// + public string organization { + get { + return this.organizationField; + } + set { + this.organizationField = value; + } + } + + /// + public string requestId { + get { + return this.requestIdField; + } + set { + this.requestIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] + public byte[] hashValue { + get { + return this.hashValueField; + } + set { + this.hashValueField = value; + } + } + + /// + public string version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://schemas.symantec.com/pkiservices/2011/11/sign")] + public partial class ToBeSignedClientPKCS7BlobType { + + private byte[] pkcs7SignedBlobField; + + private byte[] toBeSignDataField; + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] + public byte[] pkcs7SignedBlob { + get { + return this.pkcs7SignedBlobField; + } + set { + this.pkcs7SignedBlobField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] + public byte[] toBeSignData { + get { + return this.toBeSignDataField; + } + set { + this.toBeSignDataField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + public delegate void prepSignDataCompletedEventHandler(object sender, prepSignDataCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class prepSignDataCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal prepSignDataCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public PrepSignDataResponse Result { + get { + this.RaiseExceptionIfNecessary(); + return ((PrepSignDataResponse)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + public delegate void verifySignedDataCompletedEventHandler(object sender, verifySignedDataCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class verifySignedDataCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal verifySignedDataCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public VerifySignedDataResponse Result { + get { + this.RaiseExceptionIfNecessary(); + return ((VerifySignedDataResponse)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + public delegate void noOpCompletedEventHandler(object sender, noOpCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class noOpCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal noOpCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ToBeSignedClientPKCS7BlobType Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ToBeSignedClientPKCS7BlobType)(this.results[0])); + } + } + } +} + +#pragma warning restore 1591 \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/signDataService/Reference.map b/utils/ipn_sqlclr/Web References/signDataService/Reference.map new file mode 100644 index 0000000..5ee651a --- /dev/null +++ b/utils/ipn_sqlclr/Web References/signDataService/Reference.map @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/signDataService/SignerAPI.wsdl b/utils/ipn_sqlclr/Web References/signDataService/SignerAPI.wsdl new file mode 100644 index 0000000..0fcae8c --- /dev/null +++ b/utils/ipn_sqlclr/Web References/signDataService/SignerAPI.wsdl @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/signDataService/SignerAPI.xsd b/utils/ipn_sqlclr/Web References/signDataService/SignerAPI.xsd new file mode 100644 index 0000000..03a802a --- /dev/null +++ b/utils/ipn_sqlclr/Web References/signDataService/SignerAPI.xsd @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/signDataService/ToBeSignedClientPKCS7BlobType.datasource b/utils/ipn_sqlclr/Web References/signDataService/ToBeSignedClientPKCS7BlobType.datasource new file mode 100644 index 0000000..fa17ce7 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/signDataService/ToBeSignedClientPKCS7BlobType.datasource @@ -0,0 +1,10 @@ + + + + taggantWrapper.signDataService.ToBeSignedClientPKCS7BlobType, Web References.signDataService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/signDataService/VerifySignedDataResponse.datasource b/utils/ipn_sqlclr/Web References/signDataService/VerifySignedDataResponse.datasource new file mode 100644 index 0000000..de31f24 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/signDataService/VerifySignedDataResponse.datasource @@ -0,0 +1,10 @@ + + + + taggantWrapper.signDataService.VerifySignedDataResponse, Web References.signDataService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/userManagementService/Reference.map b/utils/ipn_sqlclr/Web References/userManagementService/Reference.map new file mode 100644 index 0000000..ab3e45d --- /dev/null +++ b/utils/ipn_sqlclr/Web References/userManagementService/Reference.map @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/userManagementService/UserManagementService.wsdl b/utils/ipn_sqlclr/Web References/userManagementService/UserManagementService.wsdl new file mode 100644 index 0000000..540ac2f --- /dev/null +++ b/utils/ipn_sqlclr/Web References/userManagementService/UserManagementService.wsdl @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/userManagementService/UserManagementService.xsd b/utils/ipn_sqlclr/Web References/userManagementService/UserManagementService.xsd new file mode 100644 index 0000000..b38e295 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/userManagementService/UserManagementService.xsd @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/Reference.cs b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/Reference.cs new file mode 100644 index 0000000..7b9754c --- /dev/null +++ b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/Reference.cs @@ -0,0 +1,1045 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34014 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// +// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.34014. +// + +using System.Security.Cryptography.X509Certificates; +using ipn_sqlclr; + +#pragma warning disable 1591 + +namespace veriSignCertIssuingService { + using System; + using System.Web.Services; + using System.Diagnostics; + using System.Web.Services.Protocols; + using System.Xml.Serialization; + using System.ComponentModel; + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Web.Services.WebServiceBindingAttribute(Name="veriSignCertIssuingServiceSOAP", Namespace="http://schemas.verisign.com/pkiservices/2009/07/enrollment")] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(AttributedString))] + public partial class veriSignCertIssuingService : XmlReaderSpyService + { + + private System.Threading.SendOrPostCallback RequestSecurityTokenOperationCompleted; + + private System.Threading.SendOrPostCallback RequestSecurityToken2OperationCompleted; + + /// + public veriSignCertIssuingService(X509Certificate clientCert, string url) + : base(clientCert, url) + { + } + + /// + public event RequestSecurityTokenCompletedEventHandler RequestSecurityTokenCompleted; + + /// + public event RequestSecurityToken2CompletedEventHandler RequestSecurityToken2Completed; + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.verisign.com/pkiservices/2009/07/enrollment/requestSecurityToken", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)] + [return: System.Xml.Serialization.XmlElementAttribute("RequestSecurityTokenResponse", Namespace="http://docs.oasis-open.org/ws-sx/ws-trust/200512/")] + public RequestSecurityTokenResponseType RequestSecurityToken([System.Xml.Serialization.XmlElementAttribute("RequestSecurityToken", Namespace="http://docs.oasis-open.org/ws-sx/ws-trust/200512/")] RequestSecurityTokenType RequestSecurityToken1) { + object[] results = this.Invoke("RequestSecurityToken", new object[] { + RequestSecurityToken1}); + return ((RequestSecurityTokenResponseType)(results[0])); + } + + /// + public void RequestSecurityTokenAsync(RequestSecurityTokenType RequestSecurityToken1) { + this.RequestSecurityTokenAsync(RequestSecurityToken1, null); + } + + /// + public void RequestSecurityTokenAsync(RequestSecurityTokenType RequestSecurityToken1, object userState) { + if ((this.RequestSecurityTokenOperationCompleted == null)) { + this.RequestSecurityTokenOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRequestSecurityTokenOperationCompleted); + } + this.InvokeAsync("RequestSecurityToken", new object[] { + RequestSecurityToken1}, this.RequestSecurityTokenOperationCompleted, userState); + } + + private void OnRequestSecurityTokenOperationCompleted(object arg) { + if ((this.RequestSecurityTokenCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.RequestSecurityTokenCompleted(this, new RequestSecurityTokenCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.verisign.com/pkiservices/2009/07/enrollment/requestSecurityToken2", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare)] + [return: System.Xml.Serialization.XmlElementAttribute("RequestSecurityTokenResponseCollection", Namespace="http://docs.oasis-open.org/ws-sx/ws-trust/200512/")] + public RequestSecurityTokenResponseCollectionType RequestSecurityToken2([System.Xml.Serialization.XmlElementAttribute("RequestSecurityToken", Namespace="http://docs.oasis-open.org/ws-sx/ws-trust/200512/")] RequestSecurityTokenType RequestSecurityToken1) { + object[] results = this.Invoke("RequestSecurityToken2", new object[] { + RequestSecurityToken1}); + return ((RequestSecurityTokenResponseCollectionType)(results[0])); + } + + /// + public void RequestSecurityToken2Async(RequestSecurityTokenType RequestSecurityToken1) { + this.RequestSecurityToken2Async(RequestSecurityToken1, null); + } + + /// + public void RequestSecurityToken2Async(RequestSecurityTokenType RequestSecurityToken1, object userState) { + if ((this.RequestSecurityToken2OperationCompleted == null)) { + this.RequestSecurityToken2OperationCompleted = new System.Threading.SendOrPostCallback(this.OnRequestSecurityToken2OperationCompleted); + } + this.InvokeAsync("RequestSecurityToken2", new object[] { + RequestSecurityToken1}, this.RequestSecurityToken2OperationCompleted, userState); + } + + private void OnRequestSecurityToken2OperationCompleted(object arg) { + if ((this.RequestSecurityToken2Completed != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.RequestSecurityToken2Completed(this, new RequestSecurityToken2CompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + public new void CancelAsync(object userState) { + base.CancelAsync(userState); + } + + private bool IsLocalFileSystemWebService(string url) { + if (((url == null) + || (url == string.Empty))) { + return false; + } + System.Uri wsUri = new System.Uri(url); + if (((wsUri.Port >= 1024) + && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) { + return true; + } + return false; + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://docs.oasis-open.org/ws-sx/ws-trust/200512/")] + public partial class RequestSecurityTokenType { + + private RequestVSSecurityTokenEnrollmentType itemField; + + private System.Xml.XmlElement[] anyField; + + private string contextField; + + private System.Xml.XmlAttribute[] anyAttrField; + + /// + [System.Xml.Serialization.XmlElementAttribute("requestVSSecurityToken", Namespace="http://schemas.verisign.com/pkiservices/2009/07/enrollment")] + public RequestVSSecurityTokenEnrollmentType Item { + get { + return this.itemField; + } + set { + this.itemField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")] + public string Context { + get { + return this.contextField; + } + set { + this.contextField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyAttributeAttribute()] + public System.Xml.XmlAttribute[] AnyAttr { + get { + return this.anyAttrField; + } + set { + this.anyAttrField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/enrollment")] + public partial class RequestVSSecurityTokenEnrollmentType { + + private string certificateProfileIDField; + + private string clientTransactionIDField; + + private TokenType tokenTypeField; + + private bool tokenTypeFieldSpecified; + + private RequestTypeEnum requestTypeField; + + private BinarySecurityTokenType[] binarySecurityTokenField; + + private AdditionalContextType additionalContextField; + + private string pendingTokenReferenceIDField; + + private NameValueType[] nameValuePairField; + + private string versionField; + + private System.Xml.XmlElement[] anyField; + + private string preferredLanguageField; + + private System.Xml.XmlAttribute[] anyAttrField; + + /// + public string certificateProfileID { + get { + return this.certificateProfileIDField; + } + set { + this.certificateProfileIDField = value; + } + } + + /// + public string clientTransactionID { + get { + return this.clientTransactionIDField; + } + set { + this.clientTransactionIDField = value; + } + } + + /// + public TokenType tokenType { + get { + return this.tokenTypeField; + } + set { + this.tokenTypeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool tokenTypeSpecified { + get { + return this.tokenTypeFieldSpecified; + } + set { + this.tokenTypeFieldSpecified = value; + } + } + + /// + public RequestTypeEnum requestType { + get { + return this.requestTypeField; + } + set { + this.requestTypeField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("binarySecurityToken")] + public BinarySecurityTokenType[] binarySecurityToken { + get { + return this.binarySecurityTokenField; + } + set { + this.binarySecurityTokenField = value; + } + } + + /// + public AdditionalContextType additionalContext { + get { + return this.additionalContextField; + } + set { + this.additionalContextField = value; + } + } + + /// + public string pendingTokenReferenceID { + get { + return this.pendingTokenReferenceIDField; + } + set { + this.pendingTokenReferenceIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("nameValuePair")] + public NameValueType[] nameValuePair { + get { + return this.nameValuePairField; + } + set { + this.nameValuePairField = value; + } + } + + /// + public string version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(DataType="language")] + public string preferredLanguage { + get { + return this.preferredLanguageField; + } + set { + this.preferredLanguageField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyAttributeAttribute()] + public System.Xml.XmlAttribute[] AnyAttr { + get { + return this.anyAttrField; + } + set { + this.anyAttrField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/enrollment")] + public enum TokenType { + + /// + [System.Xml.Serialization.XmlEnumAttribute("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X5" + + "09v3")] + httpdocsoasisopenorgwss200401oasis200401wssx509tokenprofile10X509v3, + + /// + [System.Xml.Serialization.XmlEnumAttribute("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#PK" + + "CS7")] + httpdocsoasisopenorgwss200401oasis200401wssx509tokenprofile10PKCS7, + + /// + [System.Xml.Serialization.XmlEnumAttribute("http://schemas.verisign.com/pkiservices/2009/07/PKCS12")] + httpschemasverisigncompkiservices200907PKCS12, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/enrollment")] + public enum RequestTypeEnum { + + /// + [System.Xml.Serialization.XmlEnumAttribute("http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue")] + httpdocsoasisopenorgwssxwstrust200512Issue, + + /// + [System.Xml.Serialization.XmlEnumAttribute("http://docs.oasis-open.org/ws-sx/ws-trust/200512/Renew")] + httpdocsoasisopenorgwssxwstrust200512Renew, + + /// + [System.Xml.Serialization.XmlEnumAttribute("http://schemas.verisign.com/pkiservices/2009/07/QueryTokenStatus")] + httpschemasverisigncompkiservices200907QueryTokenStatus, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" + + "")] + public partial class BinarySecurityTokenType : EncodedString { + + private string valueTypeField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")] + public string ValueType { + get { + return this.valueTypeField; + } + set { + this.valueTypeField = value; + } + } + } + + /// + [System.Xml.Serialization.XmlIncludeAttribute(typeof(KeyIdentifierType))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(BinarySecurityTokenType))] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" + + "")] + public partial class EncodedString : AttributedString { + + private string encodingTypeField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")] + public string EncodingType { + get { + return this.encodingTypeField; + } + set { + this.encodingTypeField = value; + } + } + } + + /// + [System.Xml.Serialization.XmlIncludeAttribute(typeof(EncodedString))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(KeyIdentifierType))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(BinarySecurityTokenType))] + [System.Xml.Serialization.XmlIncludeAttribute(typeof(PasswordString))] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" + + "")] + public partial class AttributedString { + + private string idField; + + private System.Xml.XmlAttribute[] anyAttrField; + + private string valueField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(Form=System.Xml.Schema.XmlSchemaForm.Qualified, Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xs" + + "d", DataType="ID")] + public string Id { + get { + return this.idField; + } + set { + this.idField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyAttributeAttribute()] + public System.Xml.XmlAttribute[] AnyAttr { + get { + return this.anyAttrField; + } + set { + this.anyAttrField = value; + } + } + + /// + [System.Xml.Serialization.XmlTextAttribute()] + public string Value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://docs.oasis-open.org/ws-sx/ws-trust/200512/")] + public partial class RequestSecurityTokenResponseCollectionType { + + private RequestSecurityTokenResponseType[] requestSecurityTokenResponseField; + + private System.Xml.XmlAttribute[] anyAttrField; + + /// + [System.Xml.Serialization.XmlElementAttribute("RequestSecurityTokenResponse")] + public RequestSecurityTokenResponseType[] RequestSecurityTokenResponse { + get { + return this.requestSecurityTokenResponseField; + } + set { + this.requestSecurityTokenResponseField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyAttributeAttribute()] + public System.Xml.XmlAttribute[] AnyAttr { + get { + return this.anyAttrField; + } + set { + this.anyAttrField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://docs.oasis-open.org/ws-sx/ws-trust/200512/")] + public partial class RequestSecurityTokenResponseType { + + private RequestVSSecurityTokenResponseEnrollmentType itemField; + + private System.Xml.XmlElement[] anyField; + + private string contextField; + + private System.Xml.XmlAttribute[] anyAttrField; + + /// + [System.Xml.Serialization.XmlElementAttribute("RequestVSSecurityTokenResponse", Namespace="http://schemas.verisign.com/pkiservices/2009/07/enrollment")] + public RequestVSSecurityTokenResponseEnrollmentType Item { + get { + return this.itemField; + } + set { + this.itemField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")] + public string Context { + get { + return this.contextField; + } + set { + this.contextField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyAttributeAttribute()] + public System.Xml.XmlAttribute[] AnyAttr { + get { + return this.anyAttrField; + } + set { + this.anyAttrField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/enrollment")] + public partial class RequestVSSecurityTokenResponseEnrollmentType { + + private string clientTransactionIDField; + + private string serverTransactionIDField; + + private TokenType tokenTypeField; + + private bool tokenTypeFieldSpecified; + + private string dispositionMessageField; + + private BinarySecurityTokenType binarySecurityTokenField; + + private RequestedVSSecurityTokenEnrollmentType requestedVSSecurityTokenField; + + private string versionField; + + private System.Xml.XmlElement[] anyField; + + private string preferredLanguageField; + + private System.Xml.XmlAttribute[] anyAttrField; + + /// + public string clientTransactionID { + get { + return this.clientTransactionIDField; + } + set { + this.clientTransactionIDField = value; + } + } + + /// + public string serverTransactionID { + get { + return this.serverTransactionIDField; + } + set { + this.serverTransactionIDField = value; + } + } + + /// + public TokenType tokenType { + get { + return this.tokenTypeField; + } + set { + this.tokenTypeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool tokenTypeSpecified { + get { + return this.tokenTypeFieldSpecified; + } + set { + this.tokenTypeFieldSpecified = value; + } + } + + /// + public string dispositionMessage { + get { + return this.dispositionMessageField; + } + set { + this.dispositionMessageField = value; + } + } + + /// + public BinarySecurityTokenType binarySecurityToken { + get { + return this.binarySecurityTokenField; + } + set { + this.binarySecurityTokenField = value; + } + } + + /// + public RequestedVSSecurityTokenEnrollmentType requestedVSSecurityToken { + get { + return this.requestedVSSecurityTokenField; + } + set { + this.requestedVSSecurityTokenField = value; + } + } + + /// + public string version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(DataType="language")] + public string preferredLanguage { + get { + return this.preferredLanguageField; + } + set { + this.preferredLanguageField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyAttributeAttribute()] + public System.Xml.XmlAttribute[] AnyAttr { + get { + return this.anyAttrField; + } + set { + this.anyAttrField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/enrollment")] + public partial class RequestedVSSecurityTokenEnrollmentType { + + private object[] itemsField; + + private ItemsChoiceType[] itemsElementNameField; + + /// + [System.Xml.Serialization.XmlElementAttribute("binarySecurityToken", typeof(BinarySecurityTokenType))] + [System.Xml.Serialization.XmlElementAttribute("pKCS12Password", typeof(string))] + [System.Xml.Serialization.XmlElementAttribute("pendingTokenReferenceID", typeof(string))] + [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemsElementName")] + public object[] Items { + get { + return this.itemsField; + } + set { + this.itemsField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")] + [System.Xml.Serialization.XmlIgnoreAttribute()] + public ItemsChoiceType[] ItemsElementName { + get { + return this.itemsElementNameField; + } + set { + this.itemsElementNameField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/enrollment", IncludeInSchema=false)] + public enum ItemsChoiceType { + + /// + binarySecurityToken, + + /// + pKCS12Password, + + /// + pendingTokenReferenceID, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.verisign.com/pkiservices/2009/07/enrollment")] + public partial class NameValueType { + + private string nameField; + + private string valueField; + + /// + public string name { + get { + return this.nameField; + } + set { + this.nameField = value; + } + } + + /// + public string value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.xmlsoap.org/ws/2006/12/authorization")] + public partial class ContextItemType { + + private object itemField; + + private string nameField; + + private string scopeField; + + private System.Xml.XmlAttribute[] anyAttrField; + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + [System.Xml.Serialization.XmlElementAttribute("Value", typeof(string))] + public object Item { + get { + return this.itemField; + } + set { + this.itemField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")] + public string Name { + get { + return this.nameField; + } + set { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")] + public string Scope { + get { + return this.scopeField; + } + set { + this.scopeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyAttributeAttribute()] + public System.Xml.XmlAttribute[] AnyAttr { + get { + return this.anyAttrField; + } + set { + this.anyAttrField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.xmlsoap.org/ws/2006/12/authorization")] + public partial class AdditionalContextType { + + private ContextItemType[] contextItemField; + + private System.Xml.XmlElement[] anyField; + + private System.Xml.XmlAttribute[] anyAttrField; + + /// + [System.Xml.Serialization.XmlElementAttribute("ContextItem")] + public ContextItemType[] ContextItem { + get { + return this.contextItemField; + } + set { + this.contextItemField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyElementAttribute()] + public System.Xml.XmlElement[] Any { + get { + return this.anyField; + } + set { + this.anyField = value; + } + } + + /// + [System.Xml.Serialization.XmlAnyAttributeAttribute()] + public System.Xml.XmlAttribute[] AnyAttr { + get { + return this.anyAttrField; + } + set { + this.anyAttrField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" + + "")] + public partial class PasswordString : AttributedString { + + private string typeField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")] + public string Type { + get { + return this.typeField; + } + set { + this.typeField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34230")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" + + "")] + public partial class KeyIdentifierType : EncodedString { + + private string valueTypeField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute(DataType="anyURI")] + public string ValueType { + get { + return this.valueTypeField; + } + set { + this.valueTypeField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + public delegate void RequestSecurityTokenCompletedEventHandler(object sender, RequestSecurityTokenCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class RequestSecurityTokenCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal RequestSecurityTokenCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public RequestSecurityTokenResponseType Result { + get { + this.RaiseExceptionIfNecessary(); + return ((RequestSecurityTokenResponseType)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + public delegate void RequestSecurityToken2CompletedEventHandler(object sender, RequestSecurityToken2CompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.33440")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class RequestSecurityToken2CompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal RequestSecurityToken2CompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public RequestSecurityTokenResponseCollectionType Result { + get { + this.RaiseExceptionIfNecessary(); + return ((RequestSecurityTokenResponseCollectionType)(this.results[0])); + } + } + } +} + +#pragma warning restore 1591 \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/Reference.map b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/Reference.map new file mode 100644 index 0000000..26e85af --- /dev/null +++ b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/Reference.map @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/RequestSecurityTokenResponseCollectionType.datasource b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/RequestSecurityTokenResponseCollectionType.datasource new file mode 100644 index 0000000..293512c --- /dev/null +++ b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/RequestSecurityTokenResponseCollectionType.datasource @@ -0,0 +1,10 @@ + + + + taggantWrapper.veriSignCertIssuingService.RequestSecurityTokenResponseCollectionType, Web References.veriSignCertIssuingService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/RequestSecurityTokenResponseType.datasource b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/RequestSecurityTokenResponseType.datasource new file mode 100644 index 0000000..71a9c98 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/RequestSecurityTokenResponseType.datasource @@ -0,0 +1,10 @@ + + + + taggantWrapper.veriSignCertIssuingService.RequestSecurityTokenResponseType, Web References.veriSignCertIssuingService.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/VS_WSTEP.xsd b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/VS_WSTEP.xsd new file mode 100644 index 0000000..f0a60fd --- /dev/null +++ b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/VS_WSTEP.xsd @@ -0,0 +1,83 @@ + + + + + + + + XML Schema for veriSignCertIssuingService Web Services + version 1.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/certificateService.wsdl b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/certificateService.wsdl new file mode 100644 index 0000000..ec7d758 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/certificateService.wsdl @@ -0,0 +1,38 @@ + + + + + XML WSDL for VeriSign + Certificate Web Services + version 1.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/oasis-200401-wss-wssecurity-secext-1.xsd b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/oasis-200401-wss-wssecurity-secext-1.xsd new file mode 100644 index 0000000..78cfc6e --- /dev/null +++ b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/oasis-200401-wss-wssecurity-secext-1.xsd @@ -0,0 +1,187 @@ + + + + + + + + This type represents an element with arbitrary attributes. + + + + + + + + + + + This type is used for password elements per Section 4.1. + + + + + + + + + + This type is used for elements containing stringified binary data. + + + + + + + + + + This type represents a username token per Section 4.1 + + + + + + + + + + + A security token that is encoded in binary + + + + + + + + + + A security token key identifier + + + + + + + + + + Typedef to allow a list of usages (as URIs). + + + + + + This global attribute is used to indicate the usage of a referenced or indicated token within the containing context + + + + + This type represents a reference to an external security token. + + + + + + + + This type represents a reference to an embedded security token. + + + + + + + + + + This type is used reference a security token. + + + + + + + + + + + This complexType defines header block to use for security-relevant data directed at a specific SOAP actor. + + + + + The use of "any" is to allow extensibility and different forms of security data. + + + + + + + + This complexType defines a container for elements to be specified from any namespace as properties/parameters of a DSIG transformation. + + + + + The use of "any" is to allow extensibility from any namespace. + + + + + + + + This element defines the wsse:UsernameToken element per Section 4.1. + + + + + This element defines the wsse:BinarySecurityToken element per Section 4.2. + + + + + This element defines a security token reference + + + + + This element defines a security token embedded reference + + + + + This element defines a key identifier reference + + + + + This element defines the wsse:SecurityTokenReference per Section 4.3. + + + + + This element defines the wsse:Security SOAP header element per Section 4. + + + + + This element contains properties for transformations from any namespace, including DSIG. + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/oasis-200401-wss-wssecurity-utility-1.xsd b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/oasis-200401-wss-wssecurity-utility-1.xsd new file mode 100644 index 0000000..4c4f775 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/oasis-200401-wss-wssecurity-utility-1.xsd @@ -0,0 +1,90 @@ + + + + + +This type defines the fault code value for Timestamp message expiration. + + + + + + + + + +This global attribute supports annotating arbitrary elements with an ID. + + + + + + +Convenience attribute group used to simplify this schema. + + + + + + + + +This type is for elements whose [children] is a psuedo-dateTime and can have arbitrary attributes. + + + + + + + + + + + +This type is for elements whose [children] is an anyURI and can have arbitrary attributes. + + + + + + + + + + + +This complex type ties together the timestamp related elements into a composite type. + + + + + + + + + + + + + + +This element allows Timestamps to be applied anywhere element wildcards are present, +including as a SOAP header. + + + + + + +This element allows an expiration time to be applied anywhere element wildcards are present. + + + + + + +This element allows a creation time to be applied anywhere element wildcards are present. + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-addr.xsd b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-addr.xsd new file mode 100644 index 0000000..25e4ca7 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-addr.xsd @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-authorization.xsd b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-authorization.xsd new file mode 100644 index 0000000..5e23c93 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-authorization.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-policy.xsd b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-policy.xsd new file mode 100644 index 0000000..f8444cf --- /dev/null +++ b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-policy.xsd @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-trust-1.wsdl b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-trust-1.wsdl new file mode 100644 index 0000000..3016c34 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-trust-1.wsdl @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-trust-1.xsd b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-trust-1.xsd new file mode 100644 index 0000000..027f4e0 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/ws-trust-1.xsd @@ -0,0 +1,359 @@ + + + + + + + + + + + + Actual content model is non-deterministic, hence wildcard. The following shows intended content model: + + <xs:element ref='wst:TokenType' minOccurs='0' /> + <xs:element ref='wst:RequestType' /> + <xs:element ref='wsp:AppliesTo' minOccurs='0' /> + <xs:element ref='wst:Claims' minOccurs='0' /> + <xs:element ref='wst:Entropy' minOccurs='0' /> + <xs:element ref='wst:Lifetime' minOccurs='0' /> + <xs:element ref='wst:AllowPostdating' minOccurs='0' /> + <xs:element ref='wst:Renewing' minOccurs='0' /> + <xs:element ref='wst:OnBehalfOf' minOccurs='0' /> + <xs:element ref='wst:Issuer' minOccurs='0' /> + <xs:element ref='wst:AuthenticationType' minOccurs='0' /> + <xs:element ref='wst:KeyType' minOccurs='0' /> + <xs:element ref='wst:KeySize' minOccurs='0' /> + <xs:element ref='wst:SignatureAlgorithm' minOccurs='0' /> + <xs:element ref='wst:Encryption' minOccurs='0' /> + <xs:element ref='wst:EncryptionAlgorithm' minOccurs='0' /> + <xs:element ref='wst:CanonicalizationAlgorithm' minOccurs='0' /> + <xs:element ref='wst:ProofEncryption' minOccurs='0' /> + <xs:element ref='wst:UseKey' minOccurs='0' /> + <xs:element ref='wst:SignWith' minOccurs='0' /> + <xs:element ref='wst:EncryptWith' minOccurs='0' /> + <xs:element ref='wst:DelegateTo' minOccurs='0' /> + <xs:element ref='wst:Forwardable' minOccurs='0' /> + <xs:element ref='wst:Delegatable' minOccurs='0' /> + <xs:element ref='wsp:Policy' minOccurs='0' /> + <xs:element ref='wsp:PolicyReference' minOccurs='0' /> + <xs:any namespace='##other' processContents='lax' minOccurs='0' maxOccurs='unbounded' /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Actual content model is non-deterministic, hence wildcard. The following shows intended content model: + + <xs:element ref='wst:TokenType' minOccurs='0' /> + <xs:element ref='wst:RequestType' /> + <xs:element ref='wst:RequestedSecurityToken' minOccurs='0' /> + <xs:element ref='wsp:AppliesTo' minOccurs='0' /> + <xs:element ref='wst:RequestedAttachedReference' minOccurs='0' /> + <xs:element ref='wst:RequestedUnattachedReference' minOccurs='0' /> + <xs:element ref='wst:RequestedProofToken' minOccurs='0' /> + <xs:element ref='wst:Entropy' minOccurs='0' /> + <xs:element ref='wst:Lifetime' minOccurs='0' /> + <xs:element ref='wst:Status' minOccurs='0' /> + <xs:element ref='wst:AllowPostdating' minOccurs='0' /> + <xs:element ref='wst:Renewing' minOccurs='0' /> + <xs:element ref='wst:OnBehalfOf' minOccurs='0' /> + <xs:element ref='wst:Issuer' minOccurs='0' /> + <xs:element ref='wst:AuthenticationType' minOccurs='0' /> + <xs:element ref='wst:Authenticator' minOccurs='0' /> + <xs:element ref='wst:KeyType' minOccurs='0' /> + <xs:element ref='wst:KeySize' minOccurs='0' /> + <xs:element ref='wst:SignatureAlgorithm' minOccurs='0' /> + <xs:element ref='wst:Encryption' minOccurs='0' /> + <xs:element ref='wst:EncryptionAlgorithm' minOccurs='0' /> + <xs:element ref='wst:CanonicalizationAlgorithm' minOccurs='0' /> + <xs:element ref='wst:ProofEncryption' minOccurs='0' /> + <xs:element ref='wst:UseKey' minOccurs='0' /> + <xs:element ref='wst:SignWith' minOccurs='0' /> + <xs:element ref='wst:EncryptWith' minOccurs='0' /> + <xs:element ref='wst:DelegateTo' minOccurs='0' /> + <xs:element ref='wst:Forwardable' minOccurs='0' /> + <xs:element ref='wst:Delegatable' minOccurs='0' /> + <xs:element ref='wsp:Policy' minOccurs='0' /> + <xs:element ref='wsp:PolicyReference' minOccurs='0' /> + <xs:any namespace='##other' processContents='lax' minOccurs='0' maxOccurs='unbounded' /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The RequestSecurityTokenCollection (RSTC) element is used to provide multiple RST requests. + One or more RSTR elements in an RSTRC element are returned in the response to the RequestSecurityTokenCollection. + + + + + + + + + + + The <wst:RequestSecurityTokenResponseCollection> element (RSTRC) MUST be used to return a security token or + response to a security token request on the final response. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/xml.xsd b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/xml.xsd new file mode 100644 index 0000000..be134de --- /dev/null +++ b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/xml.xsd @@ -0,0 +1,270 @@ + + + + +
+

About the XML namespace

+
+

+ This schema document describes the XML namespace, in a form + suitable for import by other schema documents. +

+

+ See + http://www.w3.org/XML/1998/namespace.html and + + http://www.w3.org/TR/REC-xml for information + about this namespace. +

+

+ Note that local names in this namespace are intended to be + defined only by the World Wide Web Consortium or its subgroups. + The names currently defined in this namespace are listed below. + They should not be used with conflicting semantics by any Working + Group, specification, or document instance. +

+

+ See further below in this document for more information about how to refer to this schema document from your own + XSD schema documents and about the + namespace-versioning policy governing this schema document. +

+
+
+
+
+ + + +
+

lang (as an attribute name)

+

+ denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification.

+
+
+

Notes

+

+ Attempting to install the relevant ISO 2- and 3-letter + codes as the enumerated possible values is probably never + going to be a realistic possibility. +

+

+ See BCP 47 at + http://www.rfc-editor.org/rfc/bcp/bcp47.txt + and the IANA language subtag registry at + + http://www.iana.org/assignments/language-subtag-registry + for further information. +

+

+ The union allows for the 'un-declaration' of xml:lang with + the empty string. +

+
+
+
+ + + + + + + + + +
+ + + +
+

space (as an attribute name)

+

+ denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification.

+
+
+
+ + + + + + +
+ + + +
+

base (as an attribute name)

+

+ denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification.

+

+ See http://www.w3.org/TR/xmlbase/ + for information about this attribute. +

+
+
+
+
+ + + +
+

id (as an attribute name)

+

+ denotes an attribute whose value + should be interpreted as if declared to be of type ID. + This name is reserved by virtue of its definition in the + xml:id specification.

+

+ See http://www.w3.org/TR/xml-id/ + for information about this attribute. +

+
+
+
+
+ + + + + + + + +
+

Father (in any context at all)

+
+

+ denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: +

+
+

+ In appreciation for his vision, leadership and + dedication the W3C XML Plenary on this 10th day of + February, 2000, reserves for Jon Bosak in perpetuity + the XML name "xml:Father". +

+
+
+
+
+
+ + +
+

+ About this schema document +

+
+

+ This schema defines attributes and an attribute group suitable + for use by schemas wishing to allow xml:base, + xml:lang, xml:space or + xml:id attributes on elements they define. +

+

+ To enable this, such a schema must import this schema for + the XML namespace, e.g. as follows: +

+
+          <schema . . .>
+           . . .
+           <import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+     
+

+ or +

+
+           <import namespace="http://www.w3.org/XML/1998/namespace"
+                      schemaLocation="http://www.w3.org/2009/01/xml.xsd"/>
+     
+

+ Subsequently, qualified reference to any of the attributes or the + group defined below will have the desired effect, e.g. +

+
+          <type . . .>
+           . . .
+           <attributeGroup ref="xml:specialAttrs"/>
+     
+

+ will define a type which will schema-validate an instance element + with any of those attributes. +

+
+
+
+
+ + +
+

+ Versioning policy for this schema document +

+
+

+ In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + + http://www.w3.org/2009/01/xml.xsd. +

+

+ At the date of issue it can also be found at + + http://www.w3.org/2001/xml.xsd. +

+

+ The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML + Schema itself, or with the XML namespace itself. In other words, + if the XML Schema or XML namespaces change, the version of this + document at + http://www.w3.org/2001/xml.xsd + + will change accordingly; the version at + + http://www.w3.org/2009/01/xml.xsd + + will not change. +

+

+ Previous dated (and unchanging) versions of this schema + document are at: +

+ +
+
+
+
+
\ No newline at end of file diff --git a/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/xmldsig-core-schema.xsd b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/xmldsig-core-schema.xsd new file mode 100644 index 0000000..e036087 --- /dev/null +++ b/utils/ipn_sqlclr/Web References/veriSignCertIssuingService/xmldsig-core-schema.xsd @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/XmlReaderSpy.cs b/utils/ipn_sqlclr/XmlReaderSpy.cs new file mode 100644 index 0000000..f89ece9 --- /dev/null +++ b/utils/ipn_sqlclr/XmlReaderSpy.cs @@ -0,0 +1,280 @@ +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Web.Services.Protocols; +using System.Xml; +using System.IO; + +namespace ipn_sqlclr +{ + public class XmlReaderSpy : StreamReader + { + private readonly StringBuilder _sb = new StringBuilder(); + public XmlReaderSpy(Stream stream, Encoding encoding, bool p, int bufferSize) : base(stream, encoding, p, bufferSize) + { + } + + public override int Read(char[] buffer, int index, int count) + { + var ret = base.Read(buffer, index, count); + if(ret > 0) + _sb.Append(buffer, index, ret); + return ret; + } + + public override string ReadToEnd() + { + var ret = base.ReadToEnd(); + _sb.Append(ret); + return ret; + } + + public override string ReadLine() + { + var ret = base.ReadLine(); + _sb.Append(ret); + return ret; + } + + public override int ReadBlock(char[] buffer, int index, int count) + { + return Read(buffer, index, count); + } + + public string Xml + { + get { return _sb.ToString().Replace("", ""); } + } + } + + public class XmlWriterSpy : XmlWriter + { + private readonly XmlWriter _base; + private readonly XmlTextWriter _xtw; + private readonly StringWriter _sw; + + /// + /// Extracted XML. + /// + public string Xml + { + get + { + return (_sw != null) ? _sw.ToString() : string.Empty; + } + } + + public XmlWriterSpy(XmlWriter parent) + { + _base = parent; + _sw = new StringWriter(); + _xtw = new XmlTextWriter(_sw); + } + + #region Abstract properties and methods that must be implemented + + public override WriteState WriteState + { + get + { + return _base.WriteState; + } + } + + public override void Close() + { + _base.Close(); + _xtw.Close(); + _sw.Close(); + } + + public override void Flush() + { + _base.Flush(); + _xtw.Flush(); + _sw.Flush(); + } + + public override string LookupPrefix(string ns) + { + return _base.LookupPrefix(ns); + } + + public override void WriteBase64(byte[] buffer, int index, int count) + { + _base.WriteBase64(buffer, index, count); + _xtw.WriteBase64(buffer, index, count); + } + + public override void WriteCData(string text) + { + _base.WriteCData(text); + _xtw.WriteCData(text); + } + + public override void WriteCharEntity(char ch) + { + _base.WriteCharEntity(ch); + _xtw.WriteCharEntity(ch); + } + + public override void WriteChars(char[] buffer, int index, int count) + { + _base.WriteChars(buffer, index, count); + _xtw.WriteChars(buffer, index, count); + } + + public override void WriteComment(string text) + { + _base.WriteComment(text); + _xtw.WriteComment(text); + } + + public override void WriteDocType(string name, string pubid, string sysid, string subset) + { + _base.WriteDocType(name, pubid, sysid, subset); + _xtw.WriteDocType(name, pubid, sysid, subset); + } + + public override void WriteEndAttribute() + { + _base.WriteEndAttribute(); + _xtw.WriteEndAttribute(); + } + + public override void WriteEndDocument() + { + _base.WriteEndDocument(); + _xtw.WriteEndDocument(); + } + + public override void WriteEndElement() + { + _base.WriteEndElement(); + _xtw.WriteEndElement(); + } + + public override void WriteEntityRef(string name) + { + _base.WriteEntityRef(name); + _xtw.WriteEntityRef(name); + } + + public override void WriteFullEndElement() + { + _base.WriteFullEndElement(); + _xtw.WriteFullEndElement(); + } + + public override void WriteProcessingInstruction(string name, string text) + { + _base.WriteProcessingInstruction(name, text); + _xtw.WriteProcessingInstruction(name, text); + } + + public override void WriteRaw(string data) + { + _base.WriteRaw(data); + _xtw.WriteRaw(data); + } + + public override void WriteRaw(char[] buffer, int index, int count) + { + _base.WriteRaw(buffer, index, count); + _xtw.WriteRaw(buffer, index, count); + } + + public override void WriteStartAttribute(string prefix, string localName, string ns) + { + _base.WriteStartAttribute(prefix, localName, ns); + _xtw.WriteStartAttribute(prefix, localName, ns); + } + + public override void WriteStartDocument(bool standalone) + { + _base.WriteStartDocument(standalone); + _xtw.WriteStartDocument(standalone); + } + + public override void WriteStartDocument() + { + _base.WriteStartDocument(); + _xtw.WriteStartDocument(); + } + + public override void WriteStartElement(string prefix, string localName, string ns) + { + _base.WriteStartElement(prefix, localName, ns); + _xtw.WriteStartElement(prefix, localName, ns); + } + + public override void WriteString(string text) + { + _base.WriteString(text); + _xtw.WriteString(text); + } + + public override void WriteSurrogateCharEntity(char lowChar, char highChar) + { + _base.WriteSurrogateCharEntity(lowChar, highChar); + _xtw.WriteSurrogateCharEntity(lowChar, highChar); + + } + + public override void WriteWhitespace(string ws) + { + _base.WriteWhitespace(ws); + _xtw.WriteWhitespace(ws); + } + + #endregion + } + + public class XmlReaderSpyService : SoapHttpClientProtocol + { + protected XmlReaderSpyService(X509Certificate clientCert, string url) + { + Url = url; + ClientCertificates.Add(clientCert); + } + + private XmlReaderSpy _xmlReaderSpy; + private XmlWriterSpy _xmlWriterSpy; + + public string GetRequestXml() + { + if (_xmlWriterSpy != null) + return _xmlWriterSpy.Xml; + return string.Empty; + } + public string GetResponseXml() + { + if (_xmlReaderSpy != null) + { + return _xmlReaderSpy.Xml; + } + return string.Empty; + } + + protected override XmlReader GetReaderForMessage(SoapClientMessage message, int bufferSize) + { + Encoding encoding = Encoding.UTF8; + if (bufferSize < 0x200) + { + bufferSize = 0x200; + } + var reader = new XmlTextReader(_xmlReaderSpy = new XmlReaderSpy(message.Stream, encoding, true, bufferSize)) + { + DtdProcessing = DtdProcessing.Prohibit, + Normalization = true, + XmlResolver = null + }; + return reader; + } + + protected override XmlWriter GetWriterForMessage(SoapClientMessage message, int bufferSize) + { + _xmlWriterSpy = new XmlWriterSpy(base.GetWriterForMessage(message, bufferSize)); + return _xmlWriterSpy; + } + } +} diff --git a/utils/ipn_sqlclr/ipn_sqlclr.sqlproj b/utils/ipn_sqlclr/ipn_sqlclr.sqlproj new file mode 100644 index 0000000..67fa032 --- /dev/null +++ b/utils/ipn_sqlclr/ipn_sqlclr.sqlproj @@ -0,0 +1,130 @@ + + + + + Debug + AnyCPU + ipn_sqlclr + 2.0 + 4.1 + {046364af-635b-4f62-9c8c-d3866b8f622f} + Microsoft.Data.Tools.Schema.Sql.Sql110DatabaseSchemaProvider + Database + + + ipn_sqlclr + ipn_sqlclr + 1033, CI + BySchemaAndSchemaType + True + v4.5 + CS + Properties + False + True + UNSAFE + True + + + bin\Release\ + $(MSBuildProjectName).sql + False + pdbonly + true + false + true + prompt + 4 + + + bin\Debug\ + $(MSBuildProjectName).sql + false + true + full + false + true + true + prompt + 4 + + + + 10.0 + + + + + + + + + + + + + + + + + + + + + + + + True + True + Reference.map + + + True + True + Reference.map + + + True + True + Reference.map + + + True + True + Reference.map + + + + + + + + Web References\CertificateEnrollmentPolicy.wsdl + + + Web References\CertificateManagementService.wsdl + + + Web References\SignerAPI.wsdl + + + Web References\UserManagementService.wsdl + + + Web References\VS_WSTEP.wsdl + + + Web References\ws-trust-1.3-verisign.wsdl + + + + + + crypto + {38872a5f-e87e-4fad-b109-8eb7b2e6a4a0} + True + True + True + + + \ No newline at end of file diff --git a/utils/ipn_sqlclr/keygen.cs b/utils/ipn_sqlclr/keygen.cs new file mode 100644 index 0000000..d26b5a3 --- /dev/null +++ b/utils/ipn_sqlclr/keygen.cs @@ -0,0 +1,212 @@ +using System; +using System.IO; +using System.Numerics; +using System.Security.Cryptography; +using System.Text; + +namespace ipn_sqlclr +{ + enum SerialNumberChunks : byte + { + Version = 0x01, // 1 byte of data - version + UserName = 0x02, // 1 + N bytes - length + N bytes of customer's name (without enging \0). + Email = 0x03, // 1 + N bytes - length + N bytes of customer's email (without ending \0). + ProductCode = 0x07, // 8 bytes - used for decrypting some parts of exe-file + UserData = 0x08, // 1 + N bytes - length + N bytes of user data + MaxBuild = 0x09, // 4 bytes - (year << 16) + (month << 8) + (day) + End = 0xFF // 4 bytes - checksum: the first four bytes of sha-1 hash from the data before that chunk + }; + + public static class Rsa + { + private const string PublicExpB64 = "AAEAAQ=="; + private const string PrivateExpB64 = "CXHXWx/Z9JqetQWwFpvmD72wrDiqQOXMQs18fhAMjWCfJ/f2r3p2io+iB3gqIuu3LGH3WJ8PQuIzvDMnbwAx+8BbAyYhWhGEbxDdifndjQ2KlDV2Hu8NQgCbc5Wjok0rKwQ+Bxeb2i1+Gu3FsnhRNv9RhSyiwcnH/4Q3+ySE3AFAcAUwuQABePjDKCYOfIyx7RKz5h0sG+v10nkPuuCGPSnh+AXDTBIJFH+yNIjkrfweC9A3dv7URyRJumAMgm/SnDU76rTkFw9vZpupQeMtMtIsZIkeFSngip9KImD5zzbb2vKD63Cg9W/Yvqgvro/d+cR5n6P0t4DzfanNIFRGpFrX8/Q5VjuezDKw/4YbsFYwOhzJPRxglmCEjh8cpfxJ11cUXa/hNBV4c4Dp29D0F+w01OlBnFb1Ck9VXur2qJCsqcWtjsnt/VITsxa1jzr+3C2+uvaI4JSd7yLEnTqSaSsRfWuhDXgjY/YWhmyvMzeQeXBGOXKt2j2lY2Fm0WJx"; + private const string ModulusB64 = "pwUqwaM8IOukyx06Lvi5YNQ70JE7pwg7K+pmM/vCe1CUseHKFM1v1m11geDjVsAt38AnaiFs3JhtTs80ySCIxOSyvMw6Cd52k6N6dn7LAx1mxQLJLhYeMMJYbplMHnMLwYN0+IO58OVbEqRyaJV2ExolnK2EYZL7QRXujGY7/sOoOMF3p6GsWJK6kkBJICIoL9hHWBQMO6/9rmls/+EhaWuP80Vx0+H2OlrQ58K+TJeyE393cvb4QufiEPpCNaB50Klee9QUnsjSW/bTnmGn4Bi5+cowRbawUY73Q5I58fMAXiH9ueDPuNMR9YKDgW9GxunLmYkbuwqIp/v7kw3cfMBM0ihhB0B8UhjyAMAGLzJWX3H/H6Zrz41g9PbPjTAxfsTaCrxoqjaTaO4zk9YsI//VX9Fhivcy913SevBpNandziGfYH/oHW2xDy9AfwkE1wuIBlLj7c/k8U1YmmRAmkoCzlmB7EU4ClNltboh1uARUQ6wW30upppnuYhGkTy7"; + + static BigInteger B2Bi(byte[] b) //reverse & make positive + { + Array.Reverse(b); + var b2 = new byte[b.Length + 1]; + Array.Copy(b, b2, b.Length); + return new BigInteger(b2); + } + + private static readonly BigInteger PublicExp = B2Bi(Convert.FromBase64String(PublicExpB64)); + private static readonly BigInteger PrivateExp = B2Bi(Convert.FromBase64String(PrivateExpB64)); + private static readonly BigInteger Modulus = B2Bi(Convert.FromBase64String(ModulusB64)); + + public static byte[] Encrypt(byte[] paddedData) + { + var x = B2Bi(paddedData); + var y = BigInteger.ModPow(x, PrivateExp, Modulus); + + byte[] ret = y.ToByteArray(); + Array.Resize(ref ret, paddedData.Length); + Array.Reverse(ret); + return ret; + } + + public static byte[] Decrypt(byte[] data) + { + var x = B2Bi(data); + var y = BigInteger.ModPow(x, PublicExp, Modulus); + + byte[] ret = y.ToByteArray(); + Array.Reverse(ret); + return ret; + } + + } + public static class Keygen + { + public static void ParseKey(string key, out int productId, out string customerName, out string eMail, out DateTime maxBuildDt) + { + productId = -1; + customerName = null; + eMail = null; + maxBuildDt = new DateTime(); + + var crypted = Convert.FromBase64String(key); + var data = Rsa.Decrypt(crypted); + int i; + for (i = 2; i < data.Length && data[i] != 0; i++) { + } + + i++; + var pos = i; + while (pos < data.Length) + { + var b = data[pos++]; + switch (b) + { + case (byte) SerialNumberChunks.Version: + b = data[pos++]; + if (b < 1 || b > 2) + throw new InvalidDataException("SerialNumberChunks.Version"); + break; + case (byte) SerialNumberChunks.UserName: + b = data[pos++]; + customerName = Encoding.UTF8.GetString(data, pos, b); + pos += b; + break; + case (byte) SerialNumberChunks.Email: + b = data[pos++]; + eMail = Encoding.UTF8.GetString(data, pos, b); + pos += b; + break; + case (byte)SerialNumberChunks.ProductCode: + pos += 8; + break; + case (byte) SerialNumberChunks.UserData: + b = data[pos++]; + if (b == 0) + productId = 0; + else if(b != 1) + throw new InvalidDataException("Invalid ProductID"); + else + productId = data[pos]; + pos += b; + break; + case (byte) SerialNumberChunks.MaxBuild: + maxBuildDt = new DateTime(data[pos + 2] + 256 * data[pos + 3], data[pos + 1],data[pos]); + pos += 4; + break; + case (byte) SerialNumberChunks.End: + if (pos + 4 > data.Length) + throw new InvalidDataException("No checksum"); + { + SHA1 sha = new SHA1Managed(); + sha.Initialize(); + var hash = sha.ComputeHash(data, i, pos - 1 - i); + for (int j = 0; j < 4; j++) + { + if(data[pos + j] == hash[3 - j]) + continue; + throw new InvalidDataException("Invalid checksum"); + } + } + return; + } + } + throw new InvalidDataException("No checksum"); + } + + public static string GenerateKey(int productId, string customerName, string eMail, DateTime maxBuildDt) + { + var data = new MemoryStream(); + data.WriteByte((byte)SerialNumberChunks.Version); + data.WriteByte(1); + + data.WriteByte((byte)SerialNumberChunks.UserName); + var utfCustomer = Encoding.UTF8.GetBytes(customerName); + if (utfCustomer.Length > 255) + throw new ArgumentException("Customer name too long", "customerName"); + data.WriteByte((byte)utfCustomer.Length); + data.Write(utfCustomer, 0, utfCustomer.Length); + + data.WriteByte((byte)SerialNumberChunks.Email); + byte[] utfeMail = Encoding.UTF8.GetBytes(eMail); + if (utfeMail.Length > 255) + throw new ArgumentException("EMail too long", "eMail"); + data.WriteByte((byte)utfeMail.Length); + data.Write(utfeMail, 0, utfeMail.Length); + + data.WriteByte((byte)SerialNumberChunks.ProductCode); + data.Write(new byte[] { 41, 65, 36, 150, 5, 175, 174, 137 }, 0, 8); + + data.WriteByte((byte)SerialNumberChunks.UserData); + data.WriteByte(1); + data.WriteByte((byte)productId); + + data.WriteByte((byte)SerialNumberChunks.MaxBuild); + data.WriteByte((byte)maxBuildDt.Day); + data.WriteByte((byte)maxBuildDt.Month); + data.WriteByte((byte)maxBuildDt.Year); + data.WriteByte((byte)(maxBuildDt.Year >> 8)); + + SHA1 sha = new SHA1Managed(); + sha.Initialize(); + data.Position = 0; + var hash = sha.ComputeHash(data); + data.WriteByte((byte)SerialNumberChunks.End); + data.WriteByte(hash[3]); + data.WriteByte(hash[2]); + data.WriteByte(hash[1]); + data.WriteByte(hash[0]); + + const int minPadding = 8 + 3; + const int maxPadding = minPadding + 16; + const int maxBytes = 3072 / 8; + if (data.Length + minPadding > maxBytes) + throw new ApplicationException("Serial number too long"); + + var rnd = new Random(); + var paddingBytes = rnd.Next(minPadding, maxPadding + 1); + if (data.Length + paddingBytes > maxBytes) + paddingBytes = maxBytes - (int)data.Length; + + var paddedData = new byte[maxBytes]; + var nonPaddedData = data.ToArray(); + Array.Copy(nonPaddedData, paddedData, paddingBytes); + Array.Copy(nonPaddedData, 0, paddedData, paddingBytes, data.Length); + paddedData[0] = 0; + paddedData[1] = 2; + paddedData[paddingBytes - 1] = 0; + var i = 2; + for (; i < paddingBytes - 1; i++) { + byte b = 0; + while (b == 0) { + b = (byte)rnd.Next(256); + } + paddedData[i] = b; + } + i = nonPaddedData.Length + paddingBytes; + while (i < maxBytes) { + paddedData[i++] = (byte)rnd.Next(256); + } + + var res = Convert.ToBase64String(Rsa.Encrypt(paddedData), Base64FormattingOptions.InsertLineBreaks); + return res; + } + } +} -- cgit v1.2.3