MCPcopy Create free account

hub / github.com/XTLS/REALITY / functions

Functions457 in github.com/XTLS/REALITY

↓ 249 callersMethodsendAlert
sendAlert sends a TLS alert message.
conn.go:902
↓ 67 callersMethodWrite
([]byte)
handshake_messages.go:1925
↓ 38 callersMethodsetErrorLocked
(err error)
conn.go:203
↓ 36 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:111
↓ 34 callersMethodSum
()
prf.go:203
↓ 27 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:966
↓ 26 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:1091
↓ 25 callersMethodrand
()
common.go:1150
↓ 25 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:1160
↓ 24 callersMethodString
()
alert.go:101
↓ 24 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:1939
↓ 21 callersMethodSize
()
cipher_suites.go:581
↓ 20 callersFunctionunexpectedMessageError
(wanted, got any)
common.go:1717
↓ 17 callersMethodtime
()
common.go:1158
↓ 14 callersMethodError
()
alert.go:109
↓ 14 callersFunctionreadUint16LengthPrefixed
readUint16LengthPrefixed acts like s.ReadUint16LengthPrefixed, but targets a []byte instead of a cryptobyte.String.
handshake_messages.go:61
↓ 14 callersFunctionreadUint8LengthPrefixed
readUint8LengthPrefixed acts like s.ReadUint8LengthPrefixed, but targets a []byte instead of a cryptobyte.String.
handshake_messages.go:55
↓ 13 callersFunctioncipherSuiteTLS13ByID
(id uint16)
cipher_suites.go:653
↓ 13 callersMethodconnectionStateLocked
()
conn.go:1691
↓ 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
tls13/tls13.go:20
↓ 12 callersFunctionRequired
Required reports whether FIPS-approved settings are required. Required is true if FIPS 140-3 mode is enabled with GODEBUG=fips140=on, or if the crypt
fips140tls/fipstls.go:31
↓ 12 callersFunctionderiveSecret
(hash func() H, secret []byte, label string, transcript hash.Hash)
tls13/tls13.go:51
↓ 10 callersMethodClose
()
tls.go:88
↓ 10 callersMethodReset
()
cipher_suites.go:583
↓ 10 callersMethodsetTrafficSecret
(suite *cipherSuiteTLS13, level QUICEncryptionLevel, secret []byte)
conn.go:236
↓ 10 callersFunctiontypeAndHashFromSignatureScheme
typeAndHashFromSignatureScheme returns the corresponding signature type and crypto.Hash for a given TLS SignatureScheme.
auth.go:99
↓ 10 callersMethodwriteKeyLog
(label string, clientRandom, secret []byte)
common.go:1570
↓ 9 callersMethodflush
()
conn.go:996
↓ 9 callersFunctionquicError
quicError ensures err is an AlertError. If err is not already, quicError wraps it with alertInternalError.
quic.go:359
↓ 7 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:382
↓ 7 callersFunctiongenerateECDHEKey
generateECDHEKey returns a PrivateKey that implements Diffie-Hellman according to RFC 8446, Section 4.2.8.2.
key_schedule.go:63
↓ 7 callersFunctionisSupportedSignatureAlgorithm
(sigAlg SignatureScheme, supportedSignatureAlgorithms []SignatureScheme)
common.go:1752
↓ 7 callersMethodwriteRecordLocked
writeRecordLocked writes a TLS record with the given type and payload to the connection and updates the record layer state.
conn.go:1017
↓ 6 callersMethodRemoteAddr
RemoteAddr returns the remote network address.
conn.go:140
↓ 6 callersFunctionValue
(vals ...byte)
tls.go:153
↓ 6 callersFunctioncurveForCurveID
(id CurveID)
key_schedule.go:72
↓ 6 callersFunctionreadUint24LengthPrefixed
readUint24LengthPrefixed acts like s.ReadUint24LengthPrefixed, but targets a []byte instead of a cryptobyte.String.
handshake_messages.go:67
↓ 6 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:234
↓ 6 callersMethodsendAlertLocked
sendAlertLocked sends a TLS alert message.
conn.go:880
↓ 6 callersFunctionsupportedSignatureAlgorithms
supportedSignatureAlgorithms returns the supported signature algorithms for the given minimum TLS version, to advertise in ClientHello and Certificate
common.go:1724
↓ 5 callersMethodOverhead
64-bit sequence number
cipher_suites.go:481
↓ 5 callersFunctionclientHelloInfo
(ctx context.Context, c *Conn, clientHello *clientHelloMsg)
handshake_server.go:987
↓ 5 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:1289
↓ 5 callersFunctioncloneHash
cloneHash uses the encoding.BinaryMarshaler and encoding.BinaryUnmarshaler interfaces implemented by standard library hashes to clone the state of in
handshake_server_tls13.go:568
↓ 5 callersMethoddiscardHandshakeBuffer
discardHandshakeBuffer is called when there is no more need to buffer the entirety of the handshake messages.
prf.go:251
↓ 5 callersMethodfinishedHash
finishedHash generates the Finished verify_data or PskBinderEntry according to RFC 8446, Section 4.4.4. See sections 4.4 and 4.2.11.2 for the baseKey
key_schedule.go:37
↓ 5 callersMethodquicSetWriteSecret
(level QUICEncryptionLevel, suite uint16, secret []byte)
quic.go:394
↓ 4 callersMethodBlockSize
()
cipher_suites.go:582
↓ 4 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:1564
↓ 4 callersMethodLabeledExpand
(suiteID []byte, randomKey []byte, label string, info []byte, length uint16)
hpke/hpye.go:38
↓ 4 callersMethodLabeledExtract
(sid []byte, salt []byte, label string, inputKey []byte)
hpke/hpye.go:29
↓ 4 callersFunctionNewEarlySecret
(h func() H, psk []byte)
tls13/tls13.go:75
↓ 4 callersMethodRead
(b []byte)
tls.go:70
↓ 4 callersMethodSeal
(aad, plaintext []byte)
hpke/hpye.go:297
↓ 4 callersFunctioncipherSuiteByID
(id uint16)
cipher_suites.go:635
↓ 4 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:132
↓ 4 callersMethodmaxSupportedVersion
(isClient bool)
common.go:1227
↓ 4 callersMethodnewRecordHeaderError
(conn net.Conn, msg string)
conn.go:615
↓ 4 callersMethodprepareCipherSpec
prepareCipherSpec sets the encryption and MAC states that a subsequent changeCipherSpec will use.
conn.go:214
↓ 4 callersMethodquicSetReadSecret
(level QUICEncryptionLevel, suite uint16, secret []byte)
quic.go:385
↓ 4 callersMethodretryReadRecord
retryReadRecord recurs into readRecordOrCCS to drop a non-advancing record, like a warning alert, empty application_data, or a change_cipher_spec in T
conn.go:829
↓ 4 callersFunctionselectCipherSuite
selectCipherSuite returns the first TLS 1.0–1.2 cipher suite from ids which is also in supportedIDs and passes the ok filter.
cipher_suites.go:175
↓ 4 callersMethodsessionState
sessionState returns a partially filled-out [SessionState] with information from the current connection.
ticket.go:298
↓ 4 callersFunctionsignedMessage
signedMessage returns the pre-hashed (if necessary) message to be signed by certificate keys in TLS 1.3. See RFC 8446, Section 4.4.3.
auth.go:82
↓ 4 callersFunctionsliceForAppend
sliceForAppend extends the input slice by n bytes. head is the full extended slice, while tail is the appended part. If the original slice has suffici
conn.go:474
↓ 4 callersFunctionunsupportedCertificateError
unsupportedCertificateError returns a helpful error for certificates with an unsupported private key.
auth.go:261
↓ 4 callersFunctionverifyHandshakeSignature
verifyHandshakeSignature verifies a signature against pre-hashed (if required) handshake contents.
auth.go:23
↓ 4 callersMethodwriteChangeCipherRecord
writeChangeCipherRecord writes a ChangeCipherSpec message to the connection and updates the record layer state.
conn.go:1137
↓ 3 callersMethodClose
Close closes the connection.
conn.go:1488
↓ 3 callersMethodDialContext
DialContext connects to the given network address and initiates a TLS handshake, returning the resulting TLS connection. The provided Context must be
tls.go:690
↓ 3 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:1578
↓ 3 callersMethodLocalAddr
Access to net.Conn methods. Cannot just embed net.Conn because that would export the struct field too. LocalAddr returns the local network address.
conn.go:135
↓ 3 callersFunctionNewRatelimitedConn
(conn net.Conn, limit *LimitFallback)
tls.go:122
↓ 3 callersMethodOpen
(aad, ciphertext []byte)
hpke/hpye.go:303
↓ 3 callersFunctionParseSessionState
ParseSessionState parses a [SessionState] encoded by [SessionState.Bytes].
ticket.go:187
↓ 3 callersMethodcipherSuites
(aesGCMPreferred bool)
common.go:1166
↓ 3 callersMethodcurvePreferences
(version uint16)
common.go:1249
↓ 3 callersMethoddecryptTicket
(encrypted []byte, ticketKeys []ticketKey)
ticket.go:370
↓ 3 callersMethodencryptTicket
(state []byte, ticketKeys []ticketKey)
ticket.go:325
↓ 3 callersFunctionextract
(hash func() H, newSecret, currentSecret []byte)
tls13/tls13.go:43
↓ 3 callersFunctionfipsAllowedChains
fipsAllowedChains returns chains that are allowed to be used in a TLS connection based on the current fips140tls enforcement setting. If fips140tls i
common.go:1777
↓ 3 callersMethodincSeq
incSeq increments the sequence number.
conn.go:247
↓ 3 callersMethodmarshal
()
common.go:1621
↓ 3 callersFunctionmutualCipherSuiteTLS13
(have []uint16, want uint16)
cipher_suites.go:644
↓ 3 callersMethodmutualVersion
mutualVersion returns the protocol version to use given the advertised versions of the peer. The highest supported version is preferred.
common.go:1273
↓ 3 callersMethodnewCert
(der []byte)
cache.go:19
↓ 3 callersFunctionnewFinishedHash
(version uint16, cipherSuite *cipherSuite)
prf.go:156
↓ 3 callersFunctionprfAndHashForVersion
(version uint16, suite *cipherSuite)
prf.go:91
↓ 3 callersFunctionprfForVersion
(version uint16, suite *cipherSuite)
prf.go:105
↓ 3 callersMethodquicWaitForSignal
quicWaitForSignal notifies the QUICConn that handshake progress is blocked, and waits for a signal that the handshake should proceed. The handshake m
quic.go:477
↓ 3 callersMethodreadRecord
()
conn.go:622
↓ 3 callersMethodreadRecordOrCCS
readRecordOrCCS reads one or more TLS records from the connection and updates the record layer state. Some invariants: - c.in must be locked - c.input
conn.go:644
↓ 3 callersMethodrequestClientCert
()
handshake_server_tls13.go:932
↓ 3 callersFunctionrequiresClientCert
requiresClientCert reports whether the ClientAuthType requires a client certificate to be provided.
common.go:358
↓ 3 callersMethodsupportedCipherSuites
supportedCipherSuites returns the supported TLS 1.0–1.2 cipher suites in an undefined order. For preference ordering, use [Config.cipherSuites].
common.go:1186
↓ 3 callersMethodsupportedVersions
supportedVersions returns the list of supported TLS versions, sorted from highest to lowest (and hence also in preference order).
common.go:1204
↓ 3 callersFunctionsupportedVersionsFromMax
supportedVersionsFromMax returns a list of supported versions derived from a legacy maximum version value. Note that only versions supported by this l
common.go:1238
↓ 3 callersMethodsupportsCurve
(version uint16, curve CurveID)
common.go:1267
↓ 3 callersMethodticketKeyFromBytes
ticketKeyFromBytes converts from the external representation of a session ticket key to a ticketKey. Externally, session ticket keys are 32 random byt
common.go:948
↓ 3 callersMethodticketKeys
ticketKeys returns the ticketKeys for this connection. If configForClient has explicitly set keys, those will be returned. Otherwise, the keys on c wi
common.go:1066
next →1–100 of 457, ranked by callers