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

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