Source file src/crypto/tls/common_string.go

     1  // Code generated by "stringer -linecomment -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  }
    24  
    25  const (
    26  	_SignatureScheme_name_0 = "PKCS1WithSHA1"
    27  	_SignatureScheme_name_1 = "ECDSAWithSHA1"
    28  	_SignatureScheme_name_2 = "PKCS1WithSHA256"
    29  	_SignatureScheme_name_3 = "ECDSAWithP256AndSHA256"
    30  	_SignatureScheme_name_4 = "PKCS1WithSHA384"
    31  	_SignatureScheme_name_5 = "ECDSAWithP384AndSHA384"
    32  	_SignatureScheme_name_6 = "PKCS1WithSHA512"
    33  	_SignatureScheme_name_7 = "ECDSAWithP521AndSHA512"
    34  	_SignatureScheme_name_8 = "PSSWithSHA256PSSWithSHA384PSSWithSHA512Ed25519"
    35  )
    36  
    37  var (
    38  	_SignatureScheme_index_8 = [...]uint8{0, 13, 26, 39, 46}
    39  )
    40  
    41  func (i SignatureScheme) String() string {
    42  	switch {
    43  	case i == 513:
    44  		return _SignatureScheme_name_0
    45  	case i == 515:
    46  		return _SignatureScheme_name_1
    47  	case i == 1025:
    48  		return _SignatureScheme_name_2
    49  	case i == 1027:
    50  		return _SignatureScheme_name_3
    51  	case i == 1281:
    52  		return _SignatureScheme_name_4
    53  	case i == 1283:
    54  		return _SignatureScheme_name_5
    55  	case i == 1537:
    56  		return _SignatureScheme_name_6
    57  	case i == 1539:
    58  		return _SignatureScheme_name_7
    59  	case 2052 <= i && i <= 2055:
    60  		i -= 2052
    61  		return _SignatureScheme_name_8[_SignatureScheme_index_8[i]:_SignatureScheme_index_8[i+1]]
    62  	default:
    63  		return "SignatureScheme(" + strconv.FormatInt(int64(i), 10) + ")"
    64  	}
    65  }
    66  func _() {
    67  	// An "invalid array index" compiler error signifies that the constant values have changed.
    68  	// Re-run the stringer command to generate them again.
    69  	var x [1]struct{}
    70  	_ = x[CurveP256-23]
    71  	_ = x[CurveP384-24]
    72  	_ = x[CurveP521-25]
    73  	_ = x[X25519-29]
    74  	_ = x[x25519Kyber768Draft00-25497]
    75  }
    76  
    77  const (
    78  	_CurveID_name_0 = "CurveP256CurveP384CurveP521"
    79  	_CurveID_name_1 = "X25519"
    80  	_CurveID_name_2 = "X25519Kyber768Draft00"
    81  )
    82  
    83  var (
    84  	_CurveID_index_0 = [...]uint8{0, 9, 18, 27}
    85  )
    86  
    87  func (i CurveID) String() string {
    88  	switch {
    89  	case 23 <= i && i <= 25:
    90  		i -= 23
    91  		return _CurveID_name_0[_CurveID_index_0[i]:_CurveID_index_0[i+1]]
    92  	case i == 29:
    93  		return _CurveID_name_1
    94  	case i == 25497:
    95  		return _CurveID_name_2
    96  	default:
    97  		return "CurveID(" + strconv.FormatInt(int64(i), 10) + ")"
    98  	}
    99  }
   100  func _() {
   101  	// An "invalid array index" compiler error signifies that the constant values have changed.
   102  	// Re-run the stringer command to generate them again.
   103  	var x [1]struct{}
   104  	_ = x[NoClientCert-0]
   105  	_ = x[RequestClientCert-1]
   106  	_ = x[RequireAnyClientCert-2]
   107  	_ = x[VerifyClientCertIfGiven-3]
   108  	_ = x[RequireAndVerifyClientCert-4]
   109  }
   110  
   111  const _ClientAuthType_name = "NoClientCertRequestClientCertRequireAnyClientCertVerifyClientCertIfGivenRequireAndVerifyClientCert"
   112  
   113  var _ClientAuthType_index = [...]uint8{0, 12, 29, 49, 72, 98}
   114  
   115  func (i ClientAuthType) String() string {
   116  	if i < 0 || i >= ClientAuthType(len(_ClientAuthType_index)-1) {
   117  		return "ClientAuthType(" + strconv.FormatInt(int64(i), 10) + ")"
   118  	}
   119  	return _ClientAuthType_name[_ClientAuthType_index[i]:_ClientAuthType_index[i+1]]
   120  }
   121  

View as plain text