protected override void Initialize() { var endpoint = GetEndPoint(); if (!IPAddress.IsLoopback(endpoint.Address) && endpoint.Address != IPAddress.Any) { throw new InvalidOperationException(); } string password; var data = CertificateProvider.GetRawCertificateData(Certificate, out password); openssl.SetCertificate(data, password); openssl.Bind(endpoint); }
protected override void CreateConnection(TestContext ctx) { var endpoint = GetEndPoint(); if (Parameters.ClientCertificate != null) { string password; var data = CertificateProvider.GetRawCertificateData(Parameters.ClientCertificate, out password); openssl.SetCertificate(data, password); } if (MonoParameters != null) { SelectCiphers(ctx, MonoParameters.ClientCiphers); } openssl.Connect(endpoint); }