Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/XTLS/Go
/ functions
Functions
328 in github.com/XTLS/Go
⨍
Functions
328
◇
Types & classes
69
↓ 2 callers
Function
defaultConfig
()
common.go:1461
↓ 2 callers
Function
dial
(ctx context.Context, netDialer *net.Dialer, network, addr string, config *Config)
tls.go:120
↓ 2 callers
Function
ekmFromMasterSecret
ekmFromMasterSecret generates exported keying material as defined in RFC 5705.
prf.go:254
↓ 2 callers
Method
encryptTicket
(state []byte)
ticket.go:119
↓ 2 callers
Method
establishKeys
()
handshake_client.go:655
↓ 2 callers
Method
establishKeys
()
handshake_server.go:678
↓ 2 callers
Method
explicitNonceLen
explicitNonceLen returns the number of bytes of explicit nonce or IV included in each record. Explicit nonces are present only in CBC modes after TLS
conn.go:275
↓ 2 callers
Method
explicitNonceLen
explicitNonceLen returns the number of bytes of explicit nonce included in each record. This is eight for older AEADs and zero for modern ones.
cipher_suites.go:439
↓ 2 callers
Method
exportKeyingMaterial
exportKeyingMaterial implements RFC5705 exporters for TLS 1.3 according to RFC 8446, Section 7.5.
key_schedule.go:94
↓ 2 callers
Method
getCertificate
getCertificate returns the best certificate for the given ClientHelloInfo, defaulting to the first element of c.Certificates.
common.go:1057
↓ 2 callers
Method
getClientCertificate
(cri *CertificateRequestInfo)
handshake_client.go:968
↓ 2 callers
Method
handshake
Does the handshake, either a full one or resumes old session. Requires hs.c, hs.hello, hs.serverHello, and, optionally, hs.session to be set.
handshake_client.go:381
↓ 2 callers
Method
handshake
()
handshake_server.go:65
↓ 2 callers
Method
hashForClientCertificate
hashForClientCertificate returns the handshake messages so far, pre-hashed if necessary, suitable for signing by a TLS client certificate.
prf.go:218
↓ 2 callers
Function
hashForServerKeyExchange
hashForServerKeyExchange hashes the given slices and returns their digest using the given hash function (for >= TLS 1.2) or using a default based on t
key_agreement.go:131
↓ 2 callers
Method
initLegacySessionTicketKeyRLocked
initLegacySessionTicketKeyRLocked ensures the legacy SessionTicketKey field is randomized if empty, and that sessionTicketKeys is populated from it ot
common.go:826
↓ 2 callers
Function
keysFromMasterSecret
keysFromMasterSecret generates the connection keys from the master secret, given the lengths of the MAC key, cipher key and IV, as defined in RFC 2246
prf.go:121
↓ 2 callers
Method
leaf
leaf returns the parsed leaf certificate, either from c.Leaf or by parsing the corresponding c.Certificate[0].
common.go:1370
↓ 2 callers
Method
marshal
()
handshake_messages.go:621
↓ 2 callers
Method
marshal
()
handshake_messages.go:1589
↓ 2 callers
Method
marshal
()
handshake_messages.go:1727
↓ 2 callers
Function
marshalCertificate
(b *cryptobyte.Builder, certificate Certificate)
handshake_messages.go:1322
↓ 2 callers
Function
masterFromPreMasterSecret
masterFromPreMasterSecret generates the master secret from the pre-master secret. See RFC 5246, Section 8.1.
prf.go:108
↓ 2 callers
Function
mutualCipherSuiteTLS13
(have []uint16, want uint16)
cipher_suites.go:628
↓ 2 callers
Function
negotiateALPN
negotiateALPN picks a shared ALPN protocol that both sides support in server preference order. If ALPN is not configured or the peer doesn't support i
handshake_server.go:281
↓ 2 callers
Method
nextTrafficSecret
nextTrafficSecret generates the next traffic secret, given the current one, according to RFC 8446, Section 7.2.
key_schedule.go:71
↓ 2 callers
Function
prf12
prf12 implements the TLS 1.2 pseudo-random function, as defined in RFC 5246, Section 5.
prf.go:67
↓ 2 callers
Function
prfAndHashForVersion
(version uint16, suite *cipherSuite)
prf.go:87
↓ 2 callers
Method
readChangeCipherSpec
()
conn.go:610
↓ 2 callers
Method
readFinished
(out []byte)
handshake_client.go:767
↓ 2 callers
Method
readFinished
(out []byte)
handshake_server.go:703
↓ 2 callers
Method
readFromUntil
readFromUntil reads from r into c.rawInput until c.rawInput contains at least n bytes or else returns an error.
conn.go:899
↓ 2 callers
Method
readSessionTicket
()
handshake_client.go:795
↓ 2 callers
Function
readUint64
readUint64 decodes a big-endian, 64-bit value into out and advances over it. It reports whether the read was successful.
handshake_messages.go:42
↓ 2 callers
Method
sendDummyChangeCipherSpec
sendDummyChangeCipherSpec sends a ChangeCipherSpec record for compatibility with middleboxes that didn't implement TLS correctly. See RFC 8446, Append
handshake_client_tls13.go:165
↓ 2 callers
Method
sendDummyChangeCipherSpec
sendDummyChangeCipherSpec sends a ChangeCipherSpec record for compatibility with middleboxes that didn't implement TLS correctly. See RFC 8446, Append
handshake_server_tls13.go:386
↓ 2 callers
Method
sendFinished
(out []byte)
handshake_client.go:827
↓ 2 callers
Method
sendFinished
(out []byte)
handshake_server.go:775
↓ 2 callers
Method
sendSessionTicket
()
handshake_server.go:732
↓ 2 callers
Method
sendSessionTickets
()
handshake_server_tls13.go:706
↓ 2 callers
Method
serverSum
serverSum returns the contents of the verify_data member of a server's Finished message.
prf.go:210
↓ 2 callers
Function
sha1Hash
sha1Hash calculates a SHA1 hash over the given byte slices.
key_agreement.go:106
↓ 2 callers
Function
supportedVersionsFromMax
supportedVersionsFromMax returns a list of supported versions derived from a legacy maximum version value. Note that only versions supported by this l
common.go:1010
↓ 2 callers
Function
supportsECDHE
supportsECDHE returns whether ECDHE key exchanges can be used with this pre-TLS 1.3 client.
handshake_server.go:308
↓ 2 callers
Function
unmarshalCertificate
(s *cryptobyte.String, certificate *Certificate)
handshake_messages.go:1377
↓ 2 callers
Method
updateBinders
updateBinders updates the m.pskBinders field, if necessary updating the cached marshaled representation. The supplied binders must have the same lengt
handshake_messages.go:320
↓ 2 callers
Method
verifyServerCertificate
verifyServerCertificate parses and verifies the provided chain, setting c.verifiedChains and c.peerCertificates or sending the appropriate alert.
handshake_client.go:846
↓ 1 callers
Function
CipherSuites
CipherSuites returns a list of cipher suites currently implemented by this package, excluding those with security issues, which are returned by Insecu
cipher_suites.go:52
↓ 1 callers
Function
Client
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
↓ 1 callers
Method
Clone
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:782
↓ 1 callers
Method
ConstantTimeSum
(b []byte)
cipher_suites.go:556
↓ 1 callers
Function
DialWithDialer
DialWithDialer connects to the given network address using dialer.Dial and then initiates a TLS handshake, returning the resulting TLS connection. Any
tls.go:116
↓ 1 callers
Function
InsecureCipherSuites
InsecureCipherSuites returns a list of cipher suites currently implemented by this package and which have security issues. Most applications should n
cipher_suites.go:81
↓ 1 callers
Method
Marshal
(b *cryptobyte.Builder)
handshake_messages.go:18
↓ 1 callers
Method
MarshalBinary
()
handshake_server_tls13.go:328
↓ 1 callers
Function
NewListener
NewListener creates a Listener which accepts connections from an inner Listener and wraps each connection with Server. The configuration config must b
tls.go:77
↓ 1 callers
Method
NonceSize
()
cipher_suites.go:455
↓ 1 callers
Function
Server
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
↓ 1 callers
Method
Sum
(b []byte)
cipher_suites.go:569
↓ 1 callers
Method
UnmarshalBinary
(data []byte)
handshake_server_tls13.go:329
↓ 1 callers
Function
X509KeyPair
X509KeyPair parses a public/private key pair from a pair of PEM encoded data. On successful return, Certificate.Leaf will be nil because the parsed fo
tls.go:245
↓ 1 callers
Function
certificateRequestInfoFromMsg
certificateRequestInfoFromMsg generates a CertificateRequestInfo from a TLS <= 1.2 CertificateRequest, making an effort to fill in missing information
handshake_client.go:904
↓ 1 callers
Method
checkForResumption
()
handshake_server_tls13.go:225
↓ 1 callers
Method
checkForResumption
checkForResumption reports whether we should perform resumption on this connection.
handshake_server.go:390
↓ 1 callers
Method
clientHandshake
(ctx context.Context)
handshake_client.go:145
↓ 1 callers
Function
cloneHash
cloneHash uses the encoding.BinaryMarshaler and encoding.BinaryUnmarshaler interfaces implemented by standard library hashes to clone the state of in
handshake_server_tls13.go:325
↓ 1 callers
Method
decrypt
decrypt authenticates and decrypts the record if protection is active at this stage. The returned plaintext might overlap with the input.
conn.go:358
↓ 1 callers
Method
doFullHandshake
()
handshake_client.go:468
↓ 1 callers
Method
doFullHandshake
()
handshake_server.go:483
↓ 1 callers
Method
doHelloRetryRequest
(selectedGroup CurveID)
handshake_server_tls13.go:396
↓ 1 callers
Method
doResumeHandshake
()
handshake_server.go:448
↓ 1 callers
Method
encrypt
encrypt encrypts payload, adding the appropriate nonce and/or MAC, and appends it to record, which must already contain the record header.
conn.go:498
↓ 1 callers
Method
establishHandshakeKeys
()
handshake_client_tls13.go:344
↓ 1 callers
Function
extractPadding
extractPadding returns, in constant time, the length of the padding to remove from the end of payload. It also returns a byte which is equal to 255 if
conn.go:299
↓ 1 callers
Method
generateClientKeyExchange
(*Config, *clientHelloMsg, *x509.Certificate)
key_agreement.go:34
↓ 1 callers
Method
generateServerKeyExchange
On the server side, the first two methods are called in order. In the case that the key agreement protocol doesn't use a ServerKeyExchange message, ge
key_agreement.go:26
↓ 1 callers
Method
handleKeyUpdate
(keyUpdate *keyUpdateMsg)
conn.go:1491
↓ 1 callers
Method
handleNewSessionTicket
(msg *newSessionTicketMsgTLS13)
handshake_client_tls13.go:634
↓ 1 callers
Method
handlePostHandshakeMessage
handlePostHandshakeMessage processes a handshake message arrived after the handshake is complete. Up to TLS 1.2, it indicates the start of a renegotia
conn.go:1464
↓ 1 callers
Method
handleRenegotiation
handleRenegotiation processes a HelloRequest handshake message.
conn.go:1418
↓ 1 callers
Method
handshakeContext
(ctx context.Context)
conn.go:1684
↓ 1 callers
Function
hostnameInSNI
hostnameInSNI converts name into an appropriate hostname for SNI. Literal IP addresses and absolute FQDNs are not permitted as SNI values. See RFC 606
handshake_client.go:996
↓ 1 callers
Function
illegalClientHelloChange
illegalClientHelloChange reports whether the two ClientHello messages are different, with the exception of the changes allowed before and after a Hell
handshake_server_tls13.go:459
↓ 1 callers
Method
loadSession
(hello *clientHelloMsg)
handshake_client.go:243
↓ 1 callers
Method
makeClientHello
()
handshake_client.go:37
↓ 1 callers
Method
marshal
()
handshake_messages.go:97
↓ 1 callers
Method
marshal
()
handshake_messages.go:944
↓ 1 callers
Method
marshal
()
ticket.go:35
↓ 1 callers
Method
marshal
()
ticket.go:89
↓ 1 callers
Method
maxPayloadSizeForWrite
maxPayloadSizeForWrite returns the maximum TLS payload size to use for the next application data record. There is the following trade-off: - For late
conn.go:968
↓ 1 callers
Function
md5SHA1Hash
md5SHA1Hash implements TLS 1.0's hybrid hash function which consists of the concatenation of an MD5 and SHA1 hash.
key_agreement.go:116
↓ 1 callers
Method
netDialer
()
tls.go:200
↓ 1 callers
Function
newConstantTimeHash
(h func() hash.Hash)
cipher_suites.go:571
↓ 1 callers
Function
parsePrivateKey
Attempt to parse the given private key DER block. OpenSSL 0.9.8 generates PKCS #1 private keys by default, while OpenSSL 1.0.0 generates PKCS #8 keys.
tls.go:339
↓ 1 callers
Method
pickCertificate
()
handshake_server_tls13.go:350
↓ 1 callers
Method
pickCipherSuite
()
handshake_client.go:458
↓ 1 callers
Method
pickCipherSuite
()
handshake_server.go:328
↓ 1 callers
Method
pickTLSVersion
(serverHello *serverHelloMsg)
handshake_client.go:359
↓ 1 callers
Method
processClientHello
()
handshake_server_tls13.go:86
↓ 1 callers
Method
processClientHello
()
handshake_server.go:171
← previous
next →
101–200 of 328, ranked by callers