File: go1_21_crypto_tls.go

package info (click to toggle)
golang-github-traefik-yaegi 0.16.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 24,608 kB
  • sloc: sh: 457; makefile: 39
file content (148 lines) | stat: -rw-r--r-- 11,234 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
// Code generated by 'yaegi extract crypto/tls'. DO NOT EDIT.

//go:build go1.21 && !go1.22
// +build go1.21,!go1.22

package stdlib

import (
	"crypto/tls"
	"go/constant"
	"go/token"
	"reflect"
)

func init() {
	Symbols["crypto/tls/tls"] = map[string]reflect.Value{
		// function, constant and variable definitions
		"CipherSuiteName":                               reflect.ValueOf(tls.CipherSuiteName),
		"CipherSuites":                                  reflect.ValueOf(tls.CipherSuites),
		"Client":                                        reflect.ValueOf(tls.Client),
		"CurveP256":                                     reflect.ValueOf(tls.CurveP256),
		"CurveP384":                                     reflect.ValueOf(tls.CurveP384),
		"CurveP521":                                     reflect.ValueOf(tls.CurveP521),
		"Dial":                                          reflect.ValueOf(tls.Dial),
		"DialWithDialer":                                reflect.ValueOf(tls.DialWithDialer),
		"ECDSAWithP256AndSHA256":                        reflect.ValueOf(tls.ECDSAWithP256AndSHA256),
		"ECDSAWithP384AndSHA384":                        reflect.ValueOf(tls.ECDSAWithP384AndSHA384),
		"ECDSAWithP521AndSHA512":                        reflect.ValueOf(tls.ECDSAWithP521AndSHA512),
		"ECDSAWithSHA1":                                 reflect.ValueOf(tls.ECDSAWithSHA1),
		"Ed25519":                                       reflect.ValueOf(tls.Ed25519),
		"InsecureCipherSuites":                          reflect.ValueOf(tls.InsecureCipherSuites),
		"Listen":                                        reflect.ValueOf(tls.Listen),
		"LoadX509KeyPair":                               reflect.ValueOf(tls.LoadX509KeyPair),
		"NewLRUClientSessionCache":                      reflect.ValueOf(tls.NewLRUClientSessionCache),
		"NewListener":                                   reflect.ValueOf(tls.NewListener),
		"NewResumptionState":                            reflect.ValueOf(tls.NewResumptionState),
		"NoClientCert":                                  reflect.ValueOf(tls.NoClientCert),
		"PKCS1WithSHA1":                                 reflect.ValueOf(tls.PKCS1WithSHA1),
		"PKCS1WithSHA256":                               reflect.ValueOf(tls.PKCS1WithSHA256),
		"PKCS1WithSHA384":                               reflect.ValueOf(tls.PKCS1WithSHA384),
		"PKCS1WithSHA512":                               reflect.ValueOf(tls.PKCS1WithSHA512),
		"PSSWithSHA256":                                 reflect.ValueOf(tls.PSSWithSHA256),
		"PSSWithSHA384":                                 reflect.ValueOf(tls.PSSWithSHA384),
		"PSSWithSHA512":                                 reflect.ValueOf(tls.PSSWithSHA512),
		"ParseSessionState":                             reflect.ValueOf(tls.ParseSessionState),
		"QUICClient":                                    reflect.ValueOf(tls.QUICClient),
		"QUICEncryptionLevelApplication":                reflect.ValueOf(tls.QUICEncryptionLevelApplication),
		"QUICEncryptionLevelEarly":                      reflect.ValueOf(tls.QUICEncryptionLevelEarly),
		"QUICEncryptionLevelHandshake":                  reflect.ValueOf(tls.QUICEncryptionLevelHandshake),
		"QUICEncryptionLevelInitial":                    reflect.ValueOf(tls.QUICEncryptionLevelInitial),
		"QUICHandshakeDone":                             reflect.ValueOf(tls.QUICHandshakeDone),
		"QUICNoEvent":                                   reflect.ValueOf(tls.QUICNoEvent),
		"QUICRejectedEarlyData":                         reflect.ValueOf(tls.QUICRejectedEarlyData),
		"QUICServer":                                    reflect.ValueOf(tls.QUICServer),
		"QUICSetReadSecret":                             reflect.ValueOf(tls.QUICSetReadSecret),
		"QUICSetWriteSecret":                            reflect.ValueOf(tls.QUICSetWriteSecret),
		"QUICTransportParameters":                       reflect.ValueOf(tls.QUICTransportParameters),
		"QUICTransportParametersRequired":               reflect.ValueOf(tls.QUICTransportParametersRequired),
		"QUICWriteData":                                 reflect.ValueOf(tls.QUICWriteData),
		"RenegotiateFreelyAsClient":                     reflect.ValueOf(tls.RenegotiateFreelyAsClient),
		"RenegotiateNever":                              reflect.ValueOf(tls.RenegotiateNever),
		"RenegotiateOnceAsClient":                       reflect.ValueOf(tls.RenegotiateOnceAsClient),
		"RequestClientCert":                             reflect.ValueOf(tls.RequestClientCert),
		"RequireAndVerifyClientCert":                    reflect.ValueOf(tls.RequireAndVerifyClientCert),
		"RequireAnyClientCert":                          reflect.ValueOf(tls.RequireAnyClientCert),
		"Server":                                        reflect.ValueOf(tls.Server),
		"TLS_AES_128_GCM_SHA256":                        reflect.ValueOf(tls.TLS_AES_128_GCM_SHA256),
		"TLS_AES_256_GCM_SHA384":                        reflect.ValueOf(tls.TLS_AES_256_GCM_SHA384),
		"TLS_CHACHA20_POLY1305_SHA256":                  reflect.ValueOf(tls.TLS_CHACHA20_POLY1305_SHA256),
		"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA":          reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA),
		"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256":       reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256),
		"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256":       reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256),
		"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA":          reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA),
		"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384":       reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384),
		"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305":        reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305),
		"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256),
		"TLS_ECDHE_ECDSA_WITH_RC4_128_SHA":              reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA),
		"TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA":           reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA),
		"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA":            reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA),
		"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256":         reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256),
		"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256":         reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256),
		"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA":            reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA),
		"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384":         reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384),
		"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305":          reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305),
		"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256":   reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256),
		"TLS_ECDHE_RSA_WITH_RC4_128_SHA":                reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA),
		"TLS_FALLBACK_SCSV":                             reflect.ValueOf(tls.TLS_FALLBACK_SCSV),
		"TLS_RSA_WITH_3DES_EDE_CBC_SHA":                 reflect.ValueOf(tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA),
		"TLS_RSA_WITH_AES_128_CBC_SHA":                  reflect.ValueOf(tls.TLS_RSA_WITH_AES_128_CBC_SHA),
		"TLS_RSA_WITH_AES_128_CBC_SHA256":               reflect.ValueOf(tls.TLS_RSA_WITH_AES_128_CBC_SHA256),
		"TLS_RSA_WITH_AES_128_GCM_SHA256":               reflect.ValueOf(tls.TLS_RSA_WITH_AES_128_GCM_SHA256),
		"TLS_RSA_WITH_AES_256_CBC_SHA":                  reflect.ValueOf(tls.TLS_RSA_WITH_AES_256_CBC_SHA),
		"TLS_RSA_WITH_AES_256_GCM_SHA384":               reflect.ValueOf(tls.TLS_RSA_WITH_AES_256_GCM_SHA384),
		"TLS_RSA_WITH_RC4_128_SHA":                      reflect.ValueOf(tls.TLS_RSA_WITH_RC4_128_SHA),
		"VerifyClientCertIfGiven":                       reflect.ValueOf(tls.VerifyClientCertIfGiven),
		"VersionName":                                   reflect.ValueOf(tls.VersionName),
		"VersionSSL30":                                  reflect.ValueOf(constant.MakeFromLiteral("768", token.INT, 0)),
		"VersionTLS10":                                  reflect.ValueOf(constant.MakeFromLiteral("769", token.INT, 0)),
		"VersionTLS11":                                  reflect.ValueOf(constant.MakeFromLiteral("770", token.INT, 0)),
		"VersionTLS12":                                  reflect.ValueOf(constant.MakeFromLiteral("771", token.INT, 0)),
		"VersionTLS13":                                  reflect.ValueOf(constant.MakeFromLiteral("772", token.INT, 0)),
		"X25519":                                        reflect.ValueOf(tls.X25519),
		"X509KeyPair":                                   reflect.ValueOf(tls.X509KeyPair),

		// type definitions
		"AlertError":                   reflect.ValueOf((*tls.AlertError)(nil)),
		"Certificate":                  reflect.ValueOf((*tls.Certificate)(nil)),
		"CertificateRequestInfo":       reflect.ValueOf((*tls.CertificateRequestInfo)(nil)),
		"CertificateVerificationError": reflect.ValueOf((*tls.CertificateVerificationError)(nil)),
		"CipherSuite":                  reflect.ValueOf((*tls.CipherSuite)(nil)),
		"ClientAuthType":               reflect.ValueOf((*tls.ClientAuthType)(nil)),
		"ClientHelloInfo":              reflect.ValueOf((*tls.ClientHelloInfo)(nil)),
		"ClientSessionCache":           reflect.ValueOf((*tls.ClientSessionCache)(nil)),
		"ClientSessionState":           reflect.ValueOf((*tls.ClientSessionState)(nil)),
		"Config":                       reflect.ValueOf((*tls.Config)(nil)),
		"Conn":                         reflect.ValueOf((*tls.Conn)(nil)),
		"ConnectionState":              reflect.ValueOf((*tls.ConnectionState)(nil)),
		"CurveID":                      reflect.ValueOf((*tls.CurveID)(nil)),
		"Dialer":                       reflect.ValueOf((*tls.Dialer)(nil)),
		"QUICConfig":                   reflect.ValueOf((*tls.QUICConfig)(nil)),
		"QUICConn":                     reflect.ValueOf((*tls.QUICConn)(nil)),
		"QUICEncryptionLevel":          reflect.ValueOf((*tls.QUICEncryptionLevel)(nil)),
		"QUICEvent":                    reflect.ValueOf((*tls.QUICEvent)(nil)),
		"QUICEventKind":                reflect.ValueOf((*tls.QUICEventKind)(nil)),
		"QUICSessionTicketOptions":     reflect.ValueOf((*tls.QUICSessionTicketOptions)(nil)),
		"RecordHeaderError":            reflect.ValueOf((*tls.RecordHeaderError)(nil)),
		"RenegotiationSupport":         reflect.ValueOf((*tls.RenegotiationSupport)(nil)),
		"SessionState":                 reflect.ValueOf((*tls.SessionState)(nil)),
		"SignatureScheme":              reflect.ValueOf((*tls.SignatureScheme)(nil)),

		// interface wrapper definitions
		"_ClientSessionCache": reflect.ValueOf((*_crypto_tls_ClientSessionCache)(nil)),
	}
}

// _crypto_tls_ClientSessionCache is an interface wrapper for ClientSessionCache type
type _crypto_tls_ClientSessionCache struct {
	IValue interface{}
	WGet   func(sessionKey string) (session *tls.ClientSessionState, ok bool)
	WPut   func(sessionKey string, cs *tls.ClientSessionState)
}

func (W _crypto_tls_ClientSessionCache) Get(sessionKey string) (session *tls.ClientSessionState, ok bool) {
	return W.WGet(sessionKey)
}
func (W _crypto_tls_ClientSessionCache) Put(sessionKey string, cs *tls.ClientSessionState) {
	W.WPut(sessionKey, cs)
}