You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(client) Is it possible to cache provided certificates certs := make([]*x509.Certificate, len(certificates)) across different connections to the same server ?
// verifyServerCertificate parses and verifies the provided chain, setting// c.verifiedChains and c.peerCertificates or sending the appropriate alert.func (c*Conn) verifyServerCertificate(certificates [][]byte) error {
certs:=make([]*x509.Certificate, len(certificates))
fori, asn1Data:=rangecertificates {
cert, err:=x509.ParseCertificate(asn1Data)
iferr!=nil {
c.sendAlert(alertBadCertificate)
returnerrors.New("tls: failed to parse certificate from server: "+err.Error())
}
certs[i] =cert
}
The text was updated successfully, but these errors were encountered:
Looks like I am not the first with this thing
I just emptied connection PeerCertificates and VerifiedChains with nils after connection and it's good to go -20% in-use memory!
(client) Is it possible to cache provided certificates
certs := make([]*x509.Certificate, len(certificates))
across different connections to the same server ?The text was updated successfully, but these errors were encountered: