summaryrefslogtreecommitdiffstats
path: root/src/network/ssl
Commit message (Collapse)AuthorAgeFilesLines
* Add the ability to enable various SSL bug workarounds.Richard Moore2011-10-207-9/+102
| | | | | | | | | | | | | There are lots of buggy SSL servers around and to connect to them you need to disable various features. This commit adds the ability to disable the SSL ticket extension, the ability to disable the insertion of empty fragments, and the ability to disable compression. Task-number: QTBUG-21906 Change-Id: I3e1d0347a46e9030b889bbf15b2aad19b8513b73 Merge-request: 68 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* QSslCertificate: block all DigiNotar (intermediate and root) certsPeter Hartmann2011-09-072-8/+34
| | | | | | | | | | | 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>
* qssl: use reinterpret_cast instead of C-style castsCorentin Chary2011-09-021-10/+10
| | | | | | | | | | Merge-request: 48 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Change-Id: Ia5ac3239e6f378f930cb299a5711aa98dbb2f418 Reviewed-on: http://codereview.qt.nokia.com/4012 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* qssl: add auto test to QSsl::Opaque QSslKeysCorentin Chary2011-09-021-2/+2
| | | | | | | | | | | Also export two symbols for auto tests since opaque keys need EVP_PKEY * created by openssl. Change-Id: Ib7801ddfceb259de7291bfaa5940df87f68af97d Merge-request: 48 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-on: http://codereview.qt.nokia.com/4011 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* qssl: add support for QSsl::Opaque keyCorentin Chary2011-08-315-15/+61
| | | | | | | | | | | This allow to use directly EVP_PKEY * with QSslKey (for example comming from a PKCS#11 dongle). Change-Id: Icb1ba5081506a831ec3d8cfffe13ce70939608ea Merge-request: 48 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-on: http://codereview.qt.nokia.com/4010 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.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-045-11/+19
| | | | | | | | | | ... 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>
* SSL internals: certificate verification: use mutex lockerPeter Hartmann2011-07-141-2/+2
| | | | | | | | | | | there are return statements between locking and unlocking, so to not leave the mutex locked when returning, this commit introduces a QMutexLocker. Change-Id: I74e2f329bf116e92250189bf097deb47d460d9dc Reviewed-on: http://codereview.qt.nokia.com/1656 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Markus Goetz
* 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-126-26/+182
| | | | | | | | | | | 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-122-18/+18
| | | | | | | | | | | 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-112-12/+16
| | | | | | | | | | | | 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-112-0/+40
| | | | | | | | | | | 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-112-19/+19
| | | | | | | | | | | | 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-113-2/+22
| | | | | | | | | | | | 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>
* SSL internals: rename methods in the SSL backend to reflect public onesPeter Hartmann2011-07-113-6/+6
| | | | | | | Change-Id: I234c740b1acbfea670d6170332626f5e3ba49328 Reviewed-on: http://codereview.qt.nokia.com/1437 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* QSslSocket: Add accessors for SSL versionRichard Moore2011-07-116-0/+46
| | | | | | | | | | | | | | | | | This commit adds accessors for both the openssl version number and the version string. The intention here is to aid debugging by making it possible for applications to know which version of the openssl library has been found by the runtime linking code. Since the version of openssl in use will depend on the installation of the developer, the test cases merely display the version string and number rather than verifying that any particular version is in use. Change-Id: Ieec44f0941f99887c85c2858bab0481722d739e5 Merge-request: 12 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-on: http://codereview.qt.nokia.com/1406 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Add Happy-Eyeballs style IPv6 connection establishing.Martin Petersson2011-07-042-7/+8
| | | | | | | | | | | | | | | | In the cases where a DNS lookup will give you both an IPv4 and IPv6 address, this will start two connection channels at the same time. One trying to connect using IPv4 and one on IPv6. This is done so that we can use the fastest one for the connection. To do this we have to do the hostlookup in the connection. The result is then in the cache for the individual socket so it will not need to do another lookup. Task-number: QTBUG-16458 Change-Id: I806c20168d9c5edc2831b80f82a2bd570b36d5fa Reviewed-on: http://codereview.qt.nokia.com/1003 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Make it compile with openssl 1.0.0d, gcc 4.6Bernhard Rosenkraenzer2011-06-283-0/+12
| | | | | | | | | | | | | | | SSL_ctrl's prototype has changed slightly in openssl 1.0.0x - the 4th argument is now a void* as opposed to a const void*. gcc 4.6 doesn't allow this as an implicit cast. Merge-request: 1239 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> (cherry picked from commit 007f01a7e801d5409708e4b8de8b3ead1481cf7d) Change-Id: I4f41af981cf0762383b3fc867ec5d726e2b1e5c6 Reviewed-on: http://codereview.qt.nokia.com/821 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Certificates can have each issuer and subject field many timesRichard Moore2011-06-273-25/+41
| | | | | | | | | | | | | | | | | | 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>
* SSL certificate printing: lookup Symbian ordinalPeter Hartmann2011-06-211-0/+1
| | | | | | | Change-Id: I5358726f0457f00098c248326ed66fb54af1d177 Reviewed-on: http://codereview.qt.nokia.com/553 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-215-0/+42
| | | | | | | | | | | | | 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-2523-395/+395
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '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-2423-393/+393
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
| * Doc: Fixed qdoc warnings.David Boddie2011-05-231-2/+2
| |
* | fix Symbian ordinals for merge request re. utf8 characters in SSL certsPeter Hartmann2011-05-241-1/+5
| | | | | | | | | | Task-number: QTBUG-7912 (cherry picked from commit 83c37059df7f23be482d4ecb2c54603a3665a33d)
* | 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-233-36/+29
|/ | | | | | | | | ... 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)
* Send User-Agent from the network request in http proxy CONNECT commandShane Kearns2011-05-091-0/+2
| | | | | | | | | | | | | Some proxies can discriminate based on the User-Agent when sent a CONNECT command for establishing a HTTPS connection. With this change, if the User-Agent header is set in the QNetworkRequest then it will be passed to the http socket engine for use in the connect command sent to the proxy. As before, "Mozilla/5.0" will be used by default when no user agent has been set. Task-number: QTBUG-17223 Reviewed-by: Markus Goetz
* QSslConfiguration documentation fixTaito Silvola2011-05-051-2/+2
| | | | | | | setPeerVerifyMode() and peerVerifyMode() comments fix Merge-request: 1220 Reviewed-by: Peter Hartmann
* Initial import from the monolithic Qt.Qt by Nokia2011-04-2724-0/+9304
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