@ VisibleForTesting static String canonicalizeHost ( String host ) { if ( host . startsWith ( "[" ) && host . endsWith ( "]" ) ) { return host . substring ( 1 , host . length ( ) - 1 ) ; } return host ; }
Converts a host from URI to X509 format .