net/tlsdial: add memory-optimized TLS cert verification path for iOS
Behind a build tag for now.
This commit is contained in:
@ -8,6 +8,8 @@ package tlsdial
|
||||
|
||||
import "crypto/tls"
|
||||
|
||||
var platformModifyConf func(*tls.Config)
|
||||
|
||||
// Config returns a tls.Config for dialing the given host.
|
||||
// If base is non-nil, it's cloned as the base config before
|
||||
// being configured and returned.
|
||||
@ -20,5 +22,9 @@ func Config(host string, base *tls.Config) *tls.Config {
|
||||
}
|
||||
conf.ServerName = host
|
||||
|
||||
if platformModifyConf != nil {
|
||||
platformModifyConf(conf)
|
||||
}
|
||||
|
||||
return conf
|
||||
}
|
||||
|
Reference in New Issue
Block a user