Class TlsUtil
java.lang.Object
io.opentelemetry.exporter.internal.TlsUtil
Utilities for working with TLS.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final String
private static final List
<KeyFactory> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static byte[]
decodePem
(byte[] pem) (package private) static PrivateKey
generatePrivateKey
(PKCS8EncodedKeySpec keySpec, List<KeyFactory> keyFactories) static X509KeyManager
keyManager
(byte[] privateKeyPem, byte[] certificatePem) CreatesKeyManager
initiated by keystore containing single private key with matching certificate chain.static X509TrustManager
trustManager
(byte[] trustedCertificatesPem) Returns aTrustManager
for the given trusted certificates.
-
Field Details
-
PEM_KEY_HEADER
- See Also:
-
PEM_KEY_FOOTER
- See Also:
-
SUPPORTED_KEY_FACTORIES
-
-
Constructor Details
-
TlsUtil
private TlsUtil()
-
-
Method Details
-
keyManager
public static X509KeyManager keyManager(byte[] privateKeyPem, byte[] certificatePem) throws SSLException CreatesKeyManager
initiated by keystore containing single private key with matching certificate chain.- Throws:
SSLException
-
generatePrivateKey
static PrivateKey generatePrivateKey(PKCS8EncodedKeySpec keySpec, List<KeyFactory> keyFactories) throws SSLException - Throws:
SSLException
-
trustManager
Returns aTrustManager
for the given trusted certificates.- Throws:
SSLException
-
decodePem
static byte[] decodePem(byte[] pem)
-