CertificatesHandlerIO class
A CertificatesHandler implementation using dart:io
.
- Inheritance
-
- Object
- CertificatesHandler
- CertificatesHandlerIO
Constructors
- CertificatesHandlerIO(Directory directory, {String accountDirectory = CertificatesHandler.defaultAccountDirectoryName, String privateKeyPEMFileName = CertificatesHandler.defaultPrivateKeyPEMFileName, String publicKeyPEMFileName = CertificatesHandler.defaultPublicKeyPEMFileName, String fullChainPEMFileName = CertificatesHandler.defaultFullChainPEMFileName})
Properties
- accountDirectory → String
-
The account directory.
finalinherited
- directory → Directory
-
The Directory to storage certificates.
final
- fullChainPEMFileName → String
-
The file name of a full-chain PEM file.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- privateKeyPEMFileName → String
-
The file name of a private key PEM file.
finalinherited
- publicKeyPEMFileName → String
-
The file name of a public key PEM file.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildSecurityContext(
List< String> domains, {bool loadAllHandledDomains = true}) → Future<SecurityContext?> -
Builds a SecurityContext for
domain
that can be used in a secure HttpServer and LetsEncrypt.override -
ensureAccountPEMKeyPair(
) → Future< PEMKeyPair> -
Ensures that an account key pair exists.
inherited
-
ensureDomainPEMKeyPair(
String cn) → Future< PEMKeyPair> -
Ensures that a key pair for
cn
exists.inherited -
fileAccountPrivateKeyPEM(
) → File -
fileAccountPublicKeyPEM(
) → File -
fileDomainFullChainPEM(
String cn) → File -
fileDomainPrivateKeyPEM(
String cn) → File -
fileDomainPublicKeyPEM(
String cn) → File -
generateAccountPEMKeyPair(
{bool force = false}) → Future< PEMKeyPair?> -
Generates and stores the account key pair.
override
-
generateCSR(
String cn, String email, {String? organizationName, String? organizationUnit, String? locality, String? state, String? country}) → Future< String?> -
Generates a
CSR
(Certificate Signing Request) forcn
.override -
generateDomainPEMKeyPair(
String cn, {bool force = false}) → Future< PEMKeyPair?> -
Generates and stores a key pair for
cn
in PEM format.override -
generatePEMKeyPair(
) → PEMKeyPair -
Generates a key pair in PEM format.
override
-
getAccountPEMKeyPair(
) → Future< PEMKeyPair?> -
Returns the account key pair.
inherited
-
getDomainPEMKeyPair(
String cn) → Future< PEMKeyPair?> -
Returns the key pair for
domain
.inherited -
isCertificateExpired(
String certificatePEM) → bool -
inherited
-
isHandledDomainCertificate(
String domain, {bool checkSecurityContext = true}) → bool -
Returns
true
ifdomain
certificate is already handled.override -
listAllHandledDomains(
{bool checkSecurityContext = true}) → List< String> -
Returns a List of all the handled domains.
override
-
listHandledDomains(
List< String> domains, {bool checkSecurityContext = true}) → List<String> -
Returns a List of handled
domains
.inherited -
listNotHandledDomains(
List< String> domains, {bool checkSecurityContext = true}) → List<String> -
Returns a List of NOT handled
domains
.inherited -
loadAccountPrivateKeyPEM(
) → FutureOr< String?> -
Loads the current account private key PEM.
override
-
loadAccountPublicKeyPEM(
) → FutureOr< String?> -
Loads the current account public key PEM.
override
-
loadDomainPrivateKeyPEM(
String cn) → FutureOr< String?> -
Loads the private key of
cn
in PEM format.override -
loadDomainPublicKeyPEM(
String cn) → FutureOr< String?> -
Loads the public key of
cn
in PEM format.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
saveSignedCertificateChain(
String cn, List< String> signedCertificatesChain) → Future<bool> -
Saves a signed certificate chain for
cn
.override -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited