MCPcopy Index your code

hub / github.com/refraction-networking/utls / functions

Functions1,354 in github.com/refraction-networking/utls

↓ 262 callersMethodsendAlert
sendAlert sends a TLS alert message.
conn.go:860
↓ 164 callersMethodClone
Clone returns a shallow clone of c or nil if c is nil. It is safe to clone a [Config] that is being used concurrently by a TLS client or server.
common.go:976
↓ 129 callersMethodIntn
Intn is equivalent to math/read.Intn, except it returns 0 if n <= 0 instead of panicking.
u_prng.go:155
↓ 122 callersMethodWrite
([]byte)
handshake_messages.go:1976
↓ 96 callersMethodError
()
alert.go:109
↓ 93 callersMethodClose
Close closes the connection.
conn.go:1425
↓ 66 callersMethodHandshake
Handshake runs the client or server handshake protocol if it has not yet been run. Most uses of this package need not call Handshake explicitly: the
conn.go:1501
↓ 65 callersMethodString
()
alert.go:101
↓ 53 callersMethodBytes
Bytes encodes the session, including any private fields, so that it can be parsed by [ParseSessionState]. The encoding contains secret values critical
ticket.go:108
↓ 43 callersMethodsetErrorLocked
(err error)
conn.go:199
↓ 42 callersFunctionrandomBytes
(n int, rand *rand.Rand)
handshake_messages_test.go:140
↓ 39 callersFunctionServer
Server returns a new TLS server side connection using conn as the underlying transport. The configuration config must be non-nil and must include at l
tls.go:34
↓ 35 callersMethodLen
()
u_tls_extensions.go:95
↓ 35 callersMethodSum
()
prf.go:203
↓ 34 callersMethodrand
()
common.go:1152
↓ 34 callersMethodwriteHandshakeRecord
writeHandshakeRecord writes a handshake message to the connection and updates the record layer state. If transcript is non-nil the marshaled message i
conn.go:1049
↓ 33 callersMethodConnectionState
ConnectionState returns basic TLS details about the connection.
conn.go:1622
↓ 33 callersMethodRead
includes header Read reads up to len(p) bytes into p. It returns the number of bytes read (0 <= n <= len(p)) and any error encountered.
u_tls_extensions.go:99
↓ 33 callersMethodSetTransportParameters
SetTransportParameters sets the transport parameters to send to the peer. Server connections may delay setting the transport parameters until after r
quic.go:345
↓ 33 callersFunctionlocalPipe
(t testing.TB)
handshake_test.go:337
↓ 32 callersFunctionClient
Client returns a new TLS client side connection using conn as the underlying transport. The config cannot be nil: users must set either ServerName or
tls.go:47
↓ 32 callersMethodClose
()
tls_test.go:942
↓ 31 callersFunctionfromHex
(s string)
handshake_test.go:543
↓ 30 callersMethodreadHandshake
readHandshake reads the next handshake message from the record layer. If transcript is non-nil, the message is written to the passed transcriptHash.
conn.go:1089
↓ 30 callersFunctionrunClientTestTLS12
(t *testing.T, template *clientTest)
handshake_client_test.go:491
↓ 29 callersFunctiontranscriptMsg
transcriptMsg is a helper used to hash messages which are not hashed when they are read from, or written to, the wire. This is typically the case for
handshake_messages.go:1990
↓ 28 callersFunctionrunServerTestTLS12
(t *testing.T, template *serverTest)
handshake_server_test.go:790
↓ 26 callersFunctiontestHandshake
(t *testing.T, clientConfig, serverConfig *Config)
handshake_test.go:478
↓ 25 callersFunctionrunServerTestTLS13
(t *testing.T, template *serverTest)
handshake_server_test.go:794
↓ 23 callersMethodSize
()
cipher_suites.go:601
↓ 23 callersFunctiongetUTLSTestConfig
* * HELPER FUNCTIONS BELOW * */
u_conn_test.go:243
↓ 22 callersFunctionunexpectedMessageError
(wanted, got any)
common.go:1730
↓ 21 callersFunctionisGREASEUint16
(v uint16)
u_common.go:717
↓ 19 callersMethodFlipWeightedCoin
FlipWeightedCoin returns the result of a weighted random coin flip. If the weight is 0.5, the outcome is equally likely to be true or false. If the we
u_prng.go:145
↓ 18 callersFunctionnewTestQUICClient
(t *testing.T, config *QUICConfig)
quic_test.go:27
↓ 18 callersFunctionrunTestQUICConnection
(ctx context.Context, cli, srv *testQUICConn, onEvent func(e QUICEvent, src, dst *testQUICConn) bool)
quic_test.go:96
↓ 18 callersFunctionuAssert
(condition bool, msg string)
u_common.go:799
↓ 17 callersFunctionquicError
quicError ensures err is an AlertError. If err is not already, quicError wraps it with alertInternalError.
quic.go:358
↓ 17 callersMethodtime
()
common.go:1160
↓ 16 callersFunctioncipherSuiteTLS13ByID
(id uint16)
cipher_suites.go:674
↓ 16 callersFunctionnewTestQUICServer
(t *testing.T, config *QUICConfig)
quic_test.go:38
↓ 16 callersFunctionreadUint8LengthPrefixed
readUint8LengthPrefixed acts like s.ReadUint8LengthPrefixed, but targets a []byte instead of a cryptobyte.String.
handshake_messages.go:55
↓ 15 callersMethodPut
Put adds the ClientSessionState to the cache with the given key. It might get called multiple times in a connection if a TLS 1.3 server provides more
common.go:389
↓ 15 callersFunctionreadUint16LengthPrefixed
readUint16LengthPrefixed acts like s.ReadUint16LengthPrefixed, but targets a []byte instead of a cryptobyte.String.
handshake_messages.go:61
↓ 15 callersFunctionrunClientTestTLS13
(t *testing.T, template *clientTest)
handshake_client_test.go:495
↓ 14 callersFunctionAppend
Append appends i in the QUIC varint format.
internal/quicvarint/varint.go:79
↓ 14 callersMethodhelloName
()
u_conn_test.go:23
↓ 14 callersFunctiontestClientHelloFailure
(t *testing.T, serverConfig *Config, m handshakeMessage, expectedSubStr string)
handshake_server_test.go:45
↓ 14 callersFunctiontestDowngradeCanary
(t *testing.T, clientVersion, serverVersion uint16)
handshake_client_test.go:2504
↓ 13 callersFunctionNewLRUClientSessionCache
NewLRUClientSessionCache returns a [ClientSessionCache] with the given capacity that uses an LRU strategy. If capacity is < 1, a default capacity is u
common.go:1665
↓ 13 callersFunctionUClient
UClient returns a new uTLS client, with behavior depending on clientHelloID. Config CAN be nil, but make sure to eventually specify ServerName.
u_conn.go:64
↓ 13 callersFunctionX509KeyPair
var x509keypairleaf = godebug.New("x509keypairleaf") [uTLS] X509KeyPair parses a public/private key pair from a pair of PEM encoded data. On successfu
tls.go:254
↓ 13 callersMethodconnectionStateLocked
var tlsunsafeekm = godebug.New("tlsunsafeekm") // [uTLS] unsupportted
conn.go:1630
↓ 13 callersFunctionrunUTLSClientTestTLS12
(t *testing.T, template *clientTest, hello helloStrategy)
u_conn_test.go:454
↓ 12 callersMethodAccept
Accept waits for and returns the next incoming TLS connection. The returned connection is of type *Conn.
tls.go:65
↓ 12 callersMethodBuildHandshakeState
BuildHandshakeState behavior varies based on ClientHelloID and whether it was already called before. If HelloGolang: [only once] make default Client
u_conn.go:96
↓ 12 callersFunctionExpandLabel
We don't set the service indicator in this package but we delegate that to the underlying functions because the TLS 1.3 KDF does not have a standard o
internal/tls13/tls13.go:21
↓ 12 callersMethodGet
Get searches for a ClientSessionState associated with the given key. On return, ok is true if one was found.
common.go:383
↓ 12 callersFunctionderiveSecret
(hash func() H, secret []byte, label string, transcript fips140.Hash)
internal/tls13/tls13.go:50
↓ 12 callersFunctionskipFIPS
(t *testing.T)
tls_test.go:182
↓ 12 callersFunctionsupportedSignatureAlgorithms
supportedSignatureAlgorithms returns the supported signature algorithms.
common.go:1735
↓ 11 callersMethodClose
()
handshake_test.go:282
↓ 11 callersMethodFingerprintClientHello
FingerprintClientHello returns a ClientHelloSpec which is based on the ClientHello that is passed in as the data argument If the ClientHello passed i
u_fingerprinter.go:36
↓ 11 callersFunctionnewLocalListener
(t testing.TB)
tls_test.go:170
↓ 11 callersFunctiontempFile
tempFile creates a temp file containing contents and returns its path.
handshake_test.go:300
↓ 11 callersFunctiontypeAndHashFromSignatureScheme
typeAndHashFromSignatureScheme returns the corresponding signature type and crypto.Hash for a given TLS SignatureScheme.
auth.go:98
↓ 10 callersMethodApplyPreset
ApplyPreset should only be used in conjunction with HelloCustom to apply custom specs. Fields of TLSExtensions that are slices/pointers are shared acr
u_parrots.go:2767
↓ 10 callersFunctionDial
Dial connects to the given network address using net.Dial and then initiates a TLS handshake, returning the resulting TLS connection. Dial interprets
tls.go:171
↓ 10 callersFunctionRequired
()
internal/fips140tls/fipstls.go:3
↓ 10 callersMethodReset
()
cipher_suites.go:603
↓ 10 callersFunctionShuffleChromeTLSExtensions
ShuffleChromeTLSExtensions shuffles the extensions in the ClientHelloSpec to avoid ossification. It shuffles every extension except GREASE, padding an
u_parrots.go:2701
↓ 10 callersMethodToPublic
()
u_public.go:638
↓ 10 callersMethodflush
()
conn.go:954
↓ 10 callersMethodsetTrafficSecret
(suite *cipherSuiteTLS13, level QUICEncryptionLevel, secret []byte)
conn.go:232
↓ 10 callersFunctionutlsIdToSpec
(id ClientHelloID)
u_parrots.go:33
↓ 10 callersMethodwriteKeyLog
(label string, clientRandom, secret []byte)
common.go:1583
↓ 9 callersFunctionbenchmarkHandshakeServer
(b *testing.B, version uint16, cipherSuite uint16, curve CurveID, cert []byte, key crypto.PrivateKey)
handshake_server_test.go:1342
↓ 9 callersFunctioncipherSuiteByID
(id uint16)
cipher_suites.go:656
↓ 8 callersMethodBuildNameToCertificate
BuildNameToCertificate parses c.Certificates and builds c.NameToCertificate from the CommonName and SubjectAlternateName fields of each of the leaf ce
common.go:1556
↓ 8 callersFunctionGetBoringGREASEValue
will panic if ssl_grease_last_index[index] is out of bounds.
u_tls_extensions.go:979
↓ 8 callersMethodHandshakeContext
HandshakeContext runs the client or server handshake protocol if it has not yet been run. The provided Context must be non-nil. If the context is can
conn.go:1515
↓ 8 callersFunctiondumpResponseNoBody
(response *http.Response)
examples/old/examples.go:450
↓ 8 callersFunctiongenerateECDHEKey
generateECDHEKey returns a PrivateKey that implements Diffie-Hellman according to RFC 8446, Section 4.2.8.2.
key_schedule.go:64
↓ 8 callersMethodgetPrivatePtr
()
u_public.go:513
↓ 8 callersMethodgetPublicPtr
()
u_public.go:325
↓ 8 callersFunctionhttpGetOverConn
(conn net.Conn, alpn string)
examples/old/examples.go:415
↓ 8 callersMethodmarshal
()
common.go:1634
↓ 8 callersMethodprepareCipherSpec
prepareCipherSpec sets the encryption and MAC states that a subsequent changeCipherSpec will use.
conn.go:210
↓ 8 callersFunctionprependRecordHeader
prependRecordHeader prepends a record header to a handshake messsage if attempting to mimic an existing connection the minTLSVersion can be found in t
u_fingerprinter_test.go:175
↓ 8 callersFunctionrunClientTestTLS10
(t *testing.T, template *clientTest)
handshake_client_test.go:483
↓ 8 callersFunctionrunResumptionCheck
(helloID tls.ClientHelloID, getCustomSpec func() *tls.ClientHelloSpec, expectResumption ResumptionType, server
examples/tls-resumption/main.go:49
↓ 8 callersFunctionselectSignatureScheme
selectSignatureScheme picks a SignatureScheme from the peer's preference list that works with the selected certificate. It's only called for protocol
auth.go:232
↓ 8 callersMethodwriteRecordLocked
writeRecordLocked writes a TLS record with the given type and payload to the connection and updates the record layer state.
conn.go:975
↓ 7 callersMethodClose
()
conn_test.go:269
↓ 7 callersMethodDial
Dial connects to the given network address and initiates a TLS handshake, returning the resulting TLS connection. The returned [Conn], if any, will a
tls.go:197
↓ 7 callersMethodToPrivate
()
u_public.go:634
↓ 7 callersFunctionclientHelloSpecJSONTestIdentifier
(id ClientHelloID)
u_clienthello_json_test.go:121
↓ 7 callersMethodclientSessionCacheKey
clientSessionCacheKey returns a key used to cache sessionTickets that could be used to resume previously negotiated TLS sessions with a server.
handshake_client.go:1332
↓ 7 callersFunctionlegacyTypeAndHashFromPublicKey
legacyTypeAndHashFromPublicKey returns the fixed signature type and crypto.Hash for a given public key used with TLS 1.0 and 1.1, before the introduct
auth.go:131
↓ 7 callersMethodmaxSupportedVersion
(isClient bool)
common.go:1235
next →1–100 of 1,354, ranked by callers