PublicKey Struct Reference

#include <PublicKey.hxx>

Inheritance diagram for PublicKey:

Serializable Countable List of all members.

Public Member Functions

 SERIALIZABLE_DECLS (PublicKey)
std::string getID () const
bool isValid () const
bool checkSignature (const Buffer &buf, ByteString) const
const std::string getExpiration () const
const std::string getEmail () const

Static Public Member Functions

static GCPtr< PublicKeyFromFile (const Path &fileName)
 Load a public key from an SSL PEM file.

Public Attributes

unsigned type
union {
   X509 *   x509_cert
theCert

Detailed Description

Definition at line 49 of file PublicKey.hxx.


Member Function Documentation

bool PublicKey::checkSignature const Buffer buf,
ByteString 
const
 

Definition at line 62 of file PublicKey.cxx.

References ExBadValue, Buffer::getChunk(), Buffer::Chunk::len, Buffer::length(), Buffer::Chunk::ptr, theCert, and THROW.

GCPtr< PublicKey > PublicKey::FromFile const Path fileName  )  [static]
 

Load a public key from an SSL PEM file.

Definition at line 99 of file PublicKey.cxx.

References Path::c_str(), Path::exists(), ExNoAccess, ExNoObject, format(), pk_X509, THROW, xfclose, and xfopen.

Referenced by FSRepos::Connect(), AuthInfo::findUser(), and Repository::validateSignature().

const std::string PublicKey::getEmail  )  const
 

Definition at line 429 of file PublicKey.cxx.

References ExBadValue, pk_X509, theCert, THROW, and type.

const std::string PublicKey::getExpiration  )  const
 

std::string PublicKey::getID  )  const
 

Definition at line 246 of file PublicKey.cxx.

References bad_b64_encode(), ExNoAccess, format(), hex_encode(), theCert, and THROW.

bool PublicKey::isValid  )  const
 

Definition at line 291 of file PublicKey.cxx.

References ExOutOfMemory, format(), theCert, and THROW.

PublicKey::SERIALIZABLE_DECLS PublicKey   ) 
 


Member Data Documentation

union { ... } PublicKey::theCert
 

Referenced by checkSignature(), getEmail(), getID(), and isValid().

unsigned PublicKey::type
 

Definition at line 52 of file PublicKey.hxx.

Referenced by getEmail().

X509* PublicKey::x509_cert
 

Definition at line 55 of file PublicKey.hxx.


The documentation for this struct was generated from the following files:
Generated on Sun Apr 23 22:42:41 2006 for OpenCM by  doxygen 1.4.6