Documentation ¶
Index ¶
- func GenRandomString() (string, error)
- func VerifyChallengeResponseSignature(sshCert *ssh.Certificate, signatureFormat string, signatureBlob []byte, ...) error
- func WithAgentGenerateChallengeResponseSignature(clientNonce string, challenge string, hostname string, agentClient agent.Agent, ...) (*ssh.Signature, error)
- func WithCertAndPrivateKeyGenerateChallengeResponseSignature(nonce1 string, challenge string, hostname string, certificate *ssh.Certificate, ...) (*ssh.Signature, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenRandomString ¶
GenRandomString returns 32 bytes of random string encoded with URL base64 encoding
func VerifyChallengeResponseSignature ¶
func VerifyChallengeResponseSignature(sshCert *ssh.Certificate, signatureFormat string, signatureBlob []byte, clientNonce, challenge string, hostname string) error
VerifyChallengeResponseSignature validates that the signature of a blob is actually signed by the corresponding certificate. Does NOT do and checks on the certificate.
func WithAgentGenerateChallengeResponseSignature ¶
func WithAgentGenerateChallengeResponseSignature(clientNonce string, challenge string, hostname string, agentClient agent.Agent, key *agent.Key) (*ssh.Signature, error)
WithAgentGenerateChallengeResponseSignature generates, given the client parameters, a valid ssh signature that can be latter used to sing messages back to the server
func WithCertAndPrivateKeyGenerateChallengeResponseSignature ¶
func WithCertAndPrivateKeyGenerateChallengeResponseSignature(nonce1 string, challenge string, hostname string, certificate *ssh.Certificate, privateKey interface{}) (*ssh.Signature, error)
WithCertAndPrivateKeyGenerateChallengeResponseSignature generates similar to WithAgentGenerateChallengeResponseSignature but instead of an agent uses an explicit certifiate and keu
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.