]> Cypherpunks.ru repositories - gostls13.git/blob - src/crypto/tls/common_string.go
Autogenerated TLS-related strings
[gostls13.git] / src / crypto / tls / common_string.go
1 // Code generated by "stringer -type=SignatureScheme,CurveID,ClientAuthType -output=common_string.go"; DO NOT EDIT.
2
3 package tls
4
5 import "strconv"
6
7 func _() {
8         // An "invalid array index" compiler error signifies that the constant values have changed.
9         // Re-run the stringer command to generate them again.
10         var x [1]struct{}
11         _ = x[PKCS1WithSHA256-1025]
12         _ = x[PKCS1WithSHA384-1281]
13         _ = x[PKCS1WithSHA512-1537]
14         _ = x[PSSWithSHA256-2052]
15         _ = x[PSSWithSHA384-2053]
16         _ = x[PSSWithSHA512-2054]
17         _ = x[ECDSAWithP256AndSHA256-1027]
18         _ = x[ECDSAWithP384AndSHA384-1283]
19         _ = x[ECDSAWithP521AndSHA512-1539]
20         _ = x[Ed25519-2055]
21         _ = x[PKCS1WithSHA1-513]
22         _ = x[ECDSAWithSHA1-515]
23         _ = x[GOSTR34102012256A-1801]
24         _ = x[GOSTR34102012256B-1802]
25         _ = x[GOSTR34102012256C-1803]
26         _ = x[GOSTR34102012256D-1804]
27         _ = x[GOSTR34102012512A-1805]
28         _ = x[GOSTR34102012512B-1806]
29         _ = x[GOSTR34102012512C-1807]
30 }
31
32 const (
33         _SignatureScheme_name_0 = "PKCS1WithSHA1"
34         _SignatureScheme_name_1 = "ECDSAWithSHA1"
35         _SignatureScheme_name_2 = "PKCS1WithSHA256"
36         _SignatureScheme_name_3 = "ECDSAWithP256AndSHA256"
37         _SignatureScheme_name_4 = "PKCS1WithSHA384"
38         _SignatureScheme_name_5 = "ECDSAWithP384AndSHA384"
39         _SignatureScheme_name_6 = "PKCS1WithSHA512"
40         _SignatureScheme_name_7 = "ECDSAWithP521AndSHA512"
41         _SignatureScheme_name_8 = "GOSTR34102012256AGOSTR34102012256BGOSTR34102012256CGOSTR34102012256DGOSTR34102012512AGOSTR34102012512BGOSTR34102012512C"
42         _SignatureScheme_name_9 = "PSSWithSHA256PSSWithSHA384PSSWithSHA512Ed25519"
43 )
44
45 var (
46         _SignatureScheme_index_8 = [...]uint8{0, 17, 34, 51, 68, 85, 102, 119}
47         _SignatureScheme_index_9 = [...]uint8{0, 13, 26, 39, 46}
48 )
49
50 func (i SignatureScheme) String() string {
51         switch {
52         case i == 513:
53                 return _SignatureScheme_name_0
54         case i == 515:
55                 return _SignatureScheme_name_1
56         case i == 1025:
57                 return _SignatureScheme_name_2
58         case i == 1027:
59                 return _SignatureScheme_name_3
60         case i == 1281:
61                 return _SignatureScheme_name_4
62         case i == 1283:
63                 return _SignatureScheme_name_5
64         case i == 1537:
65                 return _SignatureScheme_name_6
66         case i == 1539:
67                 return _SignatureScheme_name_7
68         case 1801 <= i && i <= 1807:
69                 i -= 1801
70                 return _SignatureScheme_name_8[_SignatureScheme_index_8[i]:_SignatureScheme_index_8[i+1]]
71         case 2052 <= i && i <= 2055:
72                 i -= 2052
73                 return _SignatureScheme_name_9[_SignatureScheme_index_9[i]:_SignatureScheme_index_9[i+1]]
74         default:
75                 return "SignatureScheme(" + strconv.FormatInt(int64(i), 10) + ")"
76         }
77 }
78 func _() {
79         // An "invalid array index" compiler error signifies that the constant values have changed.
80         // Re-run the stringer command to generate them again.
81         var x [1]struct{}
82         _ = x[CurveP256-23]
83         _ = x[CurveP384-24]
84         _ = x[CurveP521-25]
85         _ = x[X25519-29]
86         _ = x[GOSTCurve256A-34]
87         _ = x[GOSTCurve256B-35]
88         _ = x[GOSTCurve256C-36]
89         _ = x[GOSTCurve256D-37]
90         _ = x[GOSTCurve512A-38]
91         _ = x[GOSTCurve512B-39]
92         _ = x[GOSTCurve512C-40]
93 }
94
95 const (
96         _CurveID_name_0 = "CurveP256CurveP384CurveP521"
97         _CurveID_name_1 = "X25519"
98         _CurveID_name_2 = "GOSTCurve256AGOSTCurve256BGOSTCurve256CGOSTCurve256DGOSTCurve512AGOSTCurve512BGOSTCurve512C"
99 )
100
101 var (
102         _CurveID_index_0 = [...]uint8{0, 9, 18, 27}
103         _CurveID_index_2 = [...]uint8{0, 13, 26, 39, 52, 65, 78, 91}
104 )
105
106 func (i CurveID) String() string {
107         switch {
108         case 23 <= i && i <= 25:
109                 i -= 23
110                 return _CurveID_name_0[_CurveID_index_0[i]:_CurveID_index_0[i+1]]
111         case i == 29:
112                 return _CurveID_name_1
113         case 34 <= i && i <= 40:
114                 i -= 34
115                 return _CurveID_name_2[_CurveID_index_2[i]:_CurveID_index_2[i+1]]
116         default:
117                 return "CurveID(" + strconv.FormatInt(int64(i), 10) + ")"
118         }
119 }
120 func _() {
121         // An "invalid array index" compiler error signifies that the constant values have changed.
122         // Re-run the stringer command to generate them again.
123         var x [1]struct{}
124         _ = x[NoClientCert-0]
125         _ = x[RequestClientCert-1]
126         _ = x[RequireAnyClientCert-2]
127         _ = x[VerifyClientCertIfGiven-3]
128         _ = x[RequireAndVerifyClientCert-4]
129 }
130
131 const _ClientAuthType_name = "NoClientCertRequestClientCertRequireAnyClientCertVerifyClientCertIfGivenRequireAndVerifyClientCert"
132
133 var _ClientAuthType_index = [...]uint8{0, 12, 29, 49, 72, 98}
134
135 func (i ClientAuthType) String() string {
136         if i < 0 || i >= ClientAuthType(len(_ClientAuthType_index)-1) {
137                 return "ClientAuthType(" + strconv.FormatInt(int64(i), 10) + ")"
138         }
139         return _ClientAuthType_name[_ClientAuthType_index[i]:_ClientAuthType_index[i+1]]
140 }