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

OpenSSLCryptoX509.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2002-2005 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 /*
00018  * XSEC
00019  *
00020  * OpenSSLCryptoX509:= OpenSSL based class for handling X509 (V3) certificates
00021  *
00022  * Author(s): Berin Lautenbach
00023  *
00024  * $Id: OpenSSLCryptoX509.hpp,v 1.8 2005/02/03 13:13:08 milan Exp $
00025  *
00026  */
00027 
00028 #ifndef OPENSSLCRYPTOX509_INCLUDE
00029 #define OPENSSLCRYPTOX509_INCLUDE
00030 
00031 #include <xsec/framework/XSECDefs.hpp>
00032 #include <xsec/enc/XSECCryptoX509.hpp>
00033 
00034 #if defined (HAVE_OPENSSL)
00035 #include <openssl/x509.h>
00036 #include <openssl/bio.h>
00037 
00046 class DSIG_EXPORT OpenSSLCryptoX509 : public XSECCryptoX509 {
00047 
00048 public :
00049 
00052 
00053     OpenSSLCryptoX509();
00054     virtual ~OpenSSLCryptoX509();
00055 
00057 
00058 
00060 
00062 
00071     virtual XSECCryptoKey::KeyType getPublicKeyType();
00072 
00077     virtual const XMLCh * getProviderName();
00078 
00087     virtual XSECCryptoKey * clonePublicKey();
00088 
00090 
00093 
00103     virtual void loadX509Base64Bin(const char * buf, unsigned int len);
00104 
00111     virtual safeBuffer &getDEREncodingSB(void) {return m_DERX509;}
00112 
00114 
00117 
00124     OpenSSLCryptoX509(X509 * x);
00125 
00130     X509 * getOpenSSLX509(void) {return mp_X509;}
00131 
00133 
00134 private:
00135 
00136     X509            * mp_X509;              // The X509 structure
00137     safeBuffer      m_DERX509;
00138 };
00139 
00140 #endif /* HAVE_OPENSSL */
00141 #endif /* OPENSSLCRYPTOX509_INCLUDE */
00142 

Generated on Sun Jul 3 17:37:26 2005 for XML-Security-C by  doxygen 1.4.2