Carl,
Thanks for your reply,
We have a Load Balancer in between the User ( desktop ) and the Server.
So, i used the getpeername and am getting only the Load Balancer IP in the
output and not the desktop IP. Is there any other way that i can use to
get the desktop IP ?
int fd = SSL_get_fd((SSL *)SockObj->SSLCtx);
struct sockaddr_in addr;
int addr_len;
addr_len = sizeof(addr);
getpeername( fd, (sockaddr *)&addr, &addr_len );
Peer Address : inet_ntoa(addr.sin_addr));
Peer port : ntohs(addr.sin_port));
Thanks & Regards
________________________
Karthikeyan Thirumal
[email protected]
Sent by: [email protected]
04/10/2012 03:24 PM
Please respond to
[email protected]
To
<[email protected]>
cc
Subject
Re: Source IP of SSL connection
>On Tue 10/04/12 10:36 AM , [email protected] sent:
>Am using OpenSSL for one of my TCP application and can someone explain
how to retrieve the source IP ( of the >machine ) from which the SSL
connection is established.
>
>Am using openssl-0.9.8a version.
>
I would say:
int fd = SSL_get_fd(const SSL *ssl);
and then
getpeername( fd, addr, &addr_len );
Carl
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [email protected]
******************************************************
This message and any files or attachments sent with this message contain
confidential information and is intended only for the individual named. If you
are not the named addressee, you should not disseminate, distribute, copy or
use any part of this email. If you have received this message in error, please
delete it and all copies from your system and notify the sender immediately by
return Email.
Email transmission cannot be guaranteed to be secure or error-free as
information can be intercepted, corrupted, lost, destroyed, late, incomplete or
may contain viruses. The sender, therefore, does not accept liability for any
errors or omissions in the contents of this message, which arise as a result of
email transmission.
******************************************************