Changeset 651 for trunk/src/network/ssl/qsslcertificate.cpp
- Timestamp:
- Mar 8, 2010, 12:52:58 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.2 (added) merged: 650 /branches/vendor/nokia/qt/current merged: 649 /branches/vendor/nokia/qt/4.6.1 removed
- Property svn:mergeinfo changed
-
trunk/src/network/ssl/qsslcertificate.cpp
r561 r651 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 20 09Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 305 305 QString QSslCertificate::issuerInfo(SubjectInfo info) const 306 306 { 307 // lazy init 307 308 if (d->issuerInfo.isEmpty() && d->x509) 308 309 d->issuerInfo = … … 321 322 QString QSslCertificate::issuerInfo(const QByteArray &tag) const 322 323 { 323 // ### Use a QByteArray for the keys in the map 324 // lazy init 325 if (d->issuerInfo.isEmpty() && d->x509) 326 d->issuerInfo = 327 _q_mapFromOnelineName(q_X509_NAME_oneline(q_X509_get_issuer_name(d->x509), 0, 0)); 328 324 329 return d->issuerInfo.value(QString::fromLatin1(tag)); 325 330 } … … 336 341 QString QSslCertificate::subjectInfo(SubjectInfo info) const 337 342 { 343 // lazy init 338 344 if (d->subjectInfo.isEmpty() && d->x509) 339 345 d->subjectInfo = … … 351 357 QString QSslCertificate::subjectInfo(const QByteArray &tag) const 352 358 { 353 // ### Use a QByteArray for the keys in the map 359 // lazy init 360 if (d->subjectInfo.isEmpty() && d->x509) 361 d->subjectInfo = 362 _q_mapFromOnelineName(q_X509_NAME_oneline(q_X509_get_subject_name(d->x509), 0, 0)); 363 354 364 return d->subjectInfo.value(QString::fromLatin1(tag)); 355 365 } … … 687 697 static bool matchLineFeed(const QByteArray &pem, int *offset) 688 698 { 689 char ch = pem.at(*offset);699 char ch; 690 700 691 701 // ignore extra whitespace at the end of the line 692 while ( ch == ' ' && *offset < pem.size())693 ch = pem.at(++*offset);702 while (*offset < pem.size() && (ch = pem.at(*offset)) == ' ') 703 ++*offset; 694 704 695 705 if (ch == '\n') { … … 723 733 724 734 offset = endPos + sizeof(ENDCERTSTRING) - 1; 725 if ( !matchLineFeed(pem, &offset))735 if (offset < pem.size() && !matchLineFeed(pem, &offset)) 726 736 break; 727 737
Note:
See TracChangeset
for help on using the changeset viewer.