/
go1_15_crypto_tls.go
120 lines (112 loc) · 8.33 KB
/
go1_15_crypto_tls.go
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
// Code generated by 'yaegi extract crypto/tls'. DO NOT EDIT.
// +build go1.15
package stdlib
import (
"crypto/tls"
"go/constant"
"go/token"
"reflect"
)
func init() {
Symbols["crypto/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),
"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),
"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),
"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
"Certificate": reflect.ValueOf((*tls.Certificate)(nil)),
"CertificateRequestInfo": reflect.ValueOf((*tls.CertificateRequestInfo)(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)),
"RecordHeaderError": reflect.ValueOf((*tls.RecordHeaderError)(nil)),
"RenegotiationSupport": reflect.ValueOf((*tls.RenegotiationSupport)(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 {
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)
}