github.com/goplus/igop@v0.25.0/pkg/crypto/x509/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 x509
     7  
     8  import (
     9  	q "crypto/x509"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/igop"
    15  )
    16  
    17  func init() {
    18  	igop.RegisterPackage(&igop.Package{
    19  		Name: "x509",
    20  		Path: "crypto/x509",
    21  		Deps: map[string]string{
    22  			"bytes":                                 "bytes",
    23  			"crypto":                                "crypto",
    24  			"crypto/aes":                            "aes",
    25  			"crypto/cipher":                         "cipher",
    26  			"crypto/des":                            "des",
    27  			"crypto/dsa":                            "dsa",
    28  			"crypto/ecdsa":                          "ecdsa",
    29  			"crypto/ed25519":                        "ed25519",
    30  			"crypto/elliptic":                       "elliptic",
    31  			"crypto/md5":                            "md5",
    32  			"crypto/rsa":                            "rsa",
    33  			"crypto/sha1":                           "sha1",
    34  			"crypto/sha256":                         "sha256",
    35  			"crypto/sha512":                         "sha512",
    36  			"crypto/x509/internal/macos":            "macOS",
    37  			"crypto/x509/pkix":                      "pkix",
    38  			"encoding/asn1":                         "asn1",
    39  			"encoding/hex":                          "hex",
    40  			"encoding/pem":                          "pem",
    41  			"errors":                                "errors",
    42  			"fmt":                                   "fmt",
    43  			"internal/godebug":                      "godebug",
    44  			"io":                                    "io",
    45  			"math/big":                              "big",
    46  			"net":                                   "net",
    47  			"net/url":                               "url",
    48  			"reflect":                               "reflect",
    49  			"runtime":                               "runtime",
    50  			"strconv":                               "strconv",
    51  			"strings":                               "strings",
    52  			"sync":                                  "sync",
    53  			"time":                                  "time",
    54  			"unicode":                               "unicode",
    55  			"unicode/utf16":                         "utf16",
    56  			"unicode/utf8":                          "utf8",
    57  			"vendor/golang.org/x/crypto/cryptobyte": "cryptobyte",
    58  			"vendor/golang.org/x/crypto/cryptobyte/asn1": "asn1",
    59  		},
    60  		Interfaces: map[string]reflect.Type{},
    61  		NamedTypes: map[string]reflect.Type{
    62  			"CertPool":                   reflect.TypeOf((*q.CertPool)(nil)).Elem(),
    63  			"Certificate":                reflect.TypeOf((*q.Certificate)(nil)).Elem(),
    64  			"CertificateInvalidError":    reflect.TypeOf((*q.CertificateInvalidError)(nil)).Elem(),
    65  			"CertificateRequest":         reflect.TypeOf((*q.CertificateRequest)(nil)).Elem(),
    66  			"ConstraintViolationError":   reflect.TypeOf((*q.ConstraintViolationError)(nil)).Elem(),
    67  			"ExtKeyUsage":                reflect.TypeOf((*q.ExtKeyUsage)(nil)).Elem(),
    68  			"HostnameError":              reflect.TypeOf((*q.HostnameError)(nil)).Elem(),
    69  			"InsecureAlgorithmError":     reflect.TypeOf((*q.InsecureAlgorithmError)(nil)).Elem(),
    70  			"InvalidReason":              reflect.TypeOf((*q.InvalidReason)(nil)).Elem(),
    71  			"KeyUsage":                   reflect.TypeOf((*q.KeyUsage)(nil)).Elem(),
    72  			"PEMCipher":                  reflect.TypeOf((*q.PEMCipher)(nil)).Elem(),
    73  			"PublicKeyAlgorithm":         reflect.TypeOf((*q.PublicKeyAlgorithm)(nil)).Elem(),
    74  			"RevocationList":             reflect.TypeOf((*q.RevocationList)(nil)).Elem(),
    75  			"SignatureAlgorithm":         reflect.TypeOf((*q.SignatureAlgorithm)(nil)).Elem(),
    76  			"SystemRootsError":           reflect.TypeOf((*q.SystemRootsError)(nil)).Elem(),
    77  			"UnhandledCriticalExtension": reflect.TypeOf((*q.UnhandledCriticalExtension)(nil)).Elem(),
    78  			"UnknownAuthorityError":      reflect.TypeOf((*q.UnknownAuthorityError)(nil)).Elem(),
    79  			"VerifyOptions":              reflect.TypeOf((*q.VerifyOptions)(nil)).Elem(),
    80  		},
    81  		AliasTypes: map[string]reflect.Type{},
    82  		Vars: map[string]reflect.Value{
    83  			"ErrUnsupportedAlgorithm": reflect.ValueOf(&q.ErrUnsupportedAlgorithm),
    84  			"IncorrectPasswordError":  reflect.ValueOf(&q.IncorrectPasswordError),
    85  		},
    86  		Funcs: map[string]reflect.Value{
    87  			"CreateCertificate":        reflect.ValueOf(q.CreateCertificate),
    88  			"CreateCertificateRequest": reflect.ValueOf(q.CreateCertificateRequest),
    89  			"CreateRevocationList":     reflect.ValueOf(q.CreateRevocationList),
    90  			"DecryptPEMBlock":          reflect.ValueOf(q.DecryptPEMBlock),
    91  			"EncryptPEMBlock":          reflect.ValueOf(q.EncryptPEMBlock),
    92  			"IsEncryptedPEMBlock":      reflect.ValueOf(q.IsEncryptedPEMBlock),
    93  			"MarshalECPrivateKey":      reflect.ValueOf(q.MarshalECPrivateKey),
    94  			"MarshalPKCS1PrivateKey":   reflect.ValueOf(q.MarshalPKCS1PrivateKey),
    95  			"MarshalPKCS1PublicKey":    reflect.ValueOf(q.MarshalPKCS1PublicKey),
    96  			"MarshalPKCS8PrivateKey":   reflect.ValueOf(q.MarshalPKCS8PrivateKey),
    97  			"MarshalPKIXPublicKey":     reflect.ValueOf(q.MarshalPKIXPublicKey),
    98  			"NewCertPool":              reflect.ValueOf(q.NewCertPool),
    99  			"ParseCRL":                 reflect.ValueOf(q.ParseCRL),
   100  			"ParseCertificate":         reflect.ValueOf(q.ParseCertificate),
   101  			"ParseCertificateRequest":  reflect.ValueOf(q.ParseCertificateRequest),
   102  			"ParseCertificates":        reflect.ValueOf(q.ParseCertificates),
   103  			"ParseDERCRL":              reflect.ValueOf(q.ParseDERCRL),
   104  			"ParseECPrivateKey":        reflect.ValueOf(q.ParseECPrivateKey),
   105  			"ParsePKCS1PrivateKey":     reflect.ValueOf(q.ParsePKCS1PrivateKey),
   106  			"ParsePKCS1PublicKey":      reflect.ValueOf(q.ParsePKCS1PublicKey),
   107  			"ParsePKCS8PrivateKey":     reflect.ValueOf(q.ParsePKCS8PrivateKey),
   108  			"ParsePKIXPublicKey":       reflect.ValueOf(q.ParsePKIXPublicKey),
   109  			"SystemCertPool":           reflect.ValueOf(q.SystemCertPool),
   110  		},
   111  		TypedConsts: map[string]igop.TypedConst{
   112  			"CANotAuthorizedForExtKeyUsage": {reflect.TypeOf(q.CANotAuthorizedForExtKeyUsage), constant.MakeInt64(int64(q.CANotAuthorizedForExtKeyUsage))},
   113  			"CANotAuthorizedForThisName":    {reflect.TypeOf(q.CANotAuthorizedForThisName), constant.MakeInt64(int64(q.CANotAuthorizedForThisName))},
   114  			"DSA":                           {reflect.TypeOf(q.DSA), constant.MakeInt64(int64(q.DSA))},
   115  			"DSAWithSHA1":                   {reflect.TypeOf(q.DSAWithSHA1), constant.MakeInt64(int64(q.DSAWithSHA1))},
   116  			"DSAWithSHA256":                 {reflect.TypeOf(q.DSAWithSHA256), constant.MakeInt64(int64(q.DSAWithSHA256))},
   117  			"ECDSA":                         {reflect.TypeOf(q.ECDSA), constant.MakeInt64(int64(q.ECDSA))},
   118  			"ECDSAWithSHA1":                 {reflect.TypeOf(q.ECDSAWithSHA1), constant.MakeInt64(int64(q.ECDSAWithSHA1))},
   119  			"ECDSAWithSHA256":               {reflect.TypeOf(q.ECDSAWithSHA256), constant.MakeInt64(int64(q.ECDSAWithSHA256))},
   120  			"ECDSAWithSHA384":               {reflect.TypeOf(q.ECDSAWithSHA384), constant.MakeInt64(int64(q.ECDSAWithSHA384))},
   121  			"ECDSAWithSHA512":               {reflect.TypeOf(q.ECDSAWithSHA512), constant.MakeInt64(int64(q.ECDSAWithSHA512))},
   122  			"Ed25519":                       {reflect.TypeOf(q.Ed25519), constant.MakeInt64(int64(q.Ed25519))},
   123  			"Expired":                       {reflect.TypeOf(q.Expired), constant.MakeInt64(int64(q.Expired))},
   124  			"ExtKeyUsageAny":                {reflect.TypeOf(q.ExtKeyUsageAny), constant.MakeInt64(int64(q.ExtKeyUsageAny))},
   125  			"ExtKeyUsageClientAuth":         {reflect.TypeOf(q.ExtKeyUsageClientAuth), constant.MakeInt64(int64(q.ExtKeyUsageClientAuth))},
   126  			"ExtKeyUsageCodeSigning":        {reflect.TypeOf(q.ExtKeyUsageCodeSigning), constant.MakeInt64(int64(q.ExtKeyUsageCodeSigning))},
   127  			"ExtKeyUsageEmailProtection":    {reflect.TypeOf(q.ExtKeyUsageEmailProtection), constant.MakeInt64(int64(q.ExtKeyUsageEmailProtection))},
   128  			"ExtKeyUsageIPSECEndSystem":     {reflect.TypeOf(q.ExtKeyUsageIPSECEndSystem), constant.MakeInt64(int64(q.ExtKeyUsageIPSECEndSystem))},
   129  			"ExtKeyUsageIPSECTunnel":        {reflect.TypeOf(q.ExtKeyUsageIPSECTunnel), constant.MakeInt64(int64(q.ExtKeyUsageIPSECTunnel))},
   130  			"ExtKeyUsageIPSECUser":          {reflect.TypeOf(q.ExtKeyUsageIPSECUser), constant.MakeInt64(int64(q.ExtKeyUsageIPSECUser))},
   131  			"ExtKeyUsageMicrosoftCommercialCodeSigning": {reflect.TypeOf(q.ExtKeyUsageMicrosoftCommercialCodeSigning), constant.MakeInt64(int64(q.ExtKeyUsageMicrosoftCommercialCodeSigning))},
   132  			"ExtKeyUsageMicrosoftKernelCodeSigning":     {reflect.TypeOf(q.ExtKeyUsageMicrosoftKernelCodeSigning), constant.MakeInt64(int64(q.ExtKeyUsageMicrosoftKernelCodeSigning))},
   133  			"ExtKeyUsageMicrosoftServerGatedCrypto":     {reflect.TypeOf(q.ExtKeyUsageMicrosoftServerGatedCrypto), constant.MakeInt64(int64(q.ExtKeyUsageMicrosoftServerGatedCrypto))},
   134  			"ExtKeyUsageNetscapeServerGatedCrypto":      {reflect.TypeOf(q.ExtKeyUsageNetscapeServerGatedCrypto), constant.MakeInt64(int64(q.ExtKeyUsageNetscapeServerGatedCrypto))},
   135  			"ExtKeyUsageOCSPSigning":                    {reflect.TypeOf(q.ExtKeyUsageOCSPSigning), constant.MakeInt64(int64(q.ExtKeyUsageOCSPSigning))},
   136  			"ExtKeyUsageServerAuth":                     {reflect.TypeOf(q.ExtKeyUsageServerAuth), constant.MakeInt64(int64(q.ExtKeyUsageServerAuth))},
   137  			"ExtKeyUsageTimeStamping":                   {reflect.TypeOf(q.ExtKeyUsageTimeStamping), constant.MakeInt64(int64(q.ExtKeyUsageTimeStamping))},
   138  			"IncompatibleUsage":                         {reflect.TypeOf(q.IncompatibleUsage), constant.MakeInt64(int64(q.IncompatibleUsage))},
   139  			"KeyUsageCRLSign":                           {reflect.TypeOf(q.KeyUsageCRLSign), constant.MakeInt64(int64(q.KeyUsageCRLSign))},
   140  			"KeyUsageCertSign":                          {reflect.TypeOf(q.KeyUsageCertSign), constant.MakeInt64(int64(q.KeyUsageCertSign))},
   141  			"KeyUsageContentCommitment":                 {reflect.TypeOf(q.KeyUsageContentCommitment), constant.MakeInt64(int64(q.KeyUsageContentCommitment))},
   142  			"KeyUsageDataEncipherment":                  {reflect.TypeOf(q.KeyUsageDataEncipherment), constant.MakeInt64(int64(q.KeyUsageDataEncipherment))},
   143  			"KeyUsageDecipherOnly":                      {reflect.TypeOf(q.KeyUsageDecipherOnly), constant.MakeInt64(int64(q.KeyUsageDecipherOnly))},
   144  			"KeyUsageDigitalSignature":                  {reflect.TypeOf(q.KeyUsageDigitalSignature), constant.MakeInt64(int64(q.KeyUsageDigitalSignature))},
   145  			"KeyUsageEncipherOnly":                      {reflect.TypeOf(q.KeyUsageEncipherOnly), constant.MakeInt64(int64(q.KeyUsageEncipherOnly))},
   146  			"KeyUsageKeyAgreement":                      {reflect.TypeOf(q.KeyUsageKeyAgreement), constant.MakeInt64(int64(q.KeyUsageKeyAgreement))},
   147  			"KeyUsageKeyEncipherment":                   {reflect.TypeOf(q.KeyUsageKeyEncipherment), constant.MakeInt64(int64(q.KeyUsageKeyEncipherment))},
   148  			"MD2WithRSA":                                {reflect.TypeOf(q.MD2WithRSA), constant.MakeInt64(int64(q.MD2WithRSA))},
   149  			"MD5WithRSA":                                {reflect.TypeOf(q.MD5WithRSA), constant.MakeInt64(int64(q.MD5WithRSA))},
   150  			"NameConstraintsWithoutSANs":                {reflect.TypeOf(q.NameConstraintsWithoutSANs), constant.MakeInt64(int64(q.NameConstraintsWithoutSANs))},
   151  			"NameMismatch":                              {reflect.TypeOf(q.NameMismatch), constant.MakeInt64(int64(q.NameMismatch))},
   152  			"NotAuthorizedToSign":                       {reflect.TypeOf(q.NotAuthorizedToSign), constant.MakeInt64(int64(q.NotAuthorizedToSign))},
   153  			"PEMCipher3DES":                             {reflect.TypeOf(q.PEMCipher3DES), constant.MakeInt64(int64(q.PEMCipher3DES))},
   154  			"PEMCipherAES128":                           {reflect.TypeOf(q.PEMCipherAES128), constant.MakeInt64(int64(q.PEMCipherAES128))},
   155  			"PEMCipherAES192":                           {reflect.TypeOf(q.PEMCipherAES192), constant.MakeInt64(int64(q.PEMCipherAES192))},
   156  			"PEMCipherAES256":                           {reflect.TypeOf(q.PEMCipherAES256), constant.MakeInt64(int64(q.PEMCipherAES256))},
   157  			"PEMCipherDES":                              {reflect.TypeOf(q.PEMCipherDES), constant.MakeInt64(int64(q.PEMCipherDES))},
   158  			"PureEd25519":                               {reflect.TypeOf(q.PureEd25519), constant.MakeInt64(int64(q.PureEd25519))},
   159  			"RSA":                                       {reflect.TypeOf(q.RSA), constant.MakeInt64(int64(q.RSA))},
   160  			"SHA1WithRSA":                               {reflect.TypeOf(q.SHA1WithRSA), constant.MakeInt64(int64(q.SHA1WithRSA))},
   161  			"SHA256WithRSA":                             {reflect.TypeOf(q.SHA256WithRSA), constant.MakeInt64(int64(q.SHA256WithRSA))},
   162  			"SHA256WithRSAPSS":                          {reflect.TypeOf(q.SHA256WithRSAPSS), constant.MakeInt64(int64(q.SHA256WithRSAPSS))},
   163  			"SHA384WithRSA":                             {reflect.TypeOf(q.SHA384WithRSA), constant.MakeInt64(int64(q.SHA384WithRSA))},
   164  			"SHA384WithRSAPSS":                          {reflect.TypeOf(q.SHA384WithRSAPSS), constant.MakeInt64(int64(q.SHA384WithRSAPSS))},
   165  			"SHA512WithRSA":                             {reflect.TypeOf(q.SHA512WithRSA), constant.MakeInt64(int64(q.SHA512WithRSA))},
   166  			"SHA512WithRSAPSS":                          {reflect.TypeOf(q.SHA512WithRSAPSS), constant.MakeInt64(int64(q.SHA512WithRSAPSS))},
   167  			"TooManyConstraints":                        {reflect.TypeOf(q.TooManyConstraints), constant.MakeInt64(int64(q.TooManyConstraints))},
   168  			"TooManyIntermediates":                      {reflect.TypeOf(q.TooManyIntermediates), constant.MakeInt64(int64(q.TooManyIntermediates))},
   169  			"UnconstrainedName":                         {reflect.TypeOf(q.UnconstrainedName), constant.MakeInt64(int64(q.UnconstrainedName))},
   170  			"UnknownPublicKeyAlgorithm":                 {reflect.TypeOf(q.UnknownPublicKeyAlgorithm), constant.MakeInt64(int64(q.UnknownPublicKeyAlgorithm))},
   171  			"UnknownSignatureAlgorithm":                 {reflect.TypeOf(q.UnknownSignatureAlgorithm), constant.MakeInt64(int64(q.UnknownSignatureAlgorithm))},
   172  		},
   173  		UntypedConsts: map[string]igop.UntypedConst{},
   174  	})
   175  }