Comments (7)
Not a good message. 😞
I think what happened is acme
could not fetch your ACME account by the given key.
Have you done the registration process?
from certes.
Yes, registration done. I've fetched sources instead of nuget and found where error happens: in method AcmeHttpClient.Post. Error message is "urn:ietf:params:acme:error:accountDoesNotExist" as you said, but I've registered first and saved pemKey. Then I do following as written in example:
var pemKey = File.ReadAllText("AcmeAccountPemKey.txt");
var accountKey = KeyFactory.FromPem(pemKey);
var acme = new AcmeContext(WellKnownServers.LetsEncryptStagingV2, accountKey);
var account = acme.Account();
var order = await acme.NewOrder(new[] { "some.domain.net" });
It'd be more convenient if inner exception contained more precize error message, e.g. message from letencrypt.
Now I'll make some expreriments and then will write results.
from certes.
In creating account example I made app to wait for end of account creation process and only then save pem to file. After that, error dissapeared. May be it is coincidence, may be not.
var acme = new AcmeContext(WellKnownServers.LetsEncryptStagingV2);
var account = acme.NewAccount("[email protected]", true).GetAwaiter().GetResult();
var pemKey = acme.AccountKey.ToPem();
File.WriteAllText("AcmeAccountPemKey.txt", pemKey);
I noticed, that requests are processed quite long time, may me acme.AccountKey.ToPem returns before account created with incorrect value?
from certes.
Yes, you need to wait for the task to complete. If you exit before the task complete, the NewAccount
request to Let's Encrypt will get canceled.
It may be better if you do var account = await acme.NewAccount("[email protected]", true);
?
from certes.
Yes. But to prevent misunderstanding, acme.AccountKey.ToPem() should not return before account created.
from certes.
I agree with you in this use case. Just in general AcmeContext.AccountKey
is the key pair associated with the context, it could be an existing key, new key, or custom key generate by OpenSSL. So, it cannot guarantee a valid and active account exists.
from certes.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from certes.
Related Issues (20)
- Get System.NullReferenceException: 'Object reference not set to an instance of an object.' while creating new account HOT 1
- How to generate public and private keys HOT 3
- Confusion on base documentation HOT 16
- Latest stable build 3.0.4 tag? HOT 3
- CertificateInfo inaccessible
- There is no such function CertificateInfo
- Certes breaks when the default JsonSerializerSettings includes DefaultValueHandling.Ignore
- NewAccount HOT 3
- ZeroSSL
- Different line endings for certificate, certificate chain and private key
- Native AOT support HOT 5
- Upgrade to BouncyCastle.Cryptography HOT 1
- Planned changes to Lets Encrypt - short chain delivery HOT 7
- Error Accessing Existing Account HOT 1
- Unknown CertificateInfo Class
- Wildcard SAN challenge for the non-* HOT 1
- Version 3.0.4? HOT 5
- IAuthorizationContext.Http().Result returns Nothing if OrderName starts with wildcard HOT 1
- It encounters a full break when using in Visual Basic.
- OCSP Must-Staple support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from certes.