Package net.ygbstudio.powerwp4j.services
Class SSLContexts
java.lang.Object
net.ygbstudio.powerwp4j.services.SSLContexts
Factory for
SSLContext instances used by the WordPress client.
Provides helpers for default, custom trust-manager, and trust-store configurations.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull SSLContextReturns a default TLS context with no custom managers.static @NotNull SSLContextwithTrustManagers(TrustManager[] trustManagers) Returns an SSL context using the given trust managers.static @NotNull SSLContextwithTrustStore(KeyStore keyStore) Returns an SSL context initialized from the given trust store.
-
Method Details
-
defaultSSLContext
Returns a default TLS context with no custom managers.- Returns:
- default
SSLContext
-
withTrustManagers
Returns an SSL context using the given trust managers.- Parameters:
trustManagers- trust managers to use- Returns:
- configured
SSLContext - Throws:
SSLConfigurationException- if the TLS algorithm is unavailable or init fails
-
withTrustStore
Returns an SSL context initialized from the given trust store.- Parameters:
keyStore- trust store containing trusted certificates- Returns:
- configured
SSLContext - Throws:
SSLConfigurationException- if the trust store cannot be initialized
-