Certes
Show / Hide Table of Contents

Interface IAcmeContext

Represents the context for ACME operations.

Namespace: Certes
Assembly: Certes.dll
Syntax
public interface IAcmeContext

Properties

| Edit this page View Source

AccountKey

Gets the account key.

Declaration
IKey AccountKey { get; }
Property Value
Type Description
IKey

The account key.

| Edit this page View Source

BadNonceRetryCount

Gets the number of retries on a badNonce error.

Declaration
int BadNonceRetryCount { get; }
Property Value
Type Description
int

The number of retries.

| Edit this page View Source

DirectoryUri

Gets the directory URI.

Declaration
Uri DirectoryUri { get; }
Property Value
Type Description
Uri

The directory URI.

| Edit this page View Source

HttpClient

Gets the ACME HTTP client.

Declaration
IAcmeHttpClient HttpClient { get; }
Property Value
Type Description
IAcmeHttpClient

The ACME HTTP client.

Methods

| Edit this page View Source

Account(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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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 true to accept the terms of service.

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

Extension Methods

IAcmeContextExtensions.GetRenewalInfo(IAcmeContext, string, CancellationToken)
IAcmeContextExtensions.NewAccount(IAcmeContext, string, bool, string, string, string, CancellationToken)
IAcmeContextExtensions.NewOrder(IAcmeContext, IList<Identifier>, DateTimeOffset?, DateTimeOffset?, CancellationToken)
IAcmeContextExtensions.NewOrderWithProfile(IAcmeContext, IList<Identifier>, string, DateTimeOffset?, DateTimeOffset?, string, bool, CancellationToken)
IAcmeContextExtensions.NewOrderWithProfile(IAcmeContext, IList<string>, string, DateTimeOffset?, DateTimeOffset?, string, bool, CancellationToken)
IAcmeContextExtensions.NewReplacementOrder(IAcmeContext, IList<Identifier>, string, DateTimeOffset?, DateTimeOffset?, CancellationToken)
IAcmeContextExtensions.NewReplacementOrder(IAcmeContext, IList<string>, string, DateTimeOffset?, DateTimeOffset?, CancellationToken)
IAcmeContextExtensions.TermsOfService(IAcmeContext, CancellationToken)
  • Edit this page
  • View Source
© 2018 Certes Project
Back to top