Hi,
We are using openssl for our application servers with IPv6. It turned
out that the function BIO_set_conn_hostname() (and others may be) are
not capable to deal with an IPv6 IP addr (which contains colon signs).
We changed our code to create the socket the normal way:
/* connect to an IPv6 server */
getaddrinfo(serverIP, connport, &req, &ans);
sockFd = socket(ans->ai_family, ans->ai_socktype, ans->ai_protocol);
connect(sockFd, ans->ai_addr, ans->ai_addrlen);
and are using the created socket to bring up SSL on it with:
/* build SSL context on this socket */
ctx = SSL_CTX_new(SSLv23_client_method());
bio = BIO_new_socket(sockFd, BIO_NOCLOSE);
BIO_ctrl(bio, BIO_C_SSL_MODE, 1, 0);
ssl = SSL_new(ctx);
SSL_set_bio(ssl, bio, bio);
res = SSL_connect(ssl);
This works fine with IPv4 and IPv6.
HIH
matthias
--
Matthias Apitz | /"\ ASCII Ribbon Campaign:
E-mail:
gu...@unixarea.de | \ / - No HTML/RTF in E-mail
WWW:
http://www.unixarea.de/ | X - No proprietary attachments
phone:
+49-170-4527211 | / \ - Respect for open standards
|
en.wikipedia.org/wiki/ASCII_Ribbon_Campaign
______________________________________________________________________
OpenSSL Project
http://www.openssl.org
User Support Mailing List
openss...@openssl.org
Automated List Manager
majo...@openssl.org