From ed21481ca14d1b1b940aa963c9c8ee01b2364da1 Mon Sep 17 00:00:00 2001 From: Chelsea Holland Komlo Date: Mon, 13 Aug 2018 16:11:49 -0400 Subject: [PATCH] rename signature algorithm type per code review feedback --- helper/tlsutil/config.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/helper/tlsutil/config.go b/helper/tlsutil/config.go index 9d6eb8153..5d9b6da89 100644 --- a/helper/tlsutil/config.go +++ b/helper/tlsutil/config.go @@ -43,17 +43,17 @@ var supportedTLSCiphers = map[string]uint16{ "TLS_RSA_WITH_AES_256_CBC_SHA": tls.TLS_RSA_WITH_AES_256_CBC_SHA, } -// algorithmStringRepr is the string representation of a signing algorithm -type algorithmStringRepr string +// signatureAlgorithm is the string representation of a signing algorithm +type signatureAlgorithm string const ( - rsaStringRepr algorithmStringRepr = "RSA" - ecdsaStringRepr algorithmStringRepr = "ECDSA" + rsaStringRepr signatureAlgorithm = "RSA" + ecdsaStringRepr signatureAlgorithm = "ECDSA" ) // supportedCipherSignatures is the supported cipher suites with their // corresponding signature algorithm -var supportedCipherSignatures = map[string]algorithmStringRepr{ +var supportedCipherSignatures = map[string]signatureAlgorithm{ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305": rsaStringRepr, "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305": ecdsaStringRepr, "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256": rsaStringRepr, @@ -475,7 +475,7 @@ func ParseCiphers(tlsConfig *config.TLSConfig) ([]uint16, error) { // This is determined by examining the type of the certificate's public key, // as Golang doesn't expose a more straightforward API which returns this // type -func getSignatureAlgorithm(tlsCert *tls.Certificate) (algorithmStringRepr, error) { +func getSignatureAlgorithm(tlsCert *tls.Certificate) (signatureAlgorithm, error) { privKey := tlsCert.PrivateKey switch privKey.(type) { case *rsa.PrivateKey: