diff options
author | Mark Spruiell <mes@zeroc.com> | 2006-03-28 20:53:42 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2006-03-28 20:53:42 +0000 |
commit | 0a58e76f0fde2dcddd5505951fe5f1201d36ced7 (patch) | |
tree | 1929d74d1a70670fe74e863de4dacad5c37aa7a4 /cpp/src/IceSSL/RSAKeyPair.cpp | |
parent | minor fix (diff) | |
download | ice-0a58e76f0fde2dcddd5505951fe5f1201d36ced7.tar.bz2 ice-0a58e76f0fde2dcddd5505951fe5f1201d36ced7.tar.xz ice-0a58e76f0fde2dcddd5505951fe5f1201d36ced7.zip |
new IceSSL plugin
Diffstat (limited to 'cpp/src/IceSSL/RSAKeyPair.cpp')
-rw-r--r-- | cpp/src/IceSSL/RSAKeyPair.cpp | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/cpp/src/IceSSL/RSAKeyPair.cpp b/cpp/src/IceSSL/RSAKeyPair.cpp deleted file mode 100644 index 334ed4c2556..00000000000 --- a/cpp/src/IceSSL/RSAKeyPair.cpp +++ /dev/null @@ -1,86 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#include <IceUtil/Config.h> -#include <IceUtil/Base64.h> -#include <IceSSL/RSAKeyPair.h> -#include <IceSSL/RSAPrivateKey.h> -#include <IceSSL/RSAPublicKey.h> -#include <assert.h> - -void IceInternal::incRef(::IceSSL::RSAKeyPair* p) { p->__incRef(); } -void IceInternal::decRef(::IceSSL::RSAKeyPair* p) { p->__decRef(); } - -using std::back_inserter; -using std::string; -using Ice::ByteSeq; -using IceUtil::Base64; - -IceSSL::RSAKeyPair::RSAKeyPair(const string& key, const string& cert) : - _privateKey(new RSAPrivateKey(key)), - _publicKey(new RSAPublicKey(cert)) -{ - assert(_privateKey != 0); - assert(_publicKey != 0); -} - -IceSSL::RSAKeyPair::RSAKeyPair(const ByteSeq& keySeq, const ByteSeq& certSeq) : - _privateKey(new RSAPrivateKey(keySeq)), - _publicKey(new RSAPublicKey(certSeq)) -{ - assert(_privateKey != 0); - assert(_publicKey != 0); -} - -IceSSL::RSAKeyPair::~RSAKeyPair() -{ -} - -void -IceSSL::RSAKeyPair::keyToBase64(string& b64Key) -{ - _privateKey->keyToBase64(b64Key); -} - -void -IceSSL::RSAKeyPair::certToBase64(string& b64Cert) -{ - _publicKey->certToBase64(b64Cert); -} - -void -IceSSL::RSAKeyPair::keyToByteSeq(ByteSeq& keySeq) -{ - _privateKey->keyToByteSeq(keySeq); -} - -void -IceSSL::RSAKeyPair::certToByteSeq(ByteSeq& certSeq) -{ - _publicKey->certToByteSeq(certSeq); -} - -RSA* -IceSSL::RSAKeyPair::getRSAPrivateKey() const -{ - return _privateKey->get(); -} - -X509* -IceSSL::RSAKeyPair::getX509PublicKey() const -{ - return _publicKey->getX509PublicKey(); -} - -IceSSL::RSAKeyPair::RSAKeyPair(const RSAPrivateKeyPtr& rsa, const RSAPublicKeyPtr& x509) : - _privateKey(rsa), - _publicKey(x509) -{ -} - |