beego 中tls 版本的1.0 怎么提升到1.2 甚至是1.3

我有用beego 开启https , 但是web安全扫描得出的结果tls 版本为1.0 , 怎么设置才能让tls版本提升到1.2 甚至是1.3 呢,

已邀请:

astaxie - 创造、获取、分享、传播和应用Go

赞同来自:

你的Go版本是多少?

astaxie - 创造、获取、分享、传播和应用Go

赞同来自:

tlsConfig := &tls.Config{
    // Reject any TLS certificate that cannot be validated
    ClientAuth: tls.RequireAndVerifyClientCert,
    // Ensure that we only use our "CA" to validate certificates
    ClientCAs: clientCertPool,
    // PFS because we can but this will reject client with RSA certificates
    CipherSuites: []uint16{tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384},
    // Force it server side
    PreferServerCipherSuites: true,
    // TLS 1.2 because we can
    MinVersion: tls.VersionTLS12,
}

tlsConfig.BuildNameToCertificate()

beego.BeeApp.Server.TLSConfig = tlsConfig 

要回复问题请先登录注册