Skip to content

Connecting to cloud instance with TLS without wallet dir? (One way TLS) #369

Closed Answered by victorien-a
victorien-a asked this question in Q&A
Discussion options

You must be logged in to vote

Fixed it,

I needed to modify the negociate function (session.go)


// negotiate it is a step in SSL communication in which tcp connection is
// used to create sslConn object
func (session *Session) negotiate() {
	connOption := session.Context.ConnOption
	if session.SSL.roots == nil && len(session.SSL.Certificates) > 0 {
		session.SSL.roots = x509.NewCertPool()
		for _, cert := range session.SSL.Certificates {
			session.SSL.roots.AddCert(cert)
		}
	}
	host := connOption.GetActiveServer(false)
	config := &tls.Config{
		ServerName: host.Addr,
	}

	if len(session.SSL.tlsCertificates) > 0 {
		config.Certificates = session.SSL.tlsCertificates
	}

	if session.SSL.roots != nil {
		config.RootCAs …

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by victorien-a
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant