Comments (5)
In commit 7c03309, I have added a new writer for writing the leaf certificate and certificate chain, and documented that the writers are closed after use. It will be available with the next release.
from acme4j.
You are right... I am going to fix this. Thanks!
from acme4j.
After thinking about it again, it seems to me that fixing this could be tricky. As the JcaPEMWriter
is created in writeX509Certificate(...)
, the caller has no way to close or flush it...
from acme4j.
I am not very comfortable with the idea either, as I would change the behavior of the methods. Some people might expect that they don't need to care about closing the writers, e. g. by using a construction like CertificateUtils.writeX509Certificate(cert, new FileWriter("foo.csr"));
.
The only use case I see is to write a combined file of the leaf certificate and the certificate chain. So maybe a new method writeX509Certificates(Writer w, X509Certificate leaf, X509Certificate[] chain)
would also resolve the issue?
from acme4j.
Yes, that's pretty much my use case, though I have to insert some custom text in between. However, for such cases it should be straightforward to use Bouncy Castle's JcaPEMWriter
directly. Therefore I do not think that it is necessary to introduce an additional method.
Instead I would suggest to explicitly state in the javadoc that writeX509Certificate(...)
and writeX509CertificateChain(...)
do close the passed-in stream/writer. It would also be great to have a pointer to JcaPEMWriter
somewhere in the documentation and maybe some example code.
from acme4j.
Related Issues (20)
- Remove service loader mechanism HOT 3
- Did you find any provider for RFC8823 support / email-reply-00 challenges? HOT 4
- The challenge status is always "INVALID" HOT 5
- The challenge status was always "INVALID" HOT 13
- http://${domain}/.well-known/acme-challenge/${token}
- acme4j example is creating zero- length crt files HOT 10
- preferred-chain attribute, for alternate chains HOT 2
- Can only parse traditional files HOT 2
- EAB HMAC keys with arbitrary lengths HOT 5
- CVE-2023-33201 from Bouncy Castle HOT 8
- add utils to do pre validation or help
- How to check if certificate needs renewal without ordering a new one? HOT 8
- Is there a way to keep txt unchanged and verify twice? HOT 2
- New account registration HOT 1
- Bouncy Castel dependency? HOT 9
- Allow to pass query parameters in directory URL HOT 2
- Provide example showing how to save and load existing certificates HOT 2
- AcmeJsonResource#update throws AcmeRetryAfterException even if resource is ready HOT 3
- Abstract away certificate renewal HOT 6
- response is not reading correctly HOT 3
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 acme4j.