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

Credentials.h

00001 /*
00002  * Copyright 2003 Michael A. Marsh, Cornell University. All rights reserved.
00003  * This software is released under the modified BSD license.
00004  * See the file LICENSE in the top-level directory for details.
00005  */
00006 //
00007 // $Id: Credentials.h,v 1.3 2004/05/19 15:56:46 mmarsh Exp $
00008 //
00009 // $Log: Credentials.h,v $
00010 // Revision 1.3  2004/05/19 15:56:46  mmarsh
00011 // *** empty log message ***
00012 //
00013 // Revision 1.2  2003/11/04 22:31:47  mmarsh
00014 // *** empty log message ***
00015 //
00016 //
00017 
00018 #ifndef __CODEX_CIPHERS_CREDENTIALS_H__
00019 #define __CODEX_CIPHERS_CREDENTIALS_H__
00020 
00021 #include "PolCredBase.h"
00022 #include "HashFunction.h"
00023 
00024 namespace CODEX_Ciphers
00025 {
00038    class Credentials : public CODEX_ASN1::Base
00039    {
00040       public :
00042          Credentials();
00043 
00045          Credentials( const RSAPublicKey& publicKey );
00046 
00047 //         /// Create Credentials from a public key and a signature.
00048 //         Credentials( const RSAPublicKey& publicKey,
00049 //                      const RSASignature& signature );
00050 //         /*
00051 //          * Create Credentials from public and private keys and a hash
00052 //          * function.
00053 //          * \param publicKey   The public key specifying the client.
00054 //          * \param signingKey  The private key used to authorize the
00055 //          *                    credentials.
00056 //          * \param hashFunc    The function used to create a digest of
00057 //          *                    \e publicKey.
00058 //          * \throws BignumNullException An error occurred allocating a new
00059 //          *                             BIGNUM.
00060 //          * \throws BignumBin2BNException An error occurred translating
00061 //          *                               a character array to a BIGNUM.
00062 //          */
00063 //         Credentials( const RSAPublicKey& publicKey,
00064 //                      const RSAPrivateKey& signingKey,
00065 //                      const HashFunction& hashFunc );
00067          Credentials( const Credentials& aCred );
00069          virtual ~Credentials() {}
00070 
00072          void operator=( const Credentials& aCred );
00073 
00074 //         /// Create a digest of the credentials
00075 //         BIGNUM * digest( const HashFunction& hf ) const;
00076 
00078          const RSAPublicKey& publicKey() const;
00079 
00080          int marshal( unsigned char ** pp ) const;
00081          void* unmarshal( void* bogus, unsigned char ** pp, long length );
00082 
00083       private :
00084          RSAPublicKey  m_publicKey;
00085    };
00086 }
00087 
00088 #endif /* __CODEX_CIPHERS_CREDENTIALS_H__ */

Generated on Fri May 6 17:38:58 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1