// ********************************************************************** // // Copyright (c) 2003 // ZeroC, Inc. // Billerica, MA, USA // // All Rights Reserved. // // Ice is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License version 2 as published by // the Free Software Foundation. // // ********************************************************************** #ifndef ICE_SSL_RSA_PUBLIC_KEY_H #define ICE_SSL_RSA_PUBLIC_KEY_H #include #include #include #include #include namespace IceSSL { class ICE_SSL_API RSAPublicKey : public IceUtil::Shared { public: // Construction from Base64 encoding. RSAPublicKey(const std::string&); // Construction from binary DER encoding ByteSeq. RSAPublicKey(const Ice::ByteSeq&); // Construction from X509 structure (simple initialization). RSAPublicKey(X509*); virtual ~RSAPublicKey(); // Conversion to Base64 encoding. void certToBase64(std::string&); // Conversion to binary DER encoding. void certToByteSeq(Ice::ByteSeq&); // Get the internal key structure as per the OpenSSL implementation. X509* getX509PublicKey() const; private: void byteSeqToCert(const Ice::ByteSeq&); X509* _publicKey; }; } #endif