github.com/traefik/yaegi@v0.15.1/stdlib/go1_20_crypto_tls.go (about) 1 // Code generated by 'yaegi extract crypto/tls'. DO NOT EDIT. 2 3 //go:build go1.20 4 // +build go1.20 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 // function, constant and variable definitions 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 "NoClientCert": reflect.ValueOf(tls.NoClientCert), 37 "PKCS1WithSHA1": reflect.ValueOf(tls.PKCS1WithSHA1), 38 "PKCS1WithSHA256": reflect.ValueOf(tls.PKCS1WithSHA256), 39 "PKCS1WithSHA384": reflect.ValueOf(tls.PKCS1WithSHA384), 40 "PKCS1WithSHA512": reflect.ValueOf(tls.PKCS1WithSHA512), 41 "PSSWithSHA256": reflect.ValueOf(tls.PSSWithSHA256), 42 "PSSWithSHA384": reflect.ValueOf(tls.PSSWithSHA384), 43 "PSSWithSHA512": reflect.ValueOf(tls.PSSWithSHA512), 44 "RenegotiateFreelyAsClient": reflect.ValueOf(tls.RenegotiateFreelyAsClient), 45 "RenegotiateNever": reflect.ValueOf(tls.RenegotiateNever), 46 "RenegotiateOnceAsClient": reflect.ValueOf(tls.RenegotiateOnceAsClient), 47 "RequestClientCert": reflect.ValueOf(tls.RequestClientCert), 48 "RequireAndVerifyClientCert": reflect.ValueOf(tls.RequireAndVerifyClientCert), 49 "RequireAnyClientCert": reflect.ValueOf(tls.RequireAnyClientCert), 50 "Server": reflect.ValueOf(tls.Server), 51 "TLS_AES_128_GCM_SHA256": reflect.ValueOf(tls.TLS_AES_128_GCM_SHA256), 52 "TLS_AES_256_GCM_SHA384": reflect.ValueOf(tls.TLS_AES_256_GCM_SHA384), 53 "TLS_CHACHA20_POLY1305_SHA256": reflect.ValueOf(tls.TLS_CHACHA20_POLY1305_SHA256), 54 "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA), 55 "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256), 56 "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256), 57 "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA), 58 "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384), 59 "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305), 60 "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256), 61 "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA": reflect.ValueOf(tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA), 62 "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA), 63 "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA), 64 "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256), 65 "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256), 66 "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA), 67 "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384), 68 "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305), 69 "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256), 70 "TLS_ECDHE_RSA_WITH_RC4_128_SHA": reflect.ValueOf(tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA), 71 "TLS_FALLBACK_SCSV": reflect.ValueOf(tls.TLS_FALLBACK_SCSV), 72 "TLS_RSA_WITH_3DES_EDE_CBC_SHA": reflect.ValueOf(tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA), 73 "TLS_RSA_WITH_AES_128_CBC_SHA": reflect.ValueOf(tls.TLS_RSA_WITH_AES_128_CBC_SHA), 74 "TLS_RSA_WITH_AES_128_CBC_SHA256": reflect.ValueOf(tls.TLS_RSA_WITH_AES_128_CBC_SHA256), 75 "TLS_RSA_WITH_AES_128_GCM_SHA256": reflect.ValueOf(tls.TLS_RSA_WITH_AES_128_GCM_SHA256), 76 "TLS_RSA_WITH_AES_256_CBC_SHA": reflect.ValueOf(tls.TLS_RSA_WITH_AES_256_CBC_SHA), 77 "TLS_RSA_WITH_AES_256_GCM_SHA384": reflect.ValueOf(tls.TLS_RSA_WITH_AES_256_GCM_SHA384), 78 "TLS_RSA_WITH_RC4_128_SHA": reflect.ValueOf(tls.TLS_RSA_WITH_RC4_128_SHA), 79 "VerifyClientCertIfGiven": reflect.ValueOf(tls.VerifyClientCertIfGiven), 80 "VersionSSL30": reflect.ValueOf(constant.MakeFromLiteral("768", token.INT, 0)), 81 "VersionTLS10": reflect.ValueOf(constant.MakeFromLiteral("769", token.INT, 0)), 82 "VersionTLS11": reflect.ValueOf(constant.MakeFromLiteral("770", token.INT, 0)), 83 "VersionTLS12": reflect.ValueOf(constant.MakeFromLiteral("771", token.INT, 0)), 84 "VersionTLS13": reflect.ValueOf(constant.MakeFromLiteral("772", token.INT, 0)), 85 "X25519": reflect.ValueOf(tls.X25519), 86 "X509KeyPair": reflect.ValueOf(tls.X509KeyPair), 87 88 // type definitions 89 "Certificate": reflect.ValueOf((*tls.Certificate)(nil)), 90 "CertificateRequestInfo": reflect.ValueOf((*tls.CertificateRequestInfo)(nil)), 91 "CertificateVerificationError": reflect.ValueOf((*tls.CertificateVerificationError)(nil)), 92 "CipherSuite": reflect.ValueOf((*tls.CipherSuite)(nil)), 93 "ClientAuthType": reflect.ValueOf((*tls.ClientAuthType)(nil)), 94 "ClientHelloInfo": reflect.ValueOf((*tls.ClientHelloInfo)(nil)), 95 "ClientSessionCache": reflect.ValueOf((*tls.ClientSessionCache)(nil)), 96 "ClientSessionState": reflect.ValueOf((*tls.ClientSessionState)(nil)), 97 "Config": reflect.ValueOf((*tls.Config)(nil)), 98 "Conn": reflect.ValueOf((*tls.Conn)(nil)), 99 "ConnectionState": reflect.ValueOf((*tls.ConnectionState)(nil)), 100 "CurveID": reflect.ValueOf((*tls.CurveID)(nil)), 101 "Dialer": reflect.ValueOf((*tls.Dialer)(nil)), 102 "RecordHeaderError": reflect.ValueOf((*tls.RecordHeaderError)(nil)), 103 "RenegotiationSupport": reflect.ValueOf((*tls.RenegotiationSupport)(nil)), 104 "SignatureScheme": reflect.ValueOf((*tls.SignatureScheme)(nil)), 105 106 // interface wrapper definitions 107 "_ClientSessionCache": reflect.ValueOf((*_crypto_tls_ClientSessionCache)(nil)), 108 } 109 } 110 111 // _crypto_tls_ClientSessionCache is an interface wrapper for ClientSessionCache type 112 type _crypto_tls_ClientSessionCache struct { 113 IValue interface{} 114 WGet func(sessionKey string) (session *tls.ClientSessionState, ok bool) 115 WPut func(sessionKey string, cs *tls.ClientSessionState) 116 } 117 118 func (W _crypto_tls_ClientSessionCache) Get(sessionKey string) (session *tls.ClientSessionState, ok bool) { 119 return W.WGet(sessionKey) 120 } 121 func (W _crypto_tls_ClientSessionCache) Put(sessionKey string, cs *tls.ClientSessionState) { 122 W.WPut(sessionKey, cs) 123 }