Hi
This is not an issue. U are using a non-blocking socket and thus u
need to have a select call and put this socket on readable list and
call SSL_read whenever this sockets becomes readable..
Other way round, make ur socket fd non-blocking (ioctl call) and than
it will return after the connectio
Krishna M Singh schrieb:
> Hi
>
> This is not an issue. U are using a non-blocking socket and thus u
> need to have a select call and put this socket on readable list and
> call SSL_read whenever this sockets becomes readable..
> Other way round, make ur socket fd non-blocking (ioctl call) and tha
> Krishna M Singh schrieb:
> > Hi
> >
> > This is not an issue. U are using a non-blocking socket and thus u
> > need to have a select call and put this socket on readable list and
> > call SSL_read whenever this sockets becomes readable..
> > Other way round, make ur socket fd non-blocking (ioct
David Schwartz schrieb:
> So call it after. This is not an "error" but an indication, similar to
> EWOULDBLOCK. It is telling you that the operation cannot complete without
> blocking and you asked it not to block, so it can't complete now.
When I then call SSL_read I will get the same error
Hi
You need to call SSL_Connect (if client) or SSL_accept( if server) and
not the SSL_read.. SSL_Connection or ssl_accept internally performs
that..
If u do SSL_read before SSL handshake completion, the SSL connection
can't be established..
HTH
-Krishna
On 8/13/06, Frank Büttner <[EMAIL PROTEC
Krishna M Singh schrieb:
> Hi
>
> You need to call SSL_Connect (if client) or SSL_accept( if server) and
> not the SSL_read.. SSL_Connection or ssl_accept internally performs
> that..
>
> If u do SSL_read before SSL handshake completion, the SSL connection
> can't be established..
>
> HTH
> -Kri
Hi
In non-blocking mode, for client we call
SSL_connect
In case SSL_connect returns -1 with SSL_ERROR_WANT_READ u need to wait
in Select and once the sock fd is readable, u again need to all
SSL_connect till the SSL_connect returns success or some other error
code (except read or write wait)..
Krishna M Singh schrieb:
> Hi
>
> In non-blocking mode, for client we call
> SSL_connect
>
> In case SSL_connect returns -1 with SSL_ERROR_WANT_READ u need to wait
> in Select and once the sock fd is readable, u again need to all
> SSL_connect till the SSL_connect returns success or some other er
Here are the steps in brief
a) make a socket fd non-blocking and link with a ssl object.
b) Call SSL_connect and this returns wait for read.
c) Place this socket fd in the select call redable list.
d) Whenever select call indicates this socket is readable again call
SSL_connect until this call re
> Here are the steps in brief
>
> a) make a socket fd non-blocking and link with a ssl object.
> b) Call SSL_connect and this returns wait for read.
> c) Place this socket fd in the select call redable list.
> d) Whenever select call indicates this socket is readable again call
> SSL_connect until
Hi,
It's easy enough to write "wrapper" functions for SSL_read/write/
accept/connect etc. that work with blocking or non-blocking sockets.
That's what I did.
Regards, Mark.
__
OpenSSL Project htt
Non blocking is not possible because Qt returns only an non blocking fd.
What do you mean with the select() function. In the openSSL doc I can't
found something like that.
smime.p7s
Description: S/MIME Cryptographic Signature
Hi,
On 8/16/06, David Schwartz <[EMAIL PROTECTED]> wrote:
[...] The SSL engine may have already read the data and your
'select' may block forever. You should only wait for 'select' to give you
read hit before calling SSL_read if your last SSL operation returned a
WANT_READ indication.
Accord
Frank Büttner wrote:
Non blocking is not possible because Qt returns only an non blocking fd.
What is the problem?
What do you mean with the select() function. In the openSSL doc I can't
found something like that.
select
Richard Koenning schrieb:
> Frank Büttner wrote:
>
>> Non blocking is not possible because Qt returns only an non blocking fd.
>
> What is the problem?
>
>> What do you mean with the select() function. In the openSSL doc I can
> The only signals that I have is readyRead() (emit when I can read data
> form socked) and bytesWritten() (emit when data was written to the
> socked). I seen that OpenSSL will only have data for read when an Record
> was complete transmitted. How can I find out the size of an Record?
> Then I ca
> Hi,
> On 8/16/06, David Schwartz <[EMAIL PROTECTED]> wrote:
> > [...] The SSL engine may have already read the data and your
> > 'select' may block forever. You should only wait for 'select'
> to give you
> > read hit before calling SSL_read if your last SSL operation returned a
> > WANT_READ
David Schwartz schrieb:
>> The only signals that I have is readyRead() (emit when I can read data
>> form socked) and bytesWritten() (emit when data was written to the
>> socked). I seen that OpenSSL will only have data for read when an Record
>> was complete transmitted. How can I find out the siz
> David Schwartz schrieb:
> >> The only signals that I have is readyRead() (emit when I can read data
> >> form socked) and bytesWritten() (emit when data was written to the
> >> socked). I seen that OpenSSL will only have data for read when
> >> an Record
> >> was complete transmitted. How can I
Hi
I haven't ever used BIO.. One more thing, after calling SSL_read we
need to call SSL_pending also to make nothing is buffered.. In case
SSL_pending returns non-zero than we can iteractively call the
SSL_read again until it returns SSL_WANT_read or Write..
Whatvever it returns, based on that w
Krishna M Singh schrieb:
> Hi
>
> I haven't ever used BIO.. One more thing, after calling SSL_read we
> need to call SSL_pending also to make nothing is buffered.. In case
> SSL_pending returns non-zero than we can iteractively call the
> SSL_read again until it returns SSL_WANT_read or Write..
>
Not sure whether it failed with bio.. But for non-blocking sockets u
must use the select call else it would be too complex to handle the
sockets.. Have u tried that..?
On 8/18/06, Frank Büttner <[EMAIL PROTECTED]> wrote:
Krishna M Singh schrieb:
> Hi
>
> I haven't ever used BIO.. One more thing
Krishna M Singh schrieb:
> Not sure whether it failed with bio.. But for non-blocking sockets u
> must use the select call else it would be too complex to handle the
> sockets.. Have u tried that..?
>
>
I can't use the select() call, because I only have an fd for the socket.
But no direct connect
Hi Frank
Don't know anything about Qt socket system but I feel there must be
some other API in place of select in that. Non-blocking sockets cant'
be handled without select easily and efficiently..
Its very crude way but u can sort of implement select functionality like this..
a) timeout = 100 m
Krishna M Singh schrieb:
> Hi Frank
>
> Don't know anything about Qt socket system but I feel there must be
> some other API in place of select in that. Non-blocking sockets cant'
> be handled without select easily and efficiently..
> Its very crude way but u can sort of implement select functiona
Frank Büttner wrote:
So I found out that SSL don't take teh data from the socket:(
The Qt buffer will grow and grow, but SSL don't read the data:(
It seems to me that you have an architecture problem. As i understand your
descriptions you have OpenSSL and Qt accessing a socket in *parallel*,
> So I found out that SSL don't take teh data from the socket:(
> The Qt buffer will grow and grow, but SSL don't read the data:(
If you use bio pairs, SSL doesn't have to touch the network at all ever. You
can read and write data to and from the network and to and from OpenSSL.
This is probably
David Schwartz schrieb:
>> So I found out that SSL don't take teh data from the socket:(
>> The Qt buffer will grow and grow, but SSL don't read the data:(
>
> If you use bio pairs, SSL doesn't have to touch the network at all ever. You
> can read and write data to and from the network and to and
Richard Koenning schrieb:
> Frank Büttner wrote:
>
>> So I found out that SSL don't take teh data from the socket:(
>> The Qt buffer will grow and grow, but SSL don't read the data:(
>
> It seems to me that you have an architecture problem. As i understand
> your descriptions you have OpenSSL and
Hello,
> >> So I found out that SSL don't take teh data from the socket:(
> >> The Qt buffer will grow and grow, but SSL don't read the data:(
> >
> > It seems to me that you have an architecture problem. As i understand
> > your descriptions you have OpenSSL and Qt accessing a socket in
> > *para
Hello,
> > >> So I found out that SSL don't take teh data from the socket:(
> > >> The Qt buffer will grow and grow, but SSL don't read the data:(
> > >
> > > It seems to me that you have an architecture problem. As i understand
> > > your descriptions you have OpenSSL and Qt accessing a socket in
> I have try this, but it fails, because the is no way to find out when
> the write buffer BIO has data that must send. I have try it with the
> callback function. But this will not work, because the function must be
> static. And than I can not acces the network object form Qt.:(
I can't
David Schwartz schrieb:
>> I have try this, but it fails, because the is no way to find out when
>> the write buffer BIO has data that must send. I have try it with the
>> callback function. But this will not work, because the function must be
>> static. And than I can not acces the network object
Now it will work better.
The problem was to that all must be event trigger.
Thanks a lot. Next I must add some error handling:)
Frank
smime.p7s
Description: S/MIME Cryptographic Signature
34 matches
Mail list logo