fszlin / certes

A client implementation for the Automated Certificate Management Environment (ACME) protocol
MIT License
548 stars 121 forks source link

NewAccount #310

Closed liu8857 closed 1 year ago

liu8857 commented 1 year ago

:beer: Feel free to discuss anything :beer: Executing the NewAccount method did not respond and did not report an error

liu8857 commented 1 year ago

async await

webprofusion-chrisc commented 1 year ago

As you'll see from the first example on the README of this project yes the API is async and you need to await anything that makes a call to the ACME api.

var acme = new AcmeContext(WellKnownServers.LetsEncryptStagingV2);
var account = await acme.NewAccount("admin@example.com", true);

// Save the account key for later use
var pemKey = acme.AccountKey.ToPem();
liu8857 commented 1 year ago

As you'll see from the first example on the README of this project yes the API is async and you need to await anything that makes a call to the ACME api.

var acme = new AcmeContext(WellKnownServers.LetsEncryptStagingV2);
var account = await acme.NewAccount("admin@example.com", true);

// Save the account key for later use
var pemKey = acme.AccountKey.ToPem();