diff options
author | Anthony Neal <aneal@zeroc.com> | 2002-04-15 16:40:16 +0000 |
---|---|---|
committer | Anthony Neal <aneal@zeroc.com> | 2002-04-15 16:40:16 +0000 |
commit | c1bc8a17b3e7938dc7ea7847513e7d5e97c633a8 (patch) | |
tree | 6ffff8023a3349920a0cc98fe25559617fc6030d /cpp/src/Ice/ContextOpenSSL.cpp | |
parent | Uncommented the SSL related properties. (diff) | |
download | ice-c1bc8a17b3e7938dc7ea7847513e7d5e97c633a8.tar.bz2 ice-c1bc8a17b3e7938dc7ea7847513e7d5e97c633a8.tar.xz ice-c1bc8a17b3e7938dc7ea7847513e7d5e97c633a8.zip |
Added PrivateKeyException to the addKeyCert methods to ensure that the
blank private key problem was taken care of.
Diffstat (limited to 'cpp/src/Ice/ContextOpenSSL.cpp')
-rw-r--r-- | cpp/src/Ice/ContextOpenSSL.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cpp/src/Ice/ContextOpenSSL.cpp b/cpp/src/Ice/ContextOpenSSL.cpp index b301d1c4ff4..b0cc0e2f543 100644 --- a/cpp/src/Ice/ContextOpenSSL.cpp +++ b/cpp/src/Ice/ContextOpenSSL.cpp @@ -69,12 +69,30 @@ void IceSSL::OpenSSL::Context::setRSAKeysBase64(const std::string& privateKey, const std::string& publicKey) { + if (privateKey.empty()) + { + IceSSL::PrivateKeyException privateKeyEx(__FILE__, __LINE__); + + privateKeyEx._message = "Empty private key supplied."; + + throw privateKeyEx; + } + addKeyCert(privateKey, publicKey); } void IceSSL::OpenSSL::Context::setRSAKeys(const Ice::ByteSeq& privateKey, const Ice::ByteSeq& publicKey) { + if (privateKey.empty()) + { + IceSSL::PrivateKeyException privateKeyEx(__FILE__, __LINE__); + + privateKeyEx._message = "Empty private key supplied."; + + throw privateKeyEx; + } + addKeyCert(privateKey, publicKey); } |