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

KeyStoreSpi.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2004 Beeyond Software Holding BV
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  */
00018 
00023 #ifndef _CLASS_KEYSTORESPI_H
00024 #define _CLASS_KEYSTORESPI_H
00025 
00026 #include "beecrypt/api.h"
00027 
00028 #ifdef __cplusplus
00029 
00030 #include "beecrypt/c++/lang/Object.h"
00031 using beecrypt::lang::Object;
00032 #include "beecrypt/c++/io/InputStream.h"
00033 using beecrypt::io::InputStream;
00034 #include "beecrypt/c++/io/OutputStream.h"
00035 using beecrypt::io::OutputStream;
00036 #include "beecrypt/c++/security/KeyStoreException.h"
00037 using beecrypt::security::KeyStoreException;
00038 #include "beecrypt/c++/security/NoSuchAlgorithmException.h"
00039 using beecrypt::security::NoSuchAlgorithmException;
00040 #include "beecrypt/c++/security/NoSuchProviderException.h"
00041 using beecrypt::security::NoSuchProviderException;
00042 #include "beecrypt/c++/security/UnrecoverableKeyException.h"
00043 using beecrypt::security::UnrecoverableKeyException;
00044 #include "beecrypt/c++/security/cert/Certificate.h"
00045 using beecrypt::security::cert::Certificate;
00046 #include "beecrypt/c++/security/cert/CertificateException.h"
00047 using beecrypt::security::cert::CertificateException;
00048 #include "beecrypt/c++/util/Date.h"
00049 using beecrypt::util::Date;
00050 #include "beecrypt/c++/util/Enumeration.h"
00051 using beecrypt::util::Enumeration;
00052 
00053 #include <typeinfo>
00054 using std::type_info;
00055 #include <vector>
00056 using std::vector;
00057 
00058 namespace beecrypt {
00059     namespace security {
00062         class BEECRYPTCXXAPI KeyStoreSpi : public beecrypt::lang::Object
00063         {
00064             friend class KeyStore;
00065 
00066         protected:
00067             virtual Enumeration* engineAliases() = 0;
00068             virtual bool engineContainsAlias(const String& alias) = 0;
00069                 
00070             virtual void engineDeleteEntry(const String& alias) throw (KeyStoreException) = 0;
00071             virtual const Date* engineGetCreationDate(const String& alias) = 0;
00072 
00073             virtual const Certificate* engineGetCertificate(const String& alias) = 0;
00074             virtual const String* engineGetCertificateAlias(const Certificate& cert) = 0;
00075             virtual const vector<Certificate*>* engineGetCertificateChain(const String& alias) = 0;
00076             virtual bool engineIsCertificateEntry(const String& alias) = 0;
00077             virtual void engineSetCertificateEntry(const String& alias, const Certificate& cert) throw (KeyStoreException) = 0;
00078                 
00079             virtual Key* engineGetKey(const String& alias, const array<javachar>& password) throw (NoSuchAlgorithmException, UnrecoverableKeyException) = 0;
00080             virtual bool engineIsKeyEntry(const String& alias) = 0;
00081             virtual void engineSetKeyEntry(const String& alias, const bytearray& key, const vector<Certificate*>&) throw (KeyStoreException) = 0;
00082             virtual void engineSetKeyEntry(const String& alias, const Key& key, const array<javachar>& password, const vector<Certificate*>&) throw (KeyStoreException) = 0;
00083 
00084             virtual size_t engineSize() const = 0;
00085 
00086             virtual void engineLoad(InputStream* in, const array<javachar>* password) throw (IOException, CertificateException, NoSuchAlgorithmException) = 0;
00087             virtual void engineStore(OutputStream& out, const array<javachar>* password) throw (IOException, CertificateException, NoSuchAlgorithmException) = 0;
00088 
00089         public:
00090             virtual ~KeyStoreSpi() {};
00091         };
00092     }
00093 }
00094 
00095 #endif
00096 
00097 #endif

Generated on Wed Jun 29 23:17:21 2005 for BeeCrypt by  doxygen 1.4.1