<div dir="ltr">I'm not 100% sure what you're doing<div>I'd imagine that if SSL was managing the fd's you wouldn't have this issue.</div><div>You hvae to call accept() to get a new FD... and you'll only get that once, so when you accept() you should attach the bio and call ssl_accept(), no?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 12, 2018 at 5:52 PM, Priscilla Hero <span dir="ltr"><<a href="mailto:grace.priscilla@gmail.com" target="_blank">grace.priscilla@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Hi Michael,<br>
Without doing ssl_accept on the ssl will getpeername work? Also using the existing ssl with ssl_accept for the first connection we don’t get the information of second peer. Thus we ended up creating new bio/ssl each time we get a request.<br>
<br>
Any suggestions?<br>
<br>
Thanks,<br>
Grace<br>
<div class="HOEnZb"><div class="h5"><br>
On 12-Jan-2018, at 6:45 PM, Michael Wojcik <<a href="mailto:Michael.Wojcik@microfocus.com">Michael.Wojcik@microfocus.com</a><wbr>> wrote:<br>
<br>
>> From: openssl-users [mailto:<a href="mailto:openssl-users-bounces@openssl.org">openssl-users-bounces@<wbr>openssl.org</a>] On Behalf Of Grace Priscilla Jero<br>
>> Sent: Friday, January 12, 2018 07:04<br>
><br>
><br>
>> Whenever a connect is initiated from any client we need to know if it is already connected client or a new client.<br>
>> We are doing this by<br>
>> • creating bio/ssl each time a polling happens on the server fd<br>
>> • fetching the peer using BIO_dgram_get_peer after ssl_accept<br>
>> • Comparing it to the internally maintained list of peer<br>
><br>
> Don't create the BIO immediately. Use getpeername on the socket descriptor and check that against the list. Only create a new SSL object and BIO if it's not an already-established client.<br>
><br>
> --<br>
> Michael Wojcik<br>
> Distinguished Engineer, Micro Focus<br>
><br>
><br>
> --<br>
> openssl-users mailing list<br>
> To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" rel="noreferrer" target="_blank">https://mta.openssl.org/<wbr>mailman/listinfo/openssl-users</a><br>
--<br>
openssl-users mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" rel="noreferrer" target="_blank">https://mta.openssl.org/<wbr>mailman/listinfo/openssl-users</a><br>
</div></div></blockquote></div><br></div>