예제 #1
0
        static void Main(string[] args)
        {
            System.Console.WriteLine("Hi there!");

/*
 * // External config
 *          System.ServiceModel.BasicHttpBinding wsBinding = new System.ServiceModel.BasicHttpBinding();
 *          wsBinding.SendTimeout = System.TimeSpan.FromMinutes(5);
 * //            wsBinding.TransactionFlow = true;
 *          System.ServiceModel.EndpointAddress endpointAddress = new
 *            System.ServiceModel.EndpointAddress("http://*****:*****@")
            {
                bad("Prot data wrong: " + prot);
            }
            if (b1 != 7)
            {
                bad("Blah data wrong: " + b1);
            }
            if (x509_certificates == null || x509_certificates.Length != 2)
            {
                bad("Cert return error");
            }
            foreach (X509Certificate2 cert in x509_certificates)
            {
                System.Console.WriteLine("CERT=" + cert.SubjectName.Name);
            }
            byte[] mac = new byte[] { 2, 7, 9, 8, 4 };
            ws.setCertificatePath(3, x509_certificates, mac);
            ws.setCertificatePath(4, null, mac);
            x509_certificates = ws.getCertPath(true);
            System.Console.WriteLine("getCertPath testing...");
            if (x509_certificates == null || x509_certificates.Length != 2)
            {
                bad("getCertPath");
            }
            x509_certificates = ws.getCertPath(false);
            if (x509_certificates != null)
            {
                bad("getCertPath");
            }
        }
예제 #2
0
 public Device(SKSWSProxy sks)
 {
     device_info = sks.getDeviceInfo();
     this.sks    = sks;
 }