![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
fi.protonode:reloading-keystore
Advanced tools
KeyStore with certificate hot-reload and PEM file support.
This project is a library that implements custom KeyStore
with following features:
.pem
files, in addition to .p12
and .jks
keystore files.These features can be implemented in relatively few lines of code, without external dependencies and without background threads.
Use this project either as a tutorial on how to implement custom KeyStoreSpi
or import the library directly into your application.
The code is compatible with JDK 8 and above.
See the implementation description for details and related background discussion about JSSE (Java Secure Socket Extension).
Read the latest API documentation here.
Following example shows how to create a TLS server that reads its server credentials from PEM files.
It constructs an instance of custom KeyStore
which will have the special capabilities mentioned previously.
It is then passed to KeyManager
just like the standard KeyStores
.
// Create KeyManagerFactory with our KeyStoreSpi constructed from:
// server.pem and server-key.pem.
KeyManagerFactory kmf = KeyManagerFactory.getInstance("NewSunX509");
kmf.init(new KeyStoreBuilderParameters(ReloadingKeyStore.Builder.fromPem(
Paths.get("server.pem"), Paths.get("server-key.pem"))));
// Otherwise continue as with any KeyStore implementation:
// Initialize SSLContext with our KeyManager.
SSLContext ctx = SSLContext.getInstance("TLS");
ctx.init(kmf.getKeyManagers(), null, null);
// Create server socket and start accepting connections.
// Server will query our KeyManager for server credentials every time it
// gets a new connection from the clients. Credentials will be reloaded
// automatically when they are updated on disk.
SSLServerSocketFactory ssf = ctx.getServerSocketFactory();
SSLServerSocket socket = (SSLServerSocket) ssf.createServerSocket(
8443, 1, InetAddress.getByName("localhost"));
try (SSLSocket client = (SSLSocket) socket.accept()) {
// ...
}
For more code examples, see the test suite here.
FAQs
Unknown package
We found that fi.protonode:reloading-keystore demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.