Interface IAcmeContext
Represents the context for ACME operations.
Namespace: Certes
Assembly: Certes.dll
Syntax
public interface IAcmeContext
Properties
| Edit this page View SourceAccountKey
Gets the account key.
Declaration
IKey AccountKey { get; }
Property Value
| Type | Description |
|---|---|
| IKey | The account key. |
BadNonceRetryCount
Gets the number of retries on a badNonce error.
Declaration
int BadNonceRetryCount { get; }
Property Value
| Type | Description |
|---|---|
| int | The number of retries. |
DirectoryUri
Gets the directory URI.
Declaration
Uri DirectoryUri { get; }
Property Value
| Type | Description |
|---|---|
| Uri | The directory URI. |
HttpClient
Gets the ACME HTTP client.
Declaration
IAcmeHttpClient HttpClient { get; }
Property Value
| Type | Description |
|---|---|
| IAcmeHttpClient | The ACME HTTP client. |
Methods
| Edit this page View SourceAccount(CancellationToken)
Gets the ACME account context.
Declaration
Task<IAccountContext> Account(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | Cancels this operation, including cached lookups. |
Returns
| Type | Description |
|---|---|
| Task<IAccountContext> | The ACME account context. |
Authorization(Uri)
Gets the authorization by specified location.
Declaration
IAuthorizationContext Authorization(Uri location)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | location | The authorization location. |
Returns
| Type | Description |
|---|---|
| IAuthorizationContext | The authorization context. |
ChangeKey(IKey, CancellationToken)
Changes the account key.
Declaration
Task<Account> ChangeKey(IKey key = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IKey | key | The new account key. |
| CancellationToken | cancellationToken | Cancels this operation. |
Returns
| Type | Description |
|---|---|
| Task<Account> | The account resource. |
GetDirectory(CancellationToken)
Gets the ACME directory.
Declaration
Task<Directory> GetDirectory(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | Cancels this operation, including cached lookups. |
Returns
| Type | Description |
|---|---|
| Task<Directory> | The ACME directory. |
NewAccount(IList<string>, bool, string, string, string, CancellationToken)
Creates an account.
Declaration
Task<IAccountContext> NewAccount(IList<string> contact, bool termsOfServiceAgreed = false, string eabKeyId = null, string eabKey = null, string eabKeyAlg = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<string> | contact | The contact. |
| bool | termsOfServiceAgreed | Set to |
| string | eabKeyId | Optional key identifier, if using external account binding. |
| string | eabKey | Optional EAB key, if using external account binding. |
| string | eabKeyAlg | Optional EAB key algorithm, if using external account binding, defaults to HS256 if not specified |
| CancellationToken | cancellationToken | Cancels this operation. |
Returns
| Type | Description |
|---|---|
| Task<IAccountContext> | The account created. |
NewOrder(IList<string>, DateTimeOffset?, DateTimeOffset?, CancellationToken)
Creates a new the order.
Declaration
Task<IOrderContext> NewOrder(IList<string> identifiers, DateTimeOffset? notBefore = null, DateTimeOffset? notAfter = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<string> | identifiers | The identifiers. Values that strictly parse as IP addresses are sent as IP identifiers (RFC 8738) in canonical form; all others are sent as DNS identifiers. |
| DateTimeOffset? | notBefore | Th value of not before field for the certificate. |
| DateTimeOffset? | notAfter | The value of not after field for the certificate. |
| CancellationToken | cancellationToken | Cancels this operation. |
Returns
| Type | Description |
|---|---|
| Task<IOrderContext> | The order context created. |
Order(Uri)
Gets the order by specified location.
Declaration
IOrderContext Order(Uri location)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | location | The order location. |
Returns
| Type | Description |
|---|---|
| IOrderContext | The order context. |
RevokeCertificate(byte[], RevocationReason, IKey, CancellationToken)
Revokes the certificate.
Declaration
Task RevokeCertificate(byte[] certificate, RevocationReason reason = RevocationReason.Unspecified, IKey certificatePrivateKey = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | certificate | The certificate in DER format. |
| RevocationReason | reason | The reason for revocation. |
| IKey | certificatePrivateKey | The certificate's private key. |
| CancellationToken | cancellationToken | Cancels this operation. |
Returns
| Type | Description |
|---|---|
| Task | The awaitable. |
Sign(object, Uri, CancellationToken)
Signs the data with account key.
Declaration
Task<JwsPayload> Sign(object entity, Uri uri, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| object | entity | The data to sign. |
| Uri | uri | The URI for the request. |
| CancellationToken | cancellationToken | Cancels this operation. |
Returns
| Type | Description |
|---|---|
| Task<JwsPayload> | The JWS payload. |