namespace Akenti class ServerContext

Class to hold the Akenti server credentials which are used to sign cache and capability credentials

Public Methods

~ServerContext ()
destructor
const PrivateKey& getPrivateKey () const
const Certificate& getCertificate () const
bool areCredentialsLoaded () const
void initPrivateKeyFromFile (const string& fileType, const string& fileName)
Reads the file given by fileName and initializes the private key
void initCertificateFromFile (const string& fileType, const string& fileName)
Reads in a certificate from a file
static ServerContext& getServerContext ()
static method to return the single ServerContext that is statically created
static bool isServerContextSet ()

Documentation

Class to hold the Akenti server credentials which are used to sign cache and capability credentials. One such object is statically created.
~ServerContext()
destructor

const PrivateKey& getPrivateKey() const
Throws:
Error if the private key is not loaded
Returns:
the Akenti server's private key

const Certificate& getCertificate() const
Throws:
Error if the certificate is not loaded
Returns:
the Akenti server's x509 id certificate

bool areCredentialsLoaded() const
Returns:
true if both the private key and certificate have been loaded false otherwise

void initPrivateKeyFromFile(const string& fileType, const string& fileName)
Reads the file given by fileName and initializes the private key
Throws:
Error if the private key has already been set
Parameters:
fileType - - currently only "PEM" is supported which means the PEM tagged, base 64-encoded DER representation of a private key. The private keys are interpreted by openSSL which accepts unencrypted RSA, DSA or PKCS8 keys.
fileName - - absolute pathname of the file containing the private key

void initCertificateFromFile(const string& fileType, const string& fileName)
Reads in a certificate from a file
Throws:
Error if the certificate has already been set
Parameters:
fileType - the certificate encoding to accept - currently we only support "PEM" which is the standard PEM tagged base64 encoding of the DER encoding of the ANS1 x509 certificate
fileName - - absolute pathname of the file containing the certificate

static ServerContext& getServerContext()
static method to return the single ServerContext that is statically created

static bool isServerContextSet()
Returns:
true if the credentials have been loaded, false otherwise


This class has no child classes.
Author:
Srilekha Mudumbai Abdelilah Essiari
Version:
1.1 00/05/01

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de