add missing class SshKeyPair

This commit is contained in:
az 2022-09-10 16:48:34 +02:00
parent a4bb1d228c
commit 4dcbc448ff

View file

@ -0,0 +1,15 @@
package org.domaindrivenarchitecture.provs.framework.ubuntu.keys
import org.domaindrivenarchitecture.provs.framework.core.Secret
class SshKeyPair(publicKey: Secret, privateKey: Secret) : KeyPair(publicKey, privateKey) {
val keyType = publicKey.plain().substringBefore(" ")
val sshAlgorithmName =
if (keyType.startsWith("ssh-")) {
keyType.removePrefix("ssh-")
} else {
"unknownKeyType"
}
}