kubernetes/vendor/golang.org/x/crypto/ssh/common.go

const compressionNone

const serviceUserAuth

const serviceSSH

var supportedCiphers

var preferredCiphers

var supportedKexAlgos

var serverForbiddenKexAlgos

var preferredKexAlgos

var supportedHostKeyAlgos

var supportedMACs

var supportedCompressions

var hashFuncs

// algorithmsForKeyFormat returns the supported signature algorithms for a given
// public key format (PublicKey.Type), in order of preference. See RFC 8332,
// Section 2. See also the note in sendKexInit on backwards compatibility.
func algorithmsForKeyFormat(keyFormat string) []string {}

// isRSA returns whether algo is a supported RSA algorithm, including certificate
// algorithms.
func isRSA(algo string) bool {}

func isRSACert(algo string) bool {}

var supportedPubKeyAuthAlgos

// unexpectedMessageError results when the SSH message that we received didn't
// match what we wanted.
func unexpectedMessageError(expected, got uint8) error {}

// parseError results from a malformed SSH message.
func parseError(tag uint8) error {}

func findCommon(what string, client []string, server []string) (common string, err error) {}

type directionAlgorithms

// rekeyBytes returns a rekeying intervals in bytes.
func (a *directionAlgorithms) rekeyBytes() int64 {}

var aeadCiphers

type algorithms

func findAgreedAlgorithms(isClient bool, clientKexInit, serverKexInit *kexInitMsg) (algs *algorithms, err error) {}

const minRekeyThreshold

type Config

// SetDefaults sets sensible values for unset fields in config. This is
// exported for testing: Configs passed to SSH functions are copied and have
// default values set automatically.
func (c *Config) SetDefaults() {}

// buildDataSignedForAuth returns the data that is signed in order to prove
// possession of a private key. See RFC 4252, section 7. algo is the advertised
// algorithm, and may be a certificate type.
func buildDataSignedForAuth(sessionID []byte, req userAuthRequestMsg, algo string, pubKey []byte) []byte {}

func appendU16(buf []byte, n uint16) []byte {}

func appendU32(buf []byte, n uint32) []byte {}

func appendU64(buf []byte, n uint64) []byte {}

func appendInt(buf []byte, n int) []byte {}

func appendString(buf []byte, s string) []byte {}

func appendBool(buf []byte, b bool) []byte {}

// newCond is a helper to hide the fact that there is no usable zero
// value for sync.Cond.
func newCond() *sync.Cond {}

type window

// add adds win to the amount of window available
// for consumers.
func (w *window) add(win uint32) bool {}

// close sets the window to closed, so all reservations fail
// immediately.
func (w *window) close() {}

// reserve reserves win from the available window capacity.
// If no capacity remains, reserve will block. reserve may
// return less than requested.
func (w *window) reserve(win uint32) (uint32, error) {}

// waitWriterBlocked waits until some goroutine is blocked for further
// writes. It is used in tests only.
func (w *window) waitWriterBlocked() {}