Passa al contenuto principale

Class SSLCertificateManager

Namespace: TecnoPack.WebServer
Assembly: CO0002_Templ_FlowpackHMI_V00_26_M.dll

Utility class for creating SSL/TLS certificates.

public static class SSLCertificateManager

Inheritance

object ← SSLCertificateManager

Methods

GenerateSelfSignedCertificate(string)

Generates a self-signed X.509 certificate for a given hostname.

public static X509Certificate2 GenerateSelfSignedCertificate(string hostname)

Parameters

hostname string

The hostname to assign as the certificate's Common Name (CN).

Returns

X509Certificate2

A representing a self-signed certificate valid for one year. The certificate is generated with a 2048-bit RSA key and SHA-256 signature.

Remarks

The certificate is valid starting one day before the current date to account for potential clock skew issues.

  • Methods
    • GenerateSelfSignedCertificate(string)