0

Welcome, Im interesting in creating my own local service, witch support TSL v1 only.

I know its weak. But some app does not allow use modern cert above 1.0... This app has no update to long, and just update it to TSL 1.3/1.2 is impossible.

There two question in complex.

  1. How to create self-signed cert (private and public key) v1.0
  2. How to use this cert in C#, im binding loop back address.

maybe soft like makecert/openssl can help? Which crypt-algorithm i should to use?

1 Answers1

0

This answer is for .NET Core 2.0 and above.

This guide Kestrel web server implementation in ASP.NET Core, it is a guide to create a server.

The certificate and TLS version can be configured in Kestrel server HTTPS defauls:

app.ConfigureKestrel(serverOptions =>
{
    serverOptions.ConfigureHttpsDefaults(listenOptions =>
    {
        listenOptions.SslProtocols = SslProtocols.Tls;
        listenOptions.ServerCertificate = x509Certificate2; // instance of X509Certificate2
    });

});

The value SslProtocols.Tls specifies TLS 1.0 security protocol.

How to create a valid, self-signed, X509Certificate2, needed in the code above, is described here. Certificates API was added to .Net Core on 2.0 version.

Martin Staufcik
  • 8,295
  • 4
  • 44
  • 63