diff options
| author | Sergei Golubchik <sergii@pisem.net> | 2012-04-05 12:01:52 +0200 |
|---|---|---|
| committer | Sergei Golubchik <sergii@pisem.net> | 2012-04-05 12:01:52 +0200 |
| commit | 8a1530488b7edd4a41b0a4e000c465278209e02b (patch) | |
| tree | f7159b893a8dc1d5efd540ef2b3b21227aaf2b6d /extra/yassl/src/cert_wrapper.cpp | |
| parent | 4b05758854ce3ff2c545bb937e2c8a623ed37c10 (diff) | |
| parent | d4b30a7a84742ae03774fe25af2cbad144ba2d5d (diff) | |
| download | mariadb-git-8a1530488b7edd4a41b0a4e000c465278209e02b.tar.gz | |
mergemariadb-5.2.12
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(); |
