public AccountDetails(ACMESharp.Protocol.AccountDetails accountDetails, IJwsTool clientSigner) { Kid = accountDetails.Kid; TosLink = accountDetails.TosLink; Account accountPayload = accountDetails.Payload; if (null == accountPayload) { throw new ArgumentNullException("accountDetails.Payload"); } Id = accountPayload.Id; Contact = accountPayload.Contact; // test server returns testing in status if (Enum.TryParse <AccountStatus>(accountPayload.Status, true, out AccountStatus accountStatus)) { Status = accountStatus; } TermsOfServiceAgreed = accountPayload.TermsOfServiceAgreed ?? false; OrdersUrl = accountPayload.Orders; InitialIp = accountPayload.InitialIp; CreatedAt = accountPayload.CreatedAt; Agreement = accountPayload.Agreement; KeyType = clientSigner.JwsAlg; KeyExport = clientSigner.Export(); }
public AccountSigner(IJwsTool source) { KeyType = source.JwsAlg; KeyExport = source.Export(); }