MCPcopy Create free account

hub / github.com/XTLS/Go / functions

Functions328 in github.com/XTLS/Go

↓ 182 callersMethodsendAlert
sendAlert sends a TLS alert message.
conn.go:932
↓ 77 callersMethodWrite
Write writes data to the connection. As Write calls Handshake, in order to prevent indefinite blocking a deadline must be set for both Read and Write
conn.go:1348
↓ 68 callersMethodmarshal
()
common.go:1378
↓ 34 callersMethodsetErrorLocked
(err error)
conn.go:215
↓ 30 callersMethodwriteRecord
writeRecord writes a TLS record with the given type and payload to the connection and updates the record layer state.
conn.go:1247
↓ 25 callersMethodreadHandshake
readHandshake reads the next handshake message from the record layer.
conn.go:1256
↓ 22 callersMethodSum
()
prf.go:190
↓ 21 callersMethodrand
()
common.go:946
↓ 20 callersMethodSize
()
cipher_suites.go:565
↓ 20 callersFunctionunexpectedMessageError
(wanted, got any)
common.go:1465
↓ 18 callersMethodderiveSecret
deriveSecret implements Derive-Secret from RFC 8446, Section 7.1.
key_schedule.go:54
↓ 17 callersMethodString
()
alert.go:89
↓ 17 callersMethodtime
()
common.go:954
↓ 14 callersMethodError
()
alert.go:97
↓ 11 callersFunctionreadUint16LengthPrefixed
readUint16LengthPrefixed acts like s.ReadUint16LengthPrefixed, but targets a []byte instead of a cryptobyte.String.
handshake_messages.go:59
↓ 11 callersFunctionreadUint8LengthPrefixed
readUint8LengthPrefixed acts like s.ReadUint8LengthPrefixed, but targets a []byte instead of a cryptobyte.String.
handshake_messages.go:53
↓ 10 callersMethodhandshakeComplete
()
conn.go:1819
↓ 10 callersMethodsetTrafficSecret
(suite *cipherSuiteTLS13, secret []byte)
conn.go:248
↓ 10 callersMethodwriteKeyLog
(label string, clientRandom, secret []byte)
common.go:1327
↓ 9 callersMethodReset
()
cipher_suites.go:567
↓ 9 callersFunctioncipherSuiteTLS13ByID
(id uint16)
cipher_suites.go:637
↓ 9 callersFunctiontypeAndHashFromSignatureScheme
typeAndHashFromSignatureScheme returns the corresponding signature type and crypto.Hash for a given TLS SignatureScheme.
auth.go:98
↓ 8 callersMethodconnectionStateLocked
()
conn.go:1764
↓ 8 callersFunctioncurveForCurveID
(id CurveID)
key_schedule.go:139
↓ 8 callersMethodexpandLabel
expandLabel implements HKDF-Expand-Label from RFC 8446, Section 7.1.
key_schedule.go:35
↓ 8 callersMethodextract
extract implements HKDF-Extract with the cipher suite hash.
key_schedule.go:62
↓ 8 callersMethodflush
()
conn.go:1026
↓ 7 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:85
↓ 6 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:362
↓ 6 callersFunctionisSupportedSignatureAlgorithm
(sigAlg SignatureScheme, supportedSignatureAlgorithms []SignatureScheme)
common.go:1469
↓ 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:231
↓ 5 callersMethodClose
Close closes the connection.
conn.go:1589
↓ 5 callersMethodPublicKey
()
key_schedule.go:108
↓ 5 callersMethodWrite
(msg []byte)
prf.go:174
↓ 5 callersMethodcipherSuites
()
common.go:962
↓ 5 callersMethoddiscardHandshakeBuffer
discardHandshakeBuffer is called when there is no more need to buffer the entirety of the handshake messages.
prf.go:242
↓ 5 callersFunctiongenerateECDHEParameters
(rand io.Reader, curveID CurveID)
key_schedule.go:112
↓ 5 callersMethodincSeq
incSeq increments the sequence number.
conn.go:258
↓ 5 callersMethodmarshal
()
handshake_messages.go:1555
↓ 5 callersMethodmaxSupportedVersion
(isClient bool)
common.go:999
↓ 5 callersFunctionreadUint24LengthPrefixed
readUint24LengthPrefixed acts like s.ReadUint24LengthPrefixed, but targets a []byte instead of a cryptobyte.String.
handshake_messages.go:65
↓ 5 callersMethodsendAlertLocked
sendAlert sends a TLS alert message.
conn.go:913
↓ 5 callersMethodwriteRecordLocked
writeRecordLocked writes a TLS record with the given type and payload to the connection and updates the record layer state.
conn.go:1047
↓ 4 callersMethodBlockSize
()
cipher_suites.go:566
↓ 4 callersMethodOverhead
64-bit sequence number
cipher_suites.go:477
↓ 4 callersMethodSharedKey
(peerPublicKey []byte)
key_schedule.go:109
↓ 4 callersMethodWrite
(p []byte)
cipher_suites.go:568
↓ 4 callersMethodcurvePreferences
()
common.go:1023
↓ 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:131
↓ 4 callersMethodmarshalWithoutBinders
marshalWithoutBinders returns the ClientHello through the PreSharedKeyExtension.identities field, according to RFC 8446, Section 4.2.11.2. Note that m
handshake_messages.go:306
↓ 4 callersMethodnewRecordHeaderError
(conn net.Conn, msg string)
conn.go:599
↓ 4 callersMethodprepareCipherSpec
prepareCipherSpec sets the encryption and MAC states that a subsequent changeCipherSpec will use.
conn.go:226
↓ 4 callersMethodprocessCertsFromClient
processCertsFromClient takes a chain of client certificates either from a Certificates message or from a sessionState and verifies them. It returns th
handshake_server.go:797
↓ 4 callersMethodreadRecord
()
conn.go:606
↓ 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 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:81
↓ 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:485
↓ 4 callersFunctionunsupportedCertificateError
unsupportedCertificateError returns a helpful error for certificates with an unsupported private key.
auth.go:253
↓ 4 callersFunctionverifyHandshakeSignature
verifyHandshakeSignature verifies a signature against pre-hashed (if required) handshake contents.
auth.go:22
↓ 3 callersMethodRead
Read reads data from the connection. As Read calls Handshake, in order to prevent indefinite blocking a deadline must be set for both Read and Write
conn.go:1525
↓ 3 callersMethodSeal
(out, nonce, plaintext, additionalData []byte)
cipher_suites.go:480
↓ 3 callersFunctioncipherSuiteByID
(id uint16)
cipher_suites.go:619
↓ 3 callersFunctionclientHelloInfo
(ctx context.Context, c *Conn, clientHello *clientHelloMsg)
handshake_server.go:857
↓ 3 callersFunctionmutualCipherSuite
mutualCipherSuite returns a cipherSuite given a list of supported ciphersuites and the id requested by the peer.
cipher_suites.go:610
↓ 3 callersMethodmutualVersion
mutualVersion returns the protocol version to use given the advertised versions of the peer. Priority is given to the peer preference order.
common.go:1041
↓ 3 callersFunctionnewFinishedHash
(version uint16, cipherSuite *cipherSuite)
prf.go:143
↓ 3 callersFunctionpHash
pHash implements the P_hash function, as defined in RFC 4346, Section 5.
prf.go:27
↓ 3 callersFunctionprfForVersion
(version uint16, suite *cipherSuite)
prf.go:101
↓ 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:628
↓ 3 callersMethodrequestClientCert
()
handshake_server_tls13.go:570
↓ 3 callersFunctionrequiresClientCert
requiresClientCert reports whether the ClientAuthType requires a client certificate to be provided.
common.go:319
↓ 3 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:865
↓ 3 callersMethodsupportedVersions
(isClient bool)
common.go:981
↓ 3 callersMethodsupportsCurve
(curve CurveID)
common.go:1030
↓ 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:767
↓ 3 callersFunctiontls10MAC
tls10MAC implements the TLS 1.0 MAC function. RFC 2246, Section 6.2.3.
cipher_suites.go:578
↓ 3 callersMethodunmarshal
([]byte)
common.go:1379
↓ 3 callersMethodwrite
(data []byte)
conn.go:1015
↓ 2 callersMethodCurveID
()
key_schedule.go:107
↓ 2 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:216
↓ 2 callersMethodGet
Get searches for a ClientSessionState associated with the given key. On return, ok is true if one was found.
common.go:356
↓ 2 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:1664
↓ 2 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:1678
↓ 2 callersMethodOpen
(out, nonce, ciphertext, additionalData []byte)
cipher_suites.go:492
↓ 2 callersMethodRemoteAddr
RemoteAddr returns the remote network address.
conn.go:156
↓ 2 callersMethodSetIV
([]byte)
conn.go:353
↓ 2 callersMethodSetWriteDeadline
SetWriteDeadline sets the write deadline on the underlying connection. A zero value for t means Write will not time out. After a Write has timed out,
conn.go:176
↓ 2 callersMethodSupportsCertificate
SupportsCertificate returns nil if the provided certificate is supported by the client that sent the ClientHello. Otherwise, it returns an error descr
common.go:1111
↓ 2 callersMethodTemporary
()
conn.go:213
↓ 2 callersMethodVerifyHostname
VerifyHostname checks that the peer certificate chain is valid for connecting to host. If so, it returns nil; if not, it returns an error describing t
conn.go:1804
↓ 2 callersFunctionaddBytesWithLength
addBytesWithLength appends a sequence of bytes to the cryptobyte.Builder. If the length of the sequence is not the value specified, it produces an err
handshake_messages.go:24
↓ 2 callersFunctionaddUint64
addUint64 appends a big-endian, 64-bit value to the cryptobyte.Builder.
handshake_messages.go:35
↓ 2 callersFunctionaesgcmPreferred
aesgcmPreferred returns whether the first known cipher in the preference list is an AES-GCM cipher, implying the peer has hardware support for it.
cipher_suites.go:389
↓ 2 callersMethodchangeCipherSpec
changeCipherSpec changes the encryption and MAC states to the ones previously passed to prepareCipherSpec.
conn.go:234
↓ 2 callersFunctioncheckALPN
checkALPN ensure that the server's choice of ALPN protocol is compatible with the protocols that we advertised in the Client Hello.
handshake_client.go:752
↓ 2 callersMethodcheckServerHelloOrHRR
checkServerHelloOrHRR does validity checks that apply to both ServerHello and HelloRetryRequest messages. It sets hs.suite.
handshake_client_tls13.go:110
↓ 2 callersFunctionclientSessionCacheKey
clientSessionCacheKey returns a key used to cache sessionTickets that could be used to resume previously negotiated TLS sessions with a server.
handshake_client.go:986
↓ 2 callersMethodclientSum
clientSum returns the contents of the verify_data member of a client's Finished message.
prf.go:202
↓ 2 callersMethodcloseNotify
()
conn.go:1641
↓ 2 callersMethoddecryptTicket
(encrypted []byte)
ticket.go:147
next →1–100 of 328, ranked by callers