github.com/goplus/igop@v0.25.0/pkg/crypto/tls/go118_export.go (about)

     1  // export by github.com/goplus/igop/cmd/qexp
     2  
     3  //go:build go1.18 && !go1.19
     4  // +build go1.18,!go1.19
     5  
     6  package tls
     7  
     8  import (
     9  	q "crypto/tls"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/igop"
    15  )
    16  
    17  func init() {
    18  	igop.RegisterPackage(&igop.Package{
    19  		Name: "tls",
    20  		Path: "crypto/tls",
    21  		Deps: map[string]string{
    22  			"bytes":            "bytes",
    23  			"container/list":   "list",
    24  			"context":          "context",
    25  			"crypto":           "crypto",
    26  			"crypto/aes":       "aes",
    27  			"crypto/cipher":    "cipher",
    28  			"crypto/des":       "des",
    29  			"crypto/ecdsa":     "ecdsa",
    30  			"crypto/ed25519":   "ed25519",
    31  			"crypto/elliptic":  "elliptic",
    32  			"crypto/hmac":      "hmac",
    33  			"crypto/md5":       "md5",
    34  			"crypto/rand":      "rand",
    35  			"crypto/rc4":       "rc4",
    36  			"crypto/rsa":       "rsa",
    37  			"crypto/sha1":      "sha1",
    38  			"crypto/sha256":    "sha256",
    39  			"crypto/sha512":    "sha512",
    40  			"crypto/subtle":    "subtle",
    41  			"crypto/x509":      "x509",
    42  			"encoding/binary":  "binary",
    43  			"encoding/pem":     "pem",
    44  			"errors":           "errors",
    45  			"fmt":              "fmt",
    46  			"hash":             "hash",
    47  			"internal/cpu":     "cpu",
    48  			"internal/godebug": "godebug",
    49  			"io":               "io",
    50  			"math/big":         "big",
    51  			"net":              "net",
    52  			"os":               "os",
    53  			"runtime":          "runtime",
    54  			"strconv":          "strconv",
    55  			"strings":          "strings",
    56  			"sync":             "sync",
    57  			"sync/atomic":      "atomic",
    58  			"time":             "time",
    59  			"vendor/golang.org/x/crypto/chacha20poly1305": "chacha20poly1305",
    60  			"vendor/golang.org/x/crypto/cryptobyte":       "cryptobyte",
    61  			"vendor/golang.org/x/crypto/curve25519":       "curve25519",
    62  			"vendor/golang.org/x/crypto/hkdf":             "hkdf",
    63  		},
    64  		Interfaces: map[string]reflect.Type{
    65  			"ClientSessionCache": reflect.TypeOf((*q.ClientSessionCache)(nil)).Elem(),
    66  		},
    67  		NamedTypes: map[string]reflect.Type{
    68  			"Certificate":            reflect.TypeOf((*q.Certificate)(nil)).Elem(),
    69  			"CertificateRequestInfo": reflect.TypeOf((*q.CertificateRequestInfo)(nil)).Elem(),
    70  			"CipherSuite":            reflect.TypeOf((*q.CipherSuite)(nil)).Elem(),
    71  			"ClientAuthType":         reflect.TypeOf((*q.ClientAuthType)(nil)).Elem(),
    72  			"ClientHelloInfo":        reflect.TypeOf((*q.ClientHelloInfo)(nil)).Elem(),
    73  			"ClientSessionState":     reflect.TypeOf((*q.ClientSessionState)(nil)).Elem(),
    74  			"Config":                 reflect.TypeOf((*q.Config)(nil)).Elem(),
    75  			"Conn":                   reflect.TypeOf((*q.Conn)(nil)).Elem(),
    76  			"ConnectionState":        reflect.TypeOf((*q.ConnectionState)(nil)).Elem(),
    77  			"CurveID":                reflect.TypeOf((*q.CurveID)(nil)).Elem(),
    78  			"Dialer":                 reflect.TypeOf((*q.Dialer)(nil)).Elem(),
    79  			"RecordHeaderError":      reflect.TypeOf((*q.RecordHeaderError)(nil)).Elem(),
    80  			"RenegotiationSupport":   reflect.TypeOf((*q.RenegotiationSupport)(nil)).Elem(),
    81  			"SignatureScheme":        reflect.TypeOf((*q.SignatureScheme)(nil)).Elem(),
    82  		},
    83  		AliasTypes: map[string]reflect.Type{},
    84  		Vars:       map[string]reflect.Value{},
    85  		Funcs: map[string]reflect.Value{
    86  			"CipherSuiteName":          reflect.ValueOf(q.CipherSuiteName),
    87  			"CipherSuites":             reflect.ValueOf(q.CipherSuites),
    88  			"Client":                   reflect.ValueOf(q.Client),
    89  			"Dial":                     reflect.ValueOf(q.Dial),
    90  			"DialWithDialer":           reflect.ValueOf(q.DialWithDialer),
    91  			"InsecureCipherSuites":     reflect.ValueOf(q.InsecureCipherSuites),
    92  			"Listen":                   reflect.ValueOf(q.Listen),
    93  			"LoadX509KeyPair":          reflect.ValueOf(q.LoadX509KeyPair),
    94  			"NewLRUClientSessionCache": reflect.ValueOf(q.NewLRUClientSessionCache),
    95  			"NewListener":              reflect.ValueOf(q.NewListener),
    96  			"Server":                   reflect.ValueOf(q.Server),
    97  			"X509KeyPair":              reflect.ValueOf(q.X509KeyPair),
    98  		},
    99  		TypedConsts: map[string]igop.TypedConst{
   100  			"CurveP256":                                     {reflect.TypeOf(q.CurveP256), constant.MakeInt64(int64(q.CurveP256))},
   101  			"CurveP384":                                     {reflect.TypeOf(q.CurveP384), constant.MakeInt64(int64(q.CurveP384))},
   102  			"CurveP521":                                     {reflect.TypeOf(q.CurveP521), constant.MakeInt64(int64(q.CurveP521))},
   103  			"ECDSAWithP256AndSHA256":                        {reflect.TypeOf(q.ECDSAWithP256AndSHA256), constant.MakeInt64(int64(q.ECDSAWithP256AndSHA256))},
   104  			"ECDSAWithP384AndSHA384":                        {reflect.TypeOf(q.ECDSAWithP384AndSHA384), constant.MakeInt64(int64(q.ECDSAWithP384AndSHA384))},
   105  			"ECDSAWithP521AndSHA512":                        {reflect.TypeOf(q.ECDSAWithP521AndSHA512), constant.MakeInt64(int64(q.ECDSAWithP521AndSHA512))},
   106  			"ECDSAWithSHA1":                                 {reflect.TypeOf(q.ECDSAWithSHA1), constant.MakeInt64(int64(q.ECDSAWithSHA1))},
   107  			"Ed25519":                                       {reflect.TypeOf(q.Ed25519), constant.MakeInt64(int64(q.Ed25519))},
   108  			"NoClientCert":                                  {reflect.TypeOf(q.NoClientCert), constant.MakeInt64(int64(q.NoClientCert))},
   109  			"PKCS1WithSHA1":                                 {reflect.TypeOf(q.PKCS1WithSHA1), constant.MakeInt64(int64(q.PKCS1WithSHA1))},
   110  			"PKCS1WithSHA256":                               {reflect.TypeOf(q.PKCS1WithSHA256), constant.MakeInt64(int64(q.PKCS1WithSHA256))},
   111  			"PKCS1WithSHA384":                               {reflect.TypeOf(q.PKCS1WithSHA384), constant.MakeInt64(int64(q.PKCS1WithSHA384))},
   112  			"PKCS1WithSHA512":                               {reflect.TypeOf(q.PKCS1WithSHA512), constant.MakeInt64(int64(q.PKCS1WithSHA512))},
   113  			"PSSWithSHA256":                                 {reflect.TypeOf(q.PSSWithSHA256), constant.MakeInt64(int64(q.PSSWithSHA256))},
   114  			"PSSWithSHA384":                                 {reflect.TypeOf(q.PSSWithSHA384), constant.MakeInt64(int64(q.PSSWithSHA384))},
   115  			"PSSWithSHA512":                                 {reflect.TypeOf(q.PSSWithSHA512), constant.MakeInt64(int64(q.PSSWithSHA512))},
   116  			"RenegotiateFreelyAsClient":                     {reflect.TypeOf(q.RenegotiateFreelyAsClient), constant.MakeInt64(int64(q.RenegotiateFreelyAsClient))},
   117  			"RenegotiateNever":                              {reflect.TypeOf(q.RenegotiateNever), constant.MakeInt64(int64(q.RenegotiateNever))},
   118  			"RenegotiateOnceAsClient":                       {reflect.TypeOf(q.RenegotiateOnceAsClient), constant.MakeInt64(int64(q.RenegotiateOnceAsClient))},
   119  			"RequestClientCert":                             {reflect.TypeOf(q.RequestClientCert), constant.MakeInt64(int64(q.RequestClientCert))},
   120  			"RequireAndVerifyClientCert":                    {reflect.TypeOf(q.RequireAndVerifyClientCert), constant.MakeInt64(int64(q.RequireAndVerifyClientCert))},
   121  			"RequireAnyClientCert":                          {reflect.TypeOf(q.RequireAnyClientCert), constant.MakeInt64(int64(q.RequireAnyClientCert))},
   122  			"TLS_AES_128_GCM_SHA256":                        {reflect.TypeOf(q.TLS_AES_128_GCM_SHA256), constant.MakeInt64(int64(q.TLS_AES_128_GCM_SHA256))},
   123  			"TLS_AES_256_GCM_SHA384":                        {reflect.TypeOf(q.TLS_AES_256_GCM_SHA384), constant.MakeInt64(int64(q.TLS_AES_256_GCM_SHA384))},
   124  			"TLS_CHACHA20_POLY1305_SHA256":                  {reflect.TypeOf(q.TLS_CHACHA20_POLY1305_SHA256), constant.MakeInt64(int64(q.TLS_CHACHA20_POLY1305_SHA256))},
   125  			"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA":          {reflect.TypeOf(q.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA), constant.MakeInt64(int64(q.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA))},
   126  			"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256":       {reflect.TypeOf(q.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256), constant.MakeInt64(int64(q.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256))},
   127  			"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256":       {reflect.TypeOf(q.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256), constant.MakeInt64(int64(q.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256))},
   128  			"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA":          {reflect.TypeOf(q.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA), constant.MakeInt64(int64(q.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA))},
   129  			"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384":       {reflect.TypeOf(q.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384), constant.MakeInt64(int64(q.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384))},
   130  			"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305":        {reflect.TypeOf(q.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305), constant.MakeInt64(int64(q.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305))},
   131  			"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256": {reflect.TypeOf(q.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256), constant.MakeInt64(int64(q.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256))},
   132  			"TLS_ECDHE_ECDSA_WITH_RC4_128_SHA":              {reflect.TypeOf(q.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA), constant.MakeInt64(int64(q.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA))},
   133  			"TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA":           {reflect.TypeOf(q.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA), constant.MakeInt64(int64(q.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA))},
   134  			"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA":            {reflect.TypeOf(q.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA), constant.MakeInt64(int64(q.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA))},
   135  			"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256":         {reflect.TypeOf(q.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256), constant.MakeInt64(int64(q.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256))},
   136  			"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256":         {reflect.TypeOf(q.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256), constant.MakeInt64(int64(q.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256))},
   137  			"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA":            {reflect.TypeOf(q.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA), constant.MakeInt64(int64(q.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA))},
   138  			"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384":         {reflect.TypeOf(q.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384), constant.MakeInt64(int64(q.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384))},
   139  			"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305":          {reflect.TypeOf(q.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305), constant.MakeInt64(int64(q.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305))},
   140  			"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256":   {reflect.TypeOf(q.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256), constant.MakeInt64(int64(q.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256))},
   141  			"TLS_ECDHE_RSA_WITH_RC4_128_SHA":                {reflect.TypeOf(q.TLS_ECDHE_RSA_WITH_RC4_128_SHA), constant.MakeInt64(int64(q.TLS_ECDHE_RSA_WITH_RC4_128_SHA))},
   142  			"TLS_FALLBACK_SCSV":                             {reflect.TypeOf(q.TLS_FALLBACK_SCSV), constant.MakeInt64(int64(q.TLS_FALLBACK_SCSV))},
   143  			"TLS_RSA_WITH_3DES_EDE_CBC_SHA":                 {reflect.TypeOf(q.TLS_RSA_WITH_3DES_EDE_CBC_SHA), constant.MakeInt64(int64(q.TLS_RSA_WITH_3DES_EDE_CBC_SHA))},
   144  			"TLS_RSA_WITH_AES_128_CBC_SHA":                  {reflect.TypeOf(q.TLS_RSA_WITH_AES_128_CBC_SHA), constant.MakeInt64(int64(q.TLS_RSA_WITH_AES_128_CBC_SHA))},
   145  			"TLS_RSA_WITH_AES_128_CBC_SHA256":               {reflect.TypeOf(q.TLS_RSA_WITH_AES_128_CBC_SHA256), constant.MakeInt64(int64(q.TLS_RSA_WITH_AES_128_CBC_SHA256))},
   146  			"TLS_RSA_WITH_AES_128_GCM_SHA256":               {reflect.TypeOf(q.TLS_RSA_WITH_AES_128_GCM_SHA256), constant.MakeInt64(int64(q.TLS_RSA_WITH_AES_128_GCM_SHA256))},
   147  			"TLS_RSA_WITH_AES_256_CBC_SHA":                  {reflect.TypeOf(q.TLS_RSA_WITH_AES_256_CBC_SHA), constant.MakeInt64(int64(q.TLS_RSA_WITH_AES_256_CBC_SHA))},
   148  			"TLS_RSA_WITH_AES_256_GCM_SHA384":               {reflect.TypeOf(q.TLS_RSA_WITH_AES_256_GCM_SHA384), constant.MakeInt64(int64(q.TLS_RSA_WITH_AES_256_GCM_SHA384))},
   149  			"TLS_RSA_WITH_RC4_128_SHA":                      {reflect.TypeOf(q.TLS_RSA_WITH_RC4_128_SHA), constant.MakeInt64(int64(q.TLS_RSA_WITH_RC4_128_SHA))},
   150  			"VerifyClientCertIfGiven":                       {reflect.TypeOf(q.VerifyClientCertIfGiven), constant.MakeInt64(int64(q.VerifyClientCertIfGiven))},
   151  			"X25519":                                        {reflect.TypeOf(q.X25519), constant.MakeInt64(int64(q.X25519))},
   152  		},
   153  		UntypedConsts: map[string]igop.UntypedConst{
   154  			"VersionSSL30": {"untyped int", constant.MakeInt64(int64(q.VersionSSL30))},
   155  			"VersionTLS10": {"untyped int", constant.MakeInt64(int64(q.VersionTLS10))},
   156  			"VersionTLS11": {"untyped int", constant.MakeInt64(int64(q.VersionTLS11))},
   157  			"VersionTLS12": {"untyped int", constant.MakeInt64(int64(q.VersionTLS12))},
   158  			"VersionTLS13": {"untyped int", constant.MakeInt64(int64(q.VersionTLS13))},
   159  		},
   160  	})
   161  }