diff options
author | Yashwant Sahu <yashwant.sahu@oracle.com> | 2016-02-26 11:53:56 +0530 |
---|---|---|
committer | Yashwant Sahu <yashwant.sahu@oracle.com> | 2016-02-26 11:53:56 +0530 |
commit | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 (patch) | |
tree | 10d72b2871af980cc0084c67e3b88b41b682801a /extra/yassl/taocrypt/src | |
parent | 29cc2c28832ae4733804ac6b29d650238ee0559c (diff) | |
download | mariadb-git-e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69.tar.gz |
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.mysql-5.5.49
Diffstat (limited to 'extra/yassl/taocrypt/src')
-rw-r--r-- | extra/yassl/taocrypt/src/asn.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/extra/yassl/taocrypt/src/asn.cpp b/extra/yassl/taocrypt/src/asn.cpp index c419ec0a992..a210d805452 100644 --- a/extra/yassl/taocrypt/src/asn.cpp +++ b/extra/yassl/taocrypt/src/asn.cpp @@ -474,8 +474,9 @@ void DH_Decoder::Decode(DH& key) CertDecoder::CertDecoder(Source& s, bool decode, SignerList* signers, bool noVerify, CertType ct) - : BER_Decoder(s), certBegin_(0), sigIndex_(0), sigLength_(0), - signature_(0), verify_(!noVerify) + : BER_Decoder(s), certBegin_(0), sigIndex_(0), sigLength_(0), subCnPos_(-1), + subCnLen_(0), issCnPos_(-1), issCnLen_(0), signature_(0), + verify_(!noVerify) { issuer_[0] = 0; subject_[0] = 0; @@ -796,6 +797,13 @@ void CertDecoder::GetName(NameType nt) case COMMON_NAME: if (!(ptr = AddTag(ptr, buf_end, "/CN=", 4, strLen))) return; + if (nt == ISSUER) { + issCnPos_ = (int)(ptr - strLen - issuer_); + issCnLen_ = (int)strLen; + } else { + subCnPos_ = (int)(ptr - strLen - subject_); + subCnLen_ = (int)strLen; + } break; case SUR_NAME: if (!(ptr = AddTag(ptr, buf_end, "/SN=", 4, strLen))) |