示例#1
0
 public IheTransactionTests()
 {
     _server = new MllpServer(
         new IPEndPoint(IPAddress.Loopback, Port),
         NullLog.Get(),
         new TestMiddleware());
     _server.Start();
 }
示例#2
0
 public MllpServerTests()
 {
     _server = new MllpServer(
         new IPEndPoint(IPAddress.IPv6Loopback, 2575),
         NullLog.Get(),
         new DefaultHl7MessageMiddleware(
             handlers: new TestTransactionHandler()),
         TimeSpan.FromMilliseconds(100));
     _server.Start();
 }
 public SecureIheTransactionTests()
 {
     _cert = new X509Certificate2Collection(
         new X509Certificate2("cert.pfx", "password"));
     _server = new MllpServer(
         new IPEndPoint(IPAddress.Loopback, _port),
         NullLog.Get(),
         new TestMiddleware(),
         serverCertificate: _cert[0],
         userCertificateValidationCallback: UserCertificateValidationCallback);
     _server.Start();
 }
示例#4
0
        public SecureIheTransactionWithSanTests()
        {
            var certificate = X509Certificate2.CreateFromPemFile("cert.pem", "san.pem");
            var buffer      = certificate.Export(X509ContentType.Pfx, (string)null);

            certificate = new X509Certificate2(buffer, (string)null);
            _cert       = new X509Certificate2Collection(
                certificate);
            _server = new MllpServer(
                new IPEndPoint(IPAddress.Loopback, _port),
                NullLog.Get(),
                new TestMiddleware(),
                serverCertificate: _cert[0],
                userCertificateValidationCallback: UserCertificateValidationCallback);
            _server.Start();
        }