class ServerContext

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

Public Methods

[more] ~ServerContext ()
destructor
[more]const PrivateKey& getPrivateKey () const
[more]const Certificate& getCertificate () const
[more]bool areCredentialsLoaded () const
[more]void initPrivateKeyFromFile (const string& fileType, const string& fileName)
Reads the file given by fileName and initializes the private key
[more]void initCertificateFromFile (const string& fileType, const string& fileName)
Reads in a certificate from a file
[more]static ServerContext& getServerContext ()
static method to return the single ServerContext that is statically created
[more]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.

o ~ServerContext()
destructor

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

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

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

ovoid 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

ovoid 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

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

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


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

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.