| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
package stdlib |
| 7 |
|
| 8 |
import ( |
| 9 |
"crypto/tls" |
| 10 |
"go/constant" |
| 11 |
"go/token" |
| 12 |
"reflect" |
| 13 |
) |
| 14 |
|
| 15 |
func init() { |
| 16 |
Symbols["crypto/tls/tls"] = map[string]reflect.Value{ |
| 17 |
|
| 18 |
"CipherSuiteName": reflect.ValueOf(tls.CipherSuiteName), |
| 19 |
"CipherSuites": reflect.ValueOf(tls.CipherSuites), |
| 20 |
"Client": reflect.ValueOf(tls.Client), |
| 21 |
"CurveP256": reflect.ValueOf(tls.CurveP256), |
| 22 |
"CurveP384": reflect.ValueOf(tls.CurveP384), |
| 23 |
"CurveP521": reflect.ValueOf(tls.CurveP521), |
| 24 |
"Dial": reflect.ValueOf(tls.Dial), |
| 25 |
"DialWithDialer": reflect.ValueOf(tls.DialWithDialer), |
| 26 |
"ECDSAWithP256AndSHA256": reflect.ValueOf(tls.ECDSAWithP256AndSHA256), |
| 27 |
"ECDSAWithP384AndSHA384": reflect.ValueOf(tls.ECDSAWithP384AndSHA384), |
| 28 |
"ECDSAWithP521AndSHA512": reflect.ValueOf(tls.ECDSAWithP521AndSHA512), |
| 29 |
"ECDSAWithSHA1": reflect.ValueOf(tls.ECDSAWithSHA1), |
| 30 |
"Ed25519": reflect.ValueOf(tls.Ed25519), |
| 31 |
"InsecureCipherSuites": reflect.ValueOf(tls.InsecureCipherSuites), |
| 32 |
"Listen": reflect.ValueOf(tls.Listen), |
| 33 |
"LoadX509KeyPair": reflect.ValueOf(tls.LoadX509KeyPair), |
| 34 |
"NewLRUClientSessionCache": reflect.ValueOf(tls.NewLRUClientSessionCache), |
| 35 |
"NewListener": reflect.ValueOf(tls.NewListener), |
| 36 |
"NewResumptionState": reflect.ValueOf(tls.NewResumptionState), |
| 37 |
"NoClientCert": reflect.ValueOf(tls.NoClientCert), |
| 38 |
"PKCS1WithSHA1": reflect.ValueOf(tls.PKCS1WithSHA1), |
| 39 |
"PKCS1WithSHA256": reflect.ValueOf(tls.PKCS1WithSHA256), |
| 40 |
"PKCS1WithSHA384": reflect.ValueOf(tls.PKCS1WithSHA384), |
| 41 |
"PKCS1WithSHA512": reflect.ValueOf(tls.PKCS1WithSHA512), |
| 42 |
"PSSWithSHA256": reflect.ValueOf(tls.PSSWithSHA256), |
| 43 |
"PSSWithSHA384": reflect.ValueOf(tls.PSSWithSHA384), |
| 44 |
"PSSWithSHA512": reflect.ValueOf(tls.PSSWithSHA512), |
| 45 |
"ParseSessionState": reflect.ValueOf(tls.ParseSessionState), |
| 46 |
"QUICClient": reflect.ValueOf(tls.QUICClient), |
| 47 |
"QUICEncryptionLevelApplication": reflect.ValueOf(tls.QUICEncryptionLevelApplication), |
| 48 |
"QUICEncryptionLevelEarly": reflect.ValueOf(tls.QUICEncryptionLevelEarly), |
| 49 |
"QUICEncryptionLevelHandshake": reflect.ValueOf(tls.QUICEncryptionLevelHandshake), |
| 50 |
"QUICEncryptionLevelInitial": reflect.ValueOf(tls.QUICEncryptionLevelInitial), |
| 51 |
"QUICHandshakeDone": reflect.ValueOf(tls.QUICHandshakeDone), |
| 52 |
"QUICNoEvent": reflect.ValueOf(tls.QUICNoEvent), |
| 53 |
"QUICRejectedEarlyData": reflect.ValueOf(tls.QUICRejectedEarlyData), |
| 54 |
"QUICServer": reflect.ValueOf(tls.QUICServer), |
| 55 |
"QUICSetReadSecret": reflect.ValueOf(tls.QUICSetReadSecret), |
| 56 |
"QUICSetWriteSecret": reflect.ValueOf(tls.QUICSetWriteSecret), |
| 57 |
"QUICTransportParameters": reflect.ValueOf(tls.QUICTransportParameters), |
| 58 |
"QUICTransportParametersRequired": reflect.ValueOf(tls.QUICTransportParametersRequired), |
| 59 |
"QUICWriteData": reflect.ValueOf(tls.QUICWriteData), |
| 60 |
"RenegotiateFreelyAsClient": reflect.ValueOf(tls.RenegotiateFreelyAsClient), |
| 61 |
"RenegotiateNever": reflect.ValueOf(tls.RenegotiateNever), |
| 62 |
"RenegotiateOnceAsClient": reflect.ValueOf(tls.RenegotiateOnceAsClient), |
| 63 |
"RequestClientCert": reflect.ValueOf(tls.RequestClientCert), |
| 64 |
"RequireAndVerifyClientCert": reflect.ValueOf(tls.RequireAndVerifyClientCert), |
| 65 |
"RequireAnyClientCert": reflect.ValueOf(tls.RequireAnyClientCert), |
| 66 |
"Server": reflect.ValueOf(tls.Server), |
| 67 |
"TLS_AES_128_GCM_SHA256": reflect.ValueOf(tls.TLS_AES_128_GCM_SHA256), |
| 68 |
"TLS_AES_256_GCM_SHA384": reflect.ValueOf(tls.TLS_AES_256_GCM_SHA384), |
| 69 |
"TLS_CHACHA20_POLY1305_SHA256": reflect.ValueOf(tls.TLS_CHACHA20_POLY1305_SHA256), |
| 70 |
"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA), |
| 71 |
"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256), |
| 72 |
"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256), |
| 73 |
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA), |
| 74 |
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384), |
| 75 |
"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305), |
| 76 |
"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256), |
| 77 |
"TLS_ECDHE_ECDSA_WITH_RC4_128_SHA": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA), |
| 78 |
"TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA), |
| 79 |
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA), |
| 80 |
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256), |
| 81 |
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256), |
| 82 |
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA), |
| 83 |
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384), |
| 84 |
"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305), |
| 85 |
"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256), |
| 86 |
"TLS_ECDHE_RSA_WITH_RC4_128_SHA": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA), |
| 87 |
"TLS_FALLBACK_SCSV": reflect.ValueOf(tls.TLS_FALLBACK_SCSV), |
| 88 |
"TLS_RSA_WITH_3DES_EDE_CBC_SHA": reflect.ValueOf(tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA), |
| 89 |
"TLS_RSA_WITH_AES_128_CBC_SHA": reflect.ValueOf(tls.TLS_RSA_WITH_AES_128_CBC_SHA), |
| 90 |
"TLS_RSA_WITH_AES_128_CBC_SHA256": reflect.ValueOf(tls.TLS_RSA_WITH_AES_128_CBC_SHA256), |
| 91 |
"TLS_RSA_WITH_AES_128_GCM_SHA256": reflect.ValueOf(tls.TLS_RSA_WITH_AES_128_GCM_SHA256), |
| 92 |
"TLS_RSA_WITH_AES_256_CBC_SHA": reflect.ValueOf(tls.TLS_RSA_WITH_AES_256_CBC_SHA), |
| 93 |
"TLS_RSA_WITH_AES_256_GCM_SHA384": reflect.ValueOf(tls.TLS_RSA_WITH_AES_256_GCM_SHA384), |
| 94 |
"TLS_RSA_WITH_RC4_128_SHA": reflect.ValueOf(tls.TLS_RSA_WITH_RC4_128_SHA), |
| 95 |
"VerifyClientCertIfGiven": reflect.ValueOf(tls.VerifyClientCertIfGiven), |
| 96 |
"VersionName": reflect.ValueOf(tls.VersionName), |
| 97 |
"VersionSSL30": reflect.ValueOf(constant.MakeFromLiteral("768", token.INT, 0)), |
| 98 |
"VersionTLS10": reflect.ValueOf(constant.MakeFromLiteral("769", token.INT, 0)), |
| 99 |
"VersionTLS11": reflect.ValueOf(constant.MakeFromLiteral("770", token.INT, 0)), |
| 100 |
"VersionTLS12": reflect.ValueOf(constant.MakeFromLiteral("771", token.INT, 0)), |
| 101 |
"VersionTLS13": reflect.ValueOf(constant.MakeFromLiteral("772", token.INT, 0)), |
| 102 |
"X25519": reflect.ValueOf(tls.X25519), |
| 103 |
"X509KeyPair": reflect.ValueOf(tls.X509KeyPair), |
| 104 |
|
| 105 |
|
| 106 |
"AlertError": reflect.ValueOf((*tls.AlertError)(nil)), |
| 107 |
"Certificate": reflect.ValueOf((*tls.Certificate)(nil)), |
| 108 |
"CertificateRequestInfo": reflect.ValueOf((*tls.CertificateRequestInfo)(nil)), |
| 109 |
"CertificateVerificationError": reflect.ValueOf((*tls.CertificateVerificationError)(nil)), |
| 110 |
"CipherSuite": reflect.ValueOf((*tls.CipherSuite)(nil)), |
| 111 |
"ClientAuthType": reflect.ValueOf((*tls.ClientAuthType)(nil)), |
| 112 |
"ClientHelloInfo": reflect.ValueOf((*tls.ClientHelloInfo)(nil)), |
| 113 |
"ClientSessionCache": reflect.ValueOf((*tls.ClientSessionCache)(nil)), |
| 114 |
"ClientSessionState": reflect.ValueOf((*tls.ClientSessionState)(nil)), |
| 115 |
"Config": reflect.ValueOf((*tls.Config)(nil)), |
| 116 |
"Conn": reflect.ValueOf((*tls.Conn)(nil)), |
| 117 |
"ConnectionState": reflect.ValueOf((*tls.ConnectionState)(nil)), |
| 118 |
"CurveID": reflect.ValueOf((*tls.CurveID)(nil)), |
| 119 |
"Dialer": reflect.ValueOf((*tls.Dialer)(nil)), |
| 120 |
"QUICConfig": reflect.ValueOf((*tls.QUICConfig)(nil)), |
| 121 |
"QUICConn": reflect.ValueOf((*tls.QUICConn)(nil)), |
| 122 |
"QUICEncryptionLevel": reflect.ValueOf((*tls.QUICEncryptionLevel)(nil)), |
| 123 |
"QUICEvent": reflect.ValueOf((*tls.QUICEvent)(nil)), |
| 124 |
"QUICEventKind": reflect.ValueOf((*tls.QUICEventKind)(nil)), |
| 125 |
"QUICSessionTicketOptions": reflect.ValueOf((*tls.QUICSessionTicketOptions)(nil)), |
| 126 |
"RecordHeaderError": reflect.ValueOf((*tls.RecordHeaderError)(nil)), |
| 127 |
"RenegotiationSupport": reflect.ValueOf((*tls.RenegotiationSupport)(nil)), |
| 128 |
"SessionState": reflect.ValueOf((*tls.SessionState)(nil)), |
| 129 |
"SignatureScheme": reflect.ValueOf((*tls.SignatureScheme)(nil)), |
| 130 |
|
| 131 |
|
| 132 |
"_ClientSessionCache": reflect.ValueOf((*_crypto_tls_ClientSessionCache)(nil)), |
| 133 |
} |
| 134 |
} |
| 135 |
|
| 136 |
|
| 137 |
type _crypto_tls_ClientSessionCache struct { |
| 138 |
IValue interface{} |
| 139 |
WGet func(sessionKey string) (session *tls.ClientSessionState, ok bool) |
| 140 |
WPut func(sessionKey string, cs *tls.ClientSessionState) |
| 141 |
} |
| 142 |
|
| 143 |
func (W _crypto_tls_ClientSessionCache) Get(sessionKey string) (session *tls.ClientSessionState, ok bool) { |
| 144 |
return W.WGet(sessionKey) |
| 145 |
} |
| 146 |
func (W _crypto_tls_ClientSessionCache) Put(sessionKey string, cs *tls.ClientSessionState) { |
| 147 |
W.WPut(sessionKey, cs) |
| 148 |
} |