Package org.somda.sdc.dpws.crypto
Class CryptoConfigurator
-
- All Implemented Interfaces:
public class CryptoConfiguratorSupports generation of server and client SSL configurations.
Can either generate default configurations or derive configurations based on CryptoSettings objects.
-
-
Method Summary
Modifier and Type Method Description SSLContextcreateSslContextFromCryptoConfig(CachingCryptoSettings cryptoSettings)Accepts a CachingCryptoSettings object and creates an SSLContext object or retrieves it from the cache. SSLContextcreateSslContextFromCryptoConfig(CryptoSettings cryptoSettings)Accepts a CryptoSettings object and creates an SSLContext object. static List<X509Certificate>getCertificates(@Nullable() CryptoSettings cryptoSettings)Accepts a CryptoSettings object and extracts all certificates from the keystore. static SSLContextcreateSslContextFromSystemProperties()Creates a default SSLContext object based on system properties. -
-
Method Detail
-
createSslContextFromCryptoConfig
SSLContext createSslContextFromCryptoConfig(CachingCryptoSettings cryptoSettings)
Accepts a CachingCryptoSettings object and creates an SSLContext object or retrieves it from the cache.
- Parameters:
cryptoSettings- the crypto settings.- Returns:
an SSlContext matching the given crypto settings.
-
createSslContextFromCryptoConfig
SSLContext createSslContextFromCryptoConfig(CryptoSettings cryptoSettings)
Accepts a CryptoSettings object and creates an SSLContext object.
- Parameters:
cryptoSettings- the crypto settings.- Returns:
an SSlContext matching the given crypto settings.
-
getCertificates
static List<X509Certificate> getCertificates(@Nullable() CryptoSettings cryptoSettings)
Accepts a CryptoSettings object and extracts all certificates from the keystore.
- Parameters:
cryptoSettings- the crypto settings.- Returns:
a list of all X509 certificates from the keystore or an empty list.
-
createSslContextFromSystemProperties
static SSLContext createSslContextFromSystemProperties()
Creates a default SSLContext object based on system properties.
- Returns:
an SSLContext with default crypto settings.
-
-
-
-