IBR-DTNSuite  0.10
ibrcommon::iostreamBIO Class Reference

This class is a wrapper for iostreams to the OpenSSL Input Output abstraction Layer (called BIO) More...

#include <iostreamBIO.h>

Collaboration diagram for ibrcommon::iostreamBIO:
Collaboration graph

Classes

class  BIOException
 A Exception that is thrown on BIO related errors. More...
 

Public Member Functions

 iostreamBIO (iostream *stream)
 Creates a new iostreamBIO from a given iostream. More...
 
BIO * getBIO ()
 get the internal BIO pointer More...
 

Static Public Attributes

static const char *const name = "iostreamBIO"
 the name that will be included in the BIO_METHOD->name field More...
 
static const int type = BIO_TYPE_SOURCE_SINK
 type in the BIO_METHOD->type field More...
 

Detailed Description

This class is a wrapper for iostreams to the OpenSSL Input Output abstraction Layer (called BIO)

Definition at line 34 of file iostreamBIO.h.

Constructor & Destructor Documentation

ibrcommon::iostreamBIO::iostreamBIO ( iostream *  stream)
explicit

Creates a new iostreamBIO from a given iostream.

Parameters
streamthe iostream to use
Warning
The iostream is not freed on destruction of this object.

Definition at line 60 of file iostreamBIO.cpp.

References ibrcommon::LogLevel::critical, IBRCOMMON_LOGGER_ENDL, and IBRCOMMON_LOGGER_TAG.

Member Function Documentation

BIO * ibrcommon::iostreamBIO::getBIO ( )

get the internal BIO pointer

Returns
the internal BIO (see OpenSSL documentation)
Warning
The BIO is freed on destruction of this object, dont use it afterwards (for example through an assigned SSL object or SSL_CTX)

Definition at line 78 of file iostreamBIO.cpp.

Referenced by ibrcommon::TLSStream::activate().

Member Data Documentation

const char *const ibrcommon::iostreamBIO::name = "iostreamBIO"
static

the name that will be included in the BIO_METHOD->name field

Definition at line 64 of file iostreamBIO.h.

const int ibrcommon::iostreamBIO::type = BIO_TYPE_SOURCE_SINK
static

type in the BIO_METHOD->type field

Definition at line 66 of file iostreamBIO.h.


The documentation for this class was generated from the following files: