Skip to content

Commit

Permalink
use tls ciphers
Browse files Browse the repository at this point in the history
  • Loading branch information
kofoworola committed Jan 30, 2025
1 parent 359f3ff commit bd06228
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gateway/cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type APIAllCertificateBasics struct {
Certs []*certs.CertificateBasics `json:"certs"`
}

// Deprecated: use tls.CipherSuites() now
var cipherSuites = map[string]uint16{
"TLS_RSA_WITH_RC4_128_SHA": 0x0005,
"TLS_RSA_WITH_3DES_EDE_CBC_SHA": 0x000a,
Expand Down Expand Up @@ -581,10 +582,10 @@ func (gw *Gateway) certHandler(w http.ResponseWriter, r *http.Request) {
}

func getCipherAliases(ciphers []string) (cipherCodes []uint16) {
for k, v := range cipherSuites {
for _, v := range tls.CipherSuites() {
for _, str := range ciphers {
if str == k {
cipherCodes = append(cipherCodes, v)
if str == v.Name {
cipherCodes = append(cipherCodes, v.ID)
}
}
}
Expand Down

0 comments on commit bd06228

Please sign in to comment.