public LetoConnectionAdapter(LetoConnectionAdapterOptions options, ILoggerFactory loggerFactory)
        {
            _certList = new CertificateList();
            var provider = new Tls13.Certificates.OpenSsl11.CertificateProvider();

            _certList.AddCertificate(provider.LoadPfx12(options.PfxPath, options.PfxPassword));
            _listener = new SecurePipeListener(_pipeFactory, _certList, loggerFactory);
            _logger   = loggerFactory?.CreateLogger <LetoConnectionAdapter>();
        }
Beispiel #2
0
        public static ListenOptions UseLetoHttps(this ListenOptions options, string path, string password)
        {
            var opts = new LetoConnectionAdapterOptions()
            {
                PfxPassword = password,
                PfxPath     = path
            };
            var loggerFactory = options.KestrelServerOptions.ApplicationServices.GetRequiredService <ILoggerFactory>();

            options.ConnectionAdapters.Add(new LetoConnectionAdapter(opts, loggerFactory));
            return(options);
        }
 public LetoConnectionAdapter(LetoConnectionAdapterOptions options)
     : this(options, loggerFactory : null)
 {
 }