| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
That type is not guaranteed to preserve anything useful at all. Instead,
try to either preserve a more specific type, or use std::runtime_error
which at least has a guaranteed message.
|
|
|
|
|
| |
This makes things more consistent since we mix with the standard library
exceptions so often.
|
|
|
|
|
| |
Make sure our exceptions are part of the standard exception class
hierarchy.
|
|
|
|
| |
Harmonize with the standard C++ exceptions.
|
|
|
|
|
|
| |
The behaviour is not consistent as Windows doesn't use errno for socket
errors, but Unix systems do. Always use the same exception to keep
things somewhat sane.
|
|
|
|
|
| |
It's more readable than 0, and a bit safer than NULL, so let's try to
follow modern norms.
|
|
|
|
|
| |
These will always be byte streams at heart, so let's try to keep them
with a proper type. Should make it clearer how they will be used.
|
|
|
|
|
| |
Avoid having our own custom stuff and instead use the modern, standard
types, for familiarity.
|
|
|
|
|
| |
Allow subclasses to call it, instead of it being strictly internal. This
is useful when a subclass can only provide data in minimum sized chunks.
|
|
|
|
|
|
| |
Unfortunately this error can be given by GnuTLS even though the
underlying stream still has data available. So stop trusting this value
and keep track of the underlying stream explicitly.
|
|
|
|
|
| |
Gives us a more meaningful error rather than just "Error in push/pull
function".
|
|
|
|
|
|
|
| |
Having this early check means that we somewhat randomly get different
exception behaviours on errors in deeper layers as some exceptions are
allowed to propagate unhindered and some are not (since they are thrown
in the pull function).
|
|
|
|
|
| |
Give GnuTLS the correct errno from deeper layers, in the cases where we
know it. In most cases GnuTLS doesn't care, but just in case...
|
|
|
|
|
|
|
|
|
|
| |
Major restructuring of how streams work. Neither input nor output
streams are now blocking. This avoids stalling the rest of the client or
server when a peer is slow or unresponsive.
Note that this puts an extra burden on users of streams to make sure
they are allowed to do their work once the underlying transports are
ready (e.g. monitoring fds).
|
| |
|
|
|
|
|
| |
Just have a simply number of bytes argument to avoid a lot of
complexity.
|
|
|
|
|
| |
Most streams are backed by a memory buffer. Create common base classes
for this functionality to avoid code duplication.
|
|
|
|
|
| |
Makes it more readable to write code that needs to know how much
data/space is available in a stream.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We use a lot of lengths given to us over the network, so be more
paranoid about them causing an overflow as otherwise an attacker
might trick us in to overwriting other memory.
This primarily affects the client which often gets lengths from the
server, but there are also some scenarios where the server might
theoretically be vulnerable.
Issue found by Pavel Cheremushkin from Kaspersky Lab.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Provides safety against them accidentally becoming negative because
of bugs in the calculations.
Also does the same to CharArray and friends as they were strongly
connection to the stream objects.
|
|/
|
|
|
|
| |
There might be more bytes left in the current TLS record, even if
there is nothing on the underlying stream. Make sure we properly
return this when we aren't being requested to block.
|
|\
| |
| |
| |
| |
| | |
Conflicts:
contrib/packages/rpm/el5/SPECS/tigervnc.spec
vncviewer/Viewport.cxx
|
| |
| |
| |
| |
| |
| | |
This allows us to simplify things by getting rid of some old
compatibility code. People should really be using current versions
of GnuTLS anyway to stay secure.
|
|/
|
|
|
| |
Either by casting, or switching to a more appropriate type
for the variable.
|
|
|
|
|
|
|
|
| |
gnutls_transport_set_errno(). Make sure we call the right errno function
depending on which GnuTLS we're using.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4922 3789f03b-4d11-0410-bbf8-ca57d06f2519
|
|
|
|
|
|
|
| |
containing stream object. This is in preparation for supporting GnuTLS 3.x.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4921 3789f03b-4d11-0410-bbf8-ca57d06f2519
|
|
|
|
|
|
| |
building statically using build-xorg
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4147 3789f03b-4d11-0410-bbf8-ca57d06f2519
|
|
|
|
|
|
|
| |
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4125 3789f03b-4d11-0410-bbf8-ca57d06f2519
|
|
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4044 3789f03b-4d11-0410-bbf8-ca57d06f2519
|