src/network/ssl/qsslsocket.cpp
changeset 18 2f34d5167611
parent 3 41300fa6a67c
child 22 79de32ba3296
equal deleted inserted replaced
3:41300fa6a67c 18:2f34d5167611
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtNetwork module of the Qt Toolkit.
     7 ** This file is part of the QtNetwork module of the Qt Toolkit.
     8 **
     8 **
  1107 */
  1107 */
  1108 void QSslSocket::setCiphers(const QString &ciphers)
  1108 void QSslSocket::setCiphers(const QString &ciphers)
  1109 {
  1109 {
  1110     Q_D(QSslSocket);
  1110     Q_D(QSslSocket);
  1111     d->configuration.ciphers.clear();
  1111     d->configuration.ciphers.clear();
  1112     foreach (QString cipherName, ciphers.split(QLatin1String(":"),QString::SkipEmptyParts)) {
  1112     foreach (const QString &cipherName, ciphers.split(QLatin1String(":"),QString::SkipEmptyParts)) {
  1113         for (int i = 0; i < 3; ++i) {
  1113         for (int i = 0; i < 3; ++i) {
  1114             // ### Crude
  1114             // ### Crude
  1115             QSslCipher cipher(cipherName, QSsl::SslProtocol(i));
  1115             QSslCipher cipher(cipherName, QSsl::SslProtocol(i));
  1116             if (!cipher.isNull())
  1116             if (!cipher.isNull())
  1117                 d->configuration.ciphers << cipher;
  1117                 d->configuration.ciphers << cipher;