versionName is tls.VersionName in go 1.21. Until the switch, the function is copied locally.
(version uint16)
| 1986 | // versionName is tls.VersionName in go 1.21. |
| 1987 | // Until the switch, the function is copied locally. |
| 1988 | func versionName(version uint16) string { |
| 1989 | switch version { |
| 1990 | case tls.VersionSSL30: |
| 1991 | return "SSLv3" |
| 1992 | case tls.VersionTLS10: |
| 1993 | return "TLS 1.0" |
| 1994 | case tls.VersionTLS11: |
| 1995 | return "TLS 1.1" |
| 1996 | case tls.VersionTLS12: |
| 1997 | return "TLS 1.2" |
| 1998 | case tls.VersionTLS13: |
| 1999 | return "TLS 1.3" |
| 2000 | default: |
| 2001 | return fmt.Sprintf("0x%04X", version) |
| 2002 | } |
| 2003 | } |
| 2004 | |
| 2005 | func configureOIDCPKI(orig *oauth2.Config, keyFile string, certFile string) (*oauthpki.Config, error) { |
| 2006 | // Read the files |
no outgoing calls
no test coverage detected