Documentation ¶
Index ¶
- Variables
- func CertInfo(cert string) (principals []string, before uint64, keyType string, err error)
- func CertKeyTypeIsBuggy(s string) bool
- func CertKeyTypeIsDeprecated(s string) bool
- func CertStillValid(path string) bool
- func FindUserPubKeys(keys []string) ([]string, error)
- func GetUserPubKey(key string) (string, error)
- func Sign(addr, user, password, pubKey, otp string) (certificate string, err error)
- func UserPubKeyExists(key string) (string, error)
- func WriteUserSignedKey(signedKey string, key string) (err error)
Constants ¶
This section is empty.
Variables ¶
var DefaultSSHKeys = []string{
"~/.ssh/id_dsa.pub",
"~/.ssh/id_ecdsa.pub",
"~/.ssh/id_ecdsa_sk.pub",
"~/.ssh/id_ed25519.pub",
"~/.ssh/id_ed25519_sk.pub",
"~/.ssh/id_rsa.pub",
}
DefaultSSHKeys is based on `man ssh` -i identity_file default values
Functions ¶
func CertKeyTypeIsBuggy ¶ added in v0.7.1
CertKeyTypeIsBuggy returns true if certificate key type is buggy with some versions of openssh client/server combination, see discussion for more details : https://github.com/signmykeyio/signmykey/pull/138
func CertKeyTypeIsDeprecated ¶ added in v0.7.1
CertKeyTypeIsDeprecated returns true if certificate key type is deprecated by openssh
func CertStillValid ¶
CertStillValid checks if the certificate is not expired.
func FindUserPubKeys ¶ added in v0.7.0
FindUserPubKeys checks every pubkey in `keys` list and returns only existsing keys (or error if all pubkeys don't exist)
func GetUserPubKey ¶
GetUserPubKey returns user's SSH public key as string.
func UserPubKeyExists ¶
UserPubKeyExists checks if public key file exists.
func WriteUserSignedKey ¶
WriteUserSignedKey writes user certificate on disk.
Types ¶
This section is empty.