The problem is that after doing this:
SSL* ssl;
ssl = SSL_new(ctx);
SSL_set_fd(ssl, sock);
int err = SSL_accept(ssl);
I can't get acces to client's socket 'sock', so I neither can get acces to client's IP. Is there anyway I can get it from SSL structure? Couldn't find that at docs.
Thanks.
There is no information about IP in the SSL structure and you can use SSL even without any IP address. You will find the necessary information with getpeername
on the socket itself. In case you need to get the socket for the SSL object use SSL_get_fd
.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments