WvDSAKey Class Reference

#include <wvdsa.h>

Inheritance diagram for WvDSAKey:

[legend]
List of all members.

Detailed Description

An DSA 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.

Definition at line 23 of file wvdsa.h.

Public Member Functions

 WvDSAKey (const WvDSAKey &k)
 WvDSAKey (struct dsa_st *_dsa, bool priv)
 WvDSAKey (WvStringParm keystr, bool priv)
 Populate the DSA key with a hexified() key.
 WvDSAKey (int bits)
 Create a new DSA key of bits strength.
 ~WvDSAKey ()
virtual bool isok () const
 By default, returns true if geterr() == 0.
WvString private_str () const
 Retrieve the private key as a hexified string returns WvString::null if there is only a public key.
WvString public_str () const
 Retrieve the public key as a hexified string.
WvString getpem (bool privkey)
 Retrieve the public or private key in PEM encoded format.
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 WvErrorBase &err)
void seterr_both (int _errnum, WvStringParm specialerr)
void noerr ()
 Reset our error state - there's no error condition anymore.

Static Public Member Functions

static WvString strerror (int errnum)
 A replacement for the operating system strerror() function that can map more kinds of error strings (especially in win32).

Public Attributes

dsa_st * dsa

Protected Attributes

int errnum
WvString errstring


Member Function Documentation

bool WvDSAKey::isok  )  const [virtual]
 

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

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

Reimplemented from WvErrorBase.

Definition at line 66 of file wvdsa.cc.

References dsa, and WvErrorBase::errstring.

virtual int WvErrorBase::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, WvStreamClone, and WvX509Mgr.

Definition at line 48 of file wverror.h.

References WvErrorBase::errnum.

Referenced by UniIniGen::commit(), WvX509Mgr::errstr(), WvStreamClone::errstr(), WvErrorBase::errstr(), WvError::get(), UniFileSystemGen::get(), WvX509Mgr::geterr(), WvStreamClone::geterr(), WvEncoderStream::isok(), WvConf::load_file(), WvConf::save(), WvStream::seterr(), WvErrorBase::seterr(), WvMagicCircle::WvMagicCircle(), and WvHttpPool::~WvHttpPool().

void WvErrorBase::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 144 of file wverror.cc.

References WvErrorBase::errstring.

Referenced by WvX509Mgr::certreq(), WvX509Mgr::create_selfsigned(), WvCRLMgr::decode(), WvX509Mgr::encode(), WvCRLMgr::encode(), WvRSAKey::getpem(), getpem(), WvX509Mgr::read_p12(), WvGlob::set(), WvError::set(), WvX509Mgr::set_pubkey(), WvStream::seterr(), WvErrorBase::seterr(), WvErrorBase::seterr_both(), WvX509Mgr::sign(), WvX509Mgr::signedbyCAinfile(), WvX509Mgr::test(), WvX509Mgr::unhexify(), WvX509Mgr::validate(), WvX509Mgr::verify(), WvX509Mgr::write_p12(), WvCRLMgr::WvCRLMgr(), WvDSAKey(), WvMagicCircle::WvMagicCircle(), WvPam::WvPam(), WvRSAKey::WvRSAKey(), WvShmZone::WvShmZone(), and WvX509Mgr::WvX509Mgr().


The documentation for this class was generated from the following files:
Generated on Thu May 25 21:51:13 2006 for WvStreams by  doxygen 1.4.6