Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

WvRSAKey Class Reference

#include <wvrsa.h>

Inherits WvError.

Collaboration diagram for WvRSAKey:

[legend]
List of all members.

Detailed Description

An RSA public key or public/private key pair that can be used for encryption.

Knows how to encode/decode itself into a string of hex digits for easy transport.

See also:
WvRSAEncoder

Definition at line 25 of file wvrsa.h.

Public Member Functions

 WvRSAKey (const WvRSAKey &k)
 WvRSAKey (struct rsa_st *_rsa, bool priv)
 WvRSAKey (WvStringParm keystr, bool priv)
 WvRSAKey (int bits)
 ~WvRSAKey ()
WvString private_str () const
WvString public_str () const
virtual bool isok () const
 By default, returns true if geterr() == 0.

virtual int geterr () const
 If isok() is false, return the system error number corresponding to the error, -1 for a special error string (which you can obtain with errstr()) or 0 on end of file.

virtual WvString errstr () const
virtual void seterr (int _errnum)
 Set the errnum variable -- we have an error.

void seterr (WvStringParm specialerr)
void seterr (WVSTRING_FORMAT_DECL)
void seterr (const WvError &err)
void noerr ()
 Reset our error state - there's no error condition anymore.


Public Attributes

rsa_st * rsa

Protected Attributes

WvString errstring


Constructor & Destructor Documentation

WvRSAKey::WvRSAKey const WvRSAKey k  ) 
 

Definition at line 15 of file wvrsa.cc.

References private_str(), prv, and public_str().

WvRSAKey::WvRSAKey struct rsa_st *  _rsa,
bool  priv
 

Definition at line 24 of file wvrsa.cc.

References rsa, and WvError::seterr().

WvRSAKey::WvRSAKey WvStringParm  keystr,
bool  priv
 

Definition at line 42 of file wvrsa.cc.

References WvStringParm.

WvRSAKey::WvRSAKey int  bits  ) 
 

Definition at line 48 of file wvrsa.cc.

References rsa.

WvRSAKey::~WvRSAKey  ) 
 

Definition at line 56 of file wvrsa.cc.

References rsa.


Member Function Documentation

WvString WvError::errstr  )  const [virtual, inherited]
 

Reimplemented in WvHTTPStream, and WvStreamClone.

Definition at line 20 of file wverror.cc.

References WvError::errnum, and WvError::errstring.

Referenced by UniIniGen::commit(), WvStreamClone::errstr(), main(), UniIniGen::refresh(), WvError::seterr(), UniConfDaemon::setupsslsocket(), UniConfDaemon::setuptcpsocket(), UniConfDaemon::setupunixsocket(), WvX509Mgr::WvX509Mgr(), and WvHttpPool::~WvHttpPool().

virtual int WvError::geterr  )  const [inline, virtual, inherited]
 

If isok() is false, return the system error number corresponding to the error, -1 for a special error string (which you can obtain with errstr()) or 0 on end of file.

If isok() is true, returns an undefined number.

Reimplemented in WvHTTPStream, and WvStreamClone.

Definition at line 44 of file wverror.h.

References WvError::errnum.

Referenced by UniIniGen::commit(), WvStreamClone::geterr(), WvEncoderStream::isok(), WvConf::load_file(), WvLockDev::lock(), main(), WvHTTPStream::pre_select(), UniIniGen::refresh(), WvConf::save(), WvError::seterr(), WvMagicCircle::WvMagicCircle(), and WvHttpPool::~WvHttpPool().

virtual bool WvError::isok  )  const [inline, virtual, inherited]
 

By default, returns true if geterr() == 0.

Might be overridden so that isok() == false even though no error code has been specified.

Reimplemented in UniClientConn, WvBufStream, WvDailyEvent, WvDsp, WvEncoderStream, WvFDStream, WvHTTPStream, WvIStreamList, WvLog, WvPamStream, WvSSLStream, IWvStream, WvStream, WvStreamClone, WvStreamList, WvTCPConn, WvTimeoutStream, WvTimeStream, WvFileWatcher, and UniConfDaemon.

Definition at line 35 of file wverror.h.

References WvError::errnum.

Referenced by WvBdbHashBase::add(), WvBdbHashBase::exists(), WvBdbHashBase::find(), WvStreamList::isok(), WvStream::isok(), main(), WvBdbHash< K, D >::Iter::next(), WvBdbHashBase::IterBase::next(), WvBdbHashBase::remove(), WvRSAEncoder::WvRSAEncoder(), WvRSAStream::WvRSAStream(), WvX509Mgr::WvX509Mgr(), and WvBdbHashBase::zap().

void WvError::noerr  )  [inline, inherited]
 

Reset our error state - there's no error condition anymore.

Definition at line 65 of file wverror.h.

References WvError::errnum.

Referenced by WvBdbHashBase::opendb(), and WvError::WvError().

WvString WvRSAKey::private_str  )  const [inline]
 

Definition at line 44 of file wvrsa.h.

Referenced by WvRSAKey().

WvString WvRSAKey::public_str  )  const [inline]
 

Definition at line 46 of file wvrsa.h.

Referenced by WvRSAKey().

void WvError::seterr const WvError err  )  [inherited]
 

Definition at line 64 of file wverror.cc.

References WvError::errstr(), WvError::geterr(), and WvError::seterr().

void WvError::seterr WVSTRING_FORMAT_DECL   )  [inline, inherited]
 

Reimplemented in WvStream.

Definition at line 60 of file wverror.h.

References WvError::seterr(), and WVSTRING_FORMAT_CALL.

void WvError::seterr WvStringParm  specialerr  )  [inherited]
 

Reimplemented in WvStream.

Definition at line 54 of file wverror.cc.

References WvError::errnum, WvError::errstring, WvError::seterr(), and WvStringParm.

void WvError::seterr int  _errnum  )  [virtual, inherited]
 

Set the errnum variable -- we have an error.

If called more than once, seterr() doesn't change the error code away from the previous one. That way, we remember the _original_ cause of our problems.

Subclasses may want to override seterr(int) to shut themselves down (eg. WvStream::close()) when an error condition is set.

Note that seterr(WvString) will call seterr(-1).

Reimplemented in WvStream.

Definition at line 47 of file wverror.cc.

References WvError::errnum.

Referenced by WvBdbHashBase::add(), WvBdbHashBase::closedb(), WvBdbHashBase::exists(), WvBdbHashBase::find(), main(), WvBdbHashBase::IterBase::next(), WvBdbHashBase::opendb(), WvBdbHashBase::remove(), WvStream::seterr(), WvError::seterr(), WvMagicCircle::WvMagicCircle(), WvRSAKey(), WvShmZone::WvShmZone(), and WvBdbHashBase::zap().


Member Data Documentation

WvString WvError::errstring [protected, inherited]
 

Definition at line 23 of file wverror.h.

Referenced by WvError::errstr(), and WvError::seterr().

struct rsa_st* WvRSAKey::rsa
 

Definition at line 35 of file wvrsa.h.

Referenced by WvRSAEncoder::_encode(), WvX509Mgr::certreq(), WvX509Mgr::create_selfsigned(), WvX509Mgr::decode(), WvX509Mgr::encode(), WvX509Mgr::test(), WvX509Mgr::write_p12(), WvRSAEncoder::WvRSAEncoder(), WvRSAKey(), WvRSAStream::WvRSAStream(), and ~WvRSAKey().


The documentation for this class was generated from the following files:
Generated on Sat Feb 21 21:06:54 2004 for WvStreams by doxygen 1.3.5