Re: [openssl-users] Fwd: Information to detach a BIO from fd

2018-01-14 Thread Michael Wojcik
> From: openssl-users [mailto:openssl-users-boun...@openssl.org] On Behalf > Of Michael Richardson > Sent: Saturday, January 13, 2018 16:34 > > > On 12-Jan-2018, at 6:45 PM, Michael Wojcik > > wrote: > >> Don't create the BIO immediately. Use getpeername on the socket > >> descript

Re: [openssl-users] Fwd: Information to detach a BIO from fd

2018-01-13 Thread Michael Richardson
Priscilla Hero wrote: > Hi Michael, Without doing ssl_accept on the ssl will getpeername work? ssl_accept() processes the packets on the socket. getpeername() on a (Unix) socket will always work. However, getpeername() on a UDP socket won't produce anything unless the socket was connect(2)'

Re: [openssl-users] Fwd: Information to detach a BIO from fd

2018-01-13 Thread Michael Richardson
J Decker wrote: > I'm not 100% sure what you're doing I'd imagine that if SSL was > managing the fd's you wouldn't have this issue. 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()

Re: [openssl-users] Fwd: Information to detach a BIO from fd

2018-01-13 Thread J Decker
I'm not 100% sure what you're doing I'd imagine that if SSL was managing the fd's you wouldn't have this issue. 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? On Fri, Jan 12, 2018 at 5:52 PM, Pri

Re: [openssl-users] Fwd: Information to detach a BIO from fd

2018-01-12 Thread Priscilla Hero
Hi Michael, 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. Any suggestions? Thanks, Grace On 12-Jan

Re: [openssl-users] Fwd: Information to detach a BIO from fd

2018-01-12 Thread Michael Wojcik
> From: openssl-users [mailto:openssl-users-boun...@openssl.org] On Behalf Of > Grace Priscilla Jero > Sent: Friday, January 12, 2018 07:04 > Whenever a connect is initiated from any client we need to know if it is > already connected client or a new client. > We are doing this by  > • creatin

[openssl-users] Fwd: Information to detach a BIO from fd

2018-01-12 Thread Grace Priscilla Jero
Hi All, Below is our scenario on DTLS. We have multiple connections to the same server. We have mapped one fd to the ssl in the server to receive all connections. Whenever a connect is initiated from any client we need to know if it is already connected client or a new client. We are doing this