add missing class SshKeyPair
This commit is contained in:
parent
a4bb1d228c
commit
4dcbc448ff
1 changed files with 15 additions and 0 deletions
|
@ -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"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue