Class DefaultPrivateKeyLoader
java.lang.Object
io.micronaut.kubernetes.client.openapi.ssl.DefaultPrivateKeyLoader
- All Implemented Interfaces:
KubernetesPrivateKeyLoader
@Singleton
@Internal
public class DefaultPrivateKeyLoader
extends Object
implements KubernetesPrivateKeyLoader
Default implementation of the private key loader which supports PKCS#1, PKCS#8 and SEC 1 private key standards.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionloadPrivateKey
(byte[] clientKey) Loads a private key from PEM-encoded private key data.
-
Constructor Details
-
DefaultPrivateKeyLoader
public DefaultPrivateKeyLoader()
-
-
Method Details
-
loadPrivateKey
public PrivateKey loadPrivateKey(byte[] clientKey) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException Description copied from interface:KubernetesPrivateKeyLoader
Loads a private key from PEM-encoded private key data.- Specified by:
loadPrivateKey
in interfaceKubernetesPrivateKeyLoader
- Parameters:
clientKey
- the PEM-encoded private key data- Returns:
PrivateKey
instance- Throws:
IOException
NoSuchAlgorithmException
InvalidKeySpecException
-