summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslcertificate.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove unused QT_NO_TEXTSTREAM.David Faure2012-01-111-1/+1
| | | | | | | | It was checked in a few places, but it didn't actually remove QTextStream, so it was pretty useless. Change-Id: I8eaf28893cd6c7acbe1c0b69d58de90742aee755 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* SSL certificate blacklist: reformat serial numbers to hexadecimalPeter Hartmann2011-11-251-10/+10
| | | | | | | | | | Since recently QSslCertificate::serialNumber() always returns the hexadecimal format, so we need to adapt to that when checking the serial numbers for the blacklisted certificates. Change-Id: I43bdb1be77faad7ad79a835c896fc39477452e75 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Always use the hex format for certificate serial numbers.Richard Moore2011-11-151-16/+8
| | | | | | | | | In Qt 4.x the serial number is reported by a mixture of the hex value and the number, The hex is what is used by other tools, and we should do the same. Change-Id: Ia0361d43fb5b920d053c95e932e0c8a012436e5e Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Deprecate QSslCertificate::isValid() replace with isBlacklisted()Richard Moore2011-11-141-11/+18
| | | | | | | | | | | Currently isValid wrongly gives the impression it checks a certificate for validity - it doesn't. It merely checks if the certificate dates are valid and if the certificate is blacklisted. Since it's already easy for users to check the dates, let's just give them access to the ability to check for blacklisting. Change-Id: I25be3bde6a01063034702a9574b28469bf4882cd Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* SSL: blacklist intermediate certificates that issued weak certsPeter Hartmann2011-11-081-0/+3
| | | | | | | | | | | ... as did browser vendors. Tested manually with affected CA certificates. Reviewed-by: Richard J. Moore <rich@kde.org> (cherry picked from commit e1d6df4e5931ee49b4b68dd5a33146f5639268b7) Change-Id: I5bf6c147abf6d2de0f313d65faa2d9a1e9684cea Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* SSL certificates: add functionality to read extensionsRichard Moore2011-11-061-9/+236
| | | | | | | | | | ... by adding a new class QSslCertificateExtension and methods in QSslCertificate to support extensions. This is needed e.g. for OCSP (checking revocation status of a certificate) or Extended Validation certificates. Change-Id: I5c5d9513fa640cd487786bb9a5af734afebd0828 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSslCertificate: block all DigiNotar (intermediate and root) certsPeter Hartmann2011-09-071-2/+25
| | | | | | | | | | | and do not only check leaf certificates, but all intermediates and the root. Tested manually with the cross-signed intermediates. Change-Id: I860dc9b568bc244abc9228486dbb374a1a2b47c4 Reviewed-by: Richard J. Moore <rich@kde.org> (cherry picked from commit 64adbd0c5775f97343afbe0e7b5fde0d70bdaedd) Reviewed-on: http://codereview.qt.nokia.com/4291 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* QSslCertificate: also check common name for blacklisted certificatesPeter Hartmann2011-09-021-11/+12
| | | | | | | | | | | | | | | ... to reduce the possibility of blacklisting valid certificates that happen to have the same serial number as a blacklisted one, which is unlikely, but possible. Reviewed-by: Richard J. Moore <rich@kde.org> (cherry picked from commit 6b1a8129623e3716f2fc075608b260ce7c381fe2 and adapted to the source incompatible change) Change-Id: If714c34f6ce028032eee6d68f34d088b6ad5a0cc Reviewed-on: http://codereview.qt.nokia.com/3895 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* QSslCertificate: blacklist fraudulent *.google.comPeter Hartmann2011-08-301-0/+1
| | | | | | | | | | | | | | blacklist the leaf certificate for now. There might well be more fake certificates in the wild, for that either the Diginotar.nl root cert needs to be disabled on the system or OCSP would need to be enabled (not supported by Qt yet). Reviewed-by: Richard J. Moore <rich@kde.org> (cherry picked from commit 70f6a1b91b242174682c30be976c2aa36c450cc7) Change-Id: I7cd3fdc4c6e85202914764f983a60d301e54aa35 Reviewed-on: http://codereview.qt.nokia.com/3893 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* QSslCertificate: deprecate alternateSubjectNames()Peter Hartmann2011-08-041-4/+4
| | | | | | | | | | ... and add a new method subjectAlternativeNames() instead. This was a typo in the API. Change-Id: Id8704c387c9ff8e1af2b9a524ff628f5c053a294 Reviewed-on: http://codereview.qt.nokia.com/2618 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* QSslCertificate: extend documentation for new verify methodPeter Hartmann2011-07-121-2/+6
| | | | | | | Change-Id: I47e038299a7e6ef18206839ff59ecef9f0860415 Reviewed-on: http://codereview.qt.nokia.com/1510 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Markus Goetz
* Add the ability to verify a chain of certificatesRichard Moore2011-07-121-0/+12
| | | | | | | | | | | Currently it is only possible to verify a certificate chain when connecting to a server. This change makes it possible to verify a chain at any time. Change-Id: Ib70ad7b81418f880e995f391b82ce59561ededb8 Merge-request: 11 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-on: http://codereview.qt.nokia.com/1509
* QSslCertificate: rename "tag" to "attribute", as in the RFCPeter Hartmann2011-07-121-14/+14
| | | | | | | | | | | RFC 2459 "Internet X.509 Public Key Infrastructure" uses the word "attribute" for fields in a certificate like common name, organization etc. Change-Id: I51e595acbe3e146acf81af21cf48e554fa9490e4 Reviewed-on: http://codereview.qt.nokia.com/1453 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* SSL: Move the code for extracting the name of an ASN1_OBJECTRichard Moore2011-07-111-12/+15
| | | | | | | | | | | | Moves the code for extracting the name of an ASN1_OBJECT to a function. We're going to need this again for implementing support for X509 extensions. Change-Id: I43276eb375b37f5fef0d981f4003220d7e7b81ba Merge-request: 18 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-on: http://codereview.qt.nokia.com/1452 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* SSL: Add methods to access the tags of the subject and issuer of a certRichard Moore2011-07-111-0/+38
| | | | | | | | | | | Add methods that return a list of the tags in use in a certificate issuer or subject. This means that unknown elements of these fields can be accessed. Change-Id: I588989e34f541b1d31cc9e97f5a85d1624ece1b1 Merge-request: 18 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-on: http://codereview.qt.nokia.com/1451
* SSL: Make the internals of certificate name info match the externals.Richard Moore2011-07-111-17/+17
| | | | | | | | | | | | The internals of QSslCertificate were using QString but the API used QByteArray, this commit unifies the code. This means that we don't keep converting things. Change-Id: I29fc149a85b77e786a6e90e5154c62f713476599 Merge-request: 18 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-on: http://codereview.qt.nokia.com/1450 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* SSL: Store x509 name entries that have no short name as their OID.Richard Moore2011-07-111-2/+14
| | | | | | | | | | | | Previously, x509 name entries that didn't have a shortname would all be (accidentally) stored with the tag 'UNDEF'. This commit changes things so that they are stored using the string form of their OID. Change-Id: I667306cc4f91b1ca84f29b986bc21daadeb089b6 Merge-request: 18 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-on: http://codereview.qt.nokia.com/1449 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Certificates can have each issuer and subject field many timesRichard Moore2011-06-271-9/+15
| | | | | | | | | | | | | | | | | | THIS COMMIT BREAKS SOURCE COMPATIBILITY BETWEEN Qt 4 AND Qt 5 Qt4 assumed that there was only one entry of each type in the subject and issuer of a certificate. This is incorrect (eg. you can have many common names). In addition, some of the fields required by RFC3280 were not suppport. This change modifiers the API to return a list of entries of each type and adds support for the missing fields. It also updates the commonname matching code for SSL connections to handle multiple entries. Change-Id: I9457266a205def0a07c13de47094ff56ead42845 Merge-request: 5 Reviewed-on: http://codereview.qt.nokia.com/796 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* SSL certificate printing: increase max certificate sizePeter Hartmann2011-06-221-2/+2
| | | | | | | | | | apparently there are really big certificates around, so 4k might not always be enough. Change-Id: I84df82d117469a14b4c6db81e0ceecc1a8ba47b3 Reviewed-on: http://codereview.qt.nokia.com/554 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* Add the ability to convert a certificate to textRichard Moore2011-06-211-0/+37
| | | | | | | | | | | | | Adds a function that will convert a certificate to human readable text format using the openssl print function. This is useful for debugging and for displaying the full details of a certificate (including those parts not supported by the Qt API). Change-Id: I27238d05df37f8b15ad09f8e761b06344631a9ce Merge-request: 2 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-on: http://codereview.qt.nokia.com/551 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-stagingQt Continuous Integration System2011-05-251-17/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging: (21 commits) Fixed line endings. Update licenseheader text in source files for qtbase Qt module New configure.exe binary Add -qpa option on Windows Use qglobal.h's VERSION number instead of hardcoded current version More examples adjusted to Symbian and Maemo5. (cherry picked from commit a97b9620a584c9b1a2e006873183526b3d7e001e) Doc: Added some details to the accessibility events API documentation. Doc: Fixed qdoc warnings. Doc: Fixed qdoc warnings. Doc: Made an additional change for clarity. Doc: Noted that the example will not work as expected with a mouse. Doc: Fixed qdoc warnings. Doc: Applying a pending change from previous merges. Doc: Fixed qdoc warning. Doc: Fixed qdoc warnings. Doc: Applied pending fixes to API documentation. Doc: Various fixes to documentation, some based on changes in master. Doc: Added missing project and desktop files. Doc: Documented the value returned when no field can be found. Squashed commit of changes from the 4.8-temp branch. ...
| * Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | fix coding style for merge request re. utf8 characters in SSL certsPierre Rossi2011-05-231-7/+6
| | | | | | | | | | | | | | | | | | fixes minor coding issues for "Use OpenSSL X509_NAME_ENTRY API to parse UTF8 subjectName/issuerName" Task-number: QTBUG-7912 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> (cherry picked from commit 2e8d206fd9f656cd88b797c059ef83ed3df32881)
* | Use OpenSSL X509_NAME_ENTRY API to parse UTF8 subjectName/issuerNameRaul Metsma2011-05-231-33/+14
|/ | | | | | | | | ... to be able to display non-ASCII names from subject and issuerInfo. Task-number: QTBUG-7912 Merge-request: 922 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> (cherry picked from commit e5d94256be2525c24a8b61edd771662b7f2b8be3)
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+858
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12