x/crypto/acme: better document Register behavior when account already exists #37889
Labels
Milestone
Comments
/cc @FiloSottile @x1ddos |
Change https://golang.org/cl/233197 mentions this issue: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently when
Client.Register
is called and an account already exists the behavior diverges based on the server implementation. If the server is pre-8555 it just returns the account object and no error, if it is 8555 compliant it returns no account object and aErrAccountAlreadyExists
error. In the latter case it will also store the account KID internally, allowing for follow-up requests (although this is not documented).Ideally for 8555 servers
Client.Register
should return the account object when it already exists (perhaps in conjunction with theErrAccountAlreadyExists
error) so that the user doesn't have to do two requests to actually get the object (Client.Regiser
andClient.GetReg
), but at the least the documentation should be improved to actually say what happens in this circumstance.The text was updated successfully, but these errors were encountered: