CertGenerator class

Generates the TLS certificate material an OmnyServer Hub needs to run.

OmnyServer is secure-by-default: the Hub only speaks WebSocket-on-TLS, so hub start requires a server certificate and key, and clients/nodes must trust the issuing CA. This creates a small local CA and a server certificate signed by it (a CA → leaf chain, since a bare self-signed leaf used as its own trust anchor is rejected by Dart's TLS stack).

The work is delegated to the system openssl binary, which must be on the PATH.

Constructors

CertGenerator()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

generate({required String outputDir, List<String> hosts = const [], String commonName = 'localhost', String caCommonName = 'OmnyServer Dev CA', int caDays = 3650, int serverDays = 825, bool force = false}) Future<GeneratedCertificates>
Generate a CA plus a Hub server certificate into outputDir.