From 7c2be2084b8d04d93cd1c8d3f17381ebf6a689ac Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 7 Feb 2024 10:42:12 +0300 Subject: [PATCH] Autogenerated TLS-related strings go install golang.org/x/tools/cmd/stringer@latest cd src/crypto/tls ; go generate --- src/crypto/tls/common_string.go | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/crypto/tls/common_string.go b/src/crypto/tls/common_string.go index 238108811f..2dfe163154 100644 --- a/src/crypto/tls/common_string.go +++ b/src/crypto/tls/common_string.go @@ -20,6 +20,13 @@ func _() { _ = x[Ed25519-2055] _ = x[PKCS1WithSHA1-513] _ = x[ECDSAWithSHA1-515] + _ = x[GOSTR34102012256A-1801] + _ = x[GOSTR34102012256B-1802] + _ = x[GOSTR34102012256C-1803] + _ = x[GOSTR34102012256D-1804] + _ = x[GOSTR34102012512A-1805] + _ = x[GOSTR34102012512B-1806] + _ = x[GOSTR34102012512C-1807] } const ( @@ -31,11 +38,13 @@ const ( _SignatureScheme_name_5 = "ECDSAWithP384AndSHA384" _SignatureScheme_name_6 = "PKCS1WithSHA512" _SignatureScheme_name_7 = "ECDSAWithP521AndSHA512" - _SignatureScheme_name_8 = "PSSWithSHA256PSSWithSHA384PSSWithSHA512Ed25519" + _SignatureScheme_name_8 = "GOSTR34102012256AGOSTR34102012256BGOSTR34102012256CGOSTR34102012256DGOSTR34102012512AGOSTR34102012512BGOSTR34102012512C" + _SignatureScheme_name_9 = "PSSWithSHA256PSSWithSHA384PSSWithSHA512Ed25519" ) var ( - _SignatureScheme_index_8 = [...]uint8{0, 13, 26, 39, 46} + _SignatureScheme_index_8 = [...]uint8{0, 17, 34, 51, 68, 85, 102, 119} + _SignatureScheme_index_9 = [...]uint8{0, 13, 26, 39, 46} ) func (i SignatureScheme) String() string { @@ -56,9 +65,12 @@ func (i SignatureScheme) String() string { return _SignatureScheme_name_6 case i == 1539: return _SignatureScheme_name_7 + case 1801 <= i && i <= 1807: + i -= 1801 + return _SignatureScheme_name_8[_SignatureScheme_index_8[i]:_SignatureScheme_index_8[i+1]] case 2052 <= i && i <= 2055: i -= 2052 - return _SignatureScheme_name_8[_SignatureScheme_index_8[i]:_SignatureScheme_index_8[i+1]] + return _SignatureScheme_name_9[_SignatureScheme_index_9[i]:_SignatureScheme_index_9[i+1]] default: return "SignatureScheme(" + strconv.FormatInt(int64(i), 10) + ")" } @@ -71,15 +83,24 @@ func _() { _ = x[CurveP384-24] _ = x[CurveP521-25] _ = x[X25519-29] + _ = x[GOSTCurve256A-34] + _ = x[GOSTCurve256B-35] + _ = x[GOSTCurve256C-36] + _ = x[GOSTCurve256D-37] + _ = x[GOSTCurve512A-38] + _ = x[GOSTCurve512B-39] + _ = x[GOSTCurve512C-40] } const ( _CurveID_name_0 = "CurveP256CurveP384CurveP521" _CurveID_name_1 = "X25519" + _CurveID_name_2 = "GOSTCurve256AGOSTCurve256BGOSTCurve256CGOSTCurve256DGOSTCurve512AGOSTCurve512BGOSTCurve512C" ) var ( _CurveID_index_0 = [...]uint8{0, 9, 18, 27} + _CurveID_index_2 = [...]uint8{0, 13, 26, 39, 52, 65, 78, 91} ) func (i CurveID) String() string { @@ -89,6 +110,9 @@ func (i CurveID) String() string { return _CurveID_name_0[_CurveID_index_0[i]:_CurveID_index_0[i+1]] case i == 29: return _CurveID_name_1 + case 34 <= i && i <= 40: + i -= 34 + return _CurveID_name_2[_CurveID_index_2[i]:_CurveID_index_2[i+1]] default: return "CurveID(" + strconv.FormatInt(int64(i), 10) + ")" } -- 2.44.0