diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-04-05 10:49:38 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-04-05 10:49:38 +0200 |
commit | d4b30a7a84742ae03774fe25af2cbad144ba2d5d (patch) | |
tree | d65a66f9f2f9378a1f4ca014e18952ae514f4cb1 /extra/yassl/src/cert_wrapper.cpp | |
parent | d993ce1bbf8413a0aaf5a524a11334359234c5f4 (diff) | |
parent | cea2c5d28ead6ae4191aea164df9b80b41a743ad (diff) | |
download | mariadb-git-mariadb-5.1.62.tar.gz |
mysql-5.1.62 mergemariadb-5.1.62
Diffstat (limited to 'extra/yassl/src/cert_wrapper.cpp')
-rw-r--r-- | extra/yassl/src/cert_wrapper.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/extra/yassl/src/cert_wrapper.cpp b/extra/yassl/src/cert_wrapper.cpp index 308ca70c748..7e73464001a 100644 --- a/extra/yassl/src/cert_wrapper.cpp +++ b/extra/yassl/src/cert_wrapper.cpp @@ -12,8 +12,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with this program; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301 USA. */ @@ -249,7 +250,8 @@ int CertManager::Validate() TaoCrypt::Source source((*last)->get_buffer(), (*last)->get_length()); TaoCrypt::CertDecoder cert(source, true, &signers_, verifyNone_); - if (int err = cert.GetError().What()) + int err = cert.GetError().What(); + if ( err ) return err; const TaoCrypt::PublicKey& key = cert.GetPublicKey(); @@ -265,7 +267,7 @@ int CertManager::Validate() TaoCrypt::CertDecoder cert(source, true, &signers_, verifyNone_); int err = cert.GetError().What(); - if ( err ) + if ( err && err != TaoCrypt::SIG_OTHER_E) return err; uint sz = cert.GetPublicKey().size(); @@ -326,7 +328,6 @@ int CertManager::SetPrivateKey(const x509& key) // Store OpenSSL type peer's cert void CertManager::setPeerX509(X509* x) { - assert(peerX509_ == 0); if (x == 0) return; X509_NAME* issuer = x->GetIssuer(); |