<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F4E79;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F497D">Any help would be much appreciated.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F497D">What I want to know is whether SSL_get_fd() can be used to get fd which in turn can be used with getpeername() to know the other host communicating.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F497D">Thanks in advance,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F497D">Chethan Kumar<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> openssl-users [mailto:openssl-users-bounces@openssl.org]
<b>On Behalf Of </b>Chethan Kumar<br>
<b>Sent:</b> Wednesday, July 17, 2019 9:17 PM<br>
<b>To:</b> openssl-users@openssl.org<br>
<b>Cc:</b> chethu.kumar88@gmail.com<br>
<b>Subject:</b> SSL_get_fd<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F4E79">Hi all,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F4E79"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F4E79">Need an help.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F4E79">I am trying to print IP address of destination host by doing getpeername() on fd got using SSL_get_fd() in both SSL_accept() and SSL_connect().<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F4E79">Doing SSL_get_fd() fails in SSL_accept() with return value as -1 but its working in SSL_connect().<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F4E79"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F4E79">Can you please help me out in knowing what is the issue.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F4E79"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F4E79">Thanks in advance,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F4E79"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F4E79">With Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#1F4E79">Chethan Kumar<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p><span style="font-size:7.0pt">The information contained in this e-mail message and in any attachments/annexure/appendices is confidential to the
<br>
recipient and may contain privileged information. If you are not the intended recipient, please notify the<br>
sender and delete the message along with any attachments/annexure/appendices. You should not disclose,<br>
copy or otherwise use the information contained in the message or any annexure. Any views expressed in this e-mail
<br>
are those of the individual sender except where the sender specifically states them to be the views of 
<br>
Toshiba Software India Pvt. Ltd. (TSIP),Bangalore.<br>
Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no
 responsibility is accepted by Toshiba Software India Pvt. Ltd, for any loss or damage arising in any way from its use.</span><o:p></o:p></p>
</div>
<P><font style="FONT-FAMILY: ; FONT-SIZE: 11px"><font style="FONT-FAMILY: Times New Roman; FONT-SIZE: 9px">The information contained in this e-mail message and in any attachments/annexure/appendices is confidential to the <br>recipient and may contain privileged information. If you are not the intended recipient, please notify the<br>sender and delete the message along with any attachments/annexure/appendices. You should not disclose,<br>copy or otherwise use the information contained in the message or any annexure. Any views expressed in this e-mail <br>are those of the individual sender except where the sender specifically states them to be the views of  <br>Toshiba Software India Pvt. Ltd. (TSIP),Bangalore.<br></font></font><font style="FONT-FAMILY: Times New Roman; FONT-SIZE: 9px">Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by Toshiba Software India Pvt. Ltd, for any loss or damage arising in any way from its use.</font></P>
<P><font style="FONT-FAMILY: Times New Roman; FONT-SIZE: 9px"></font></P></body>
</html>